@clossir-tech/ts-sdk 0.9.0 → 0.9.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/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.d.ts +2 -1
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.d.ts.map +1 -1
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.js +3 -2
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.js.map +1 -1
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions.d.ts +2 -1
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions.d.ts.map +1 -1
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions.js +3 -2
- package/esm/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions.js.map +1 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-distributions.d.ts +2 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-distributions.d.ts.map +1 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-distributions.js +2 -2
- package/esm/funcs/fees-get-orgs-by-org-id-fee-distributions.js.map +1 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-splits.d.ts +2 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-splits.d.ts.map +1 -1
- package/esm/funcs/fees-get-orgs-by-org-id-fee-splits.js +2 -2
- package/esm/funcs/fees-get-orgs-by-org-id-fee-splits.js.map +1 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-history.d.ts +2 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-history.d.ts.map +1 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-history.js +2 -2
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-history.js.map +1 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-latest.d.ts +2 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-latest.d.ts.map +1 -1
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-latest.js +2 -2
- package/esm/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-latest.js.map +1 -1
- package/esm/funcs/organizations-delete-orgs-by-org-id-members-by-user-id.js +1 -1
- package/esm/funcs/organizations-delete-orgs-by-org-id-members-by-user-id.js.map +1 -1
- package/esm/funcs/organizations-put-orgs-by-org-id-members-by-user-id.js +1 -3
- package/esm/funcs/organizations-put-orgs-by-org-id-members-by-user-id.js.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-epochs.d.ts +2 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-epochs.d.ts.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-epochs.js +2 -2
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-epochs.js.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-status.d.ts +2 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-status.d.ts.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-status.js +2 -2
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-status.js.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault.d.ts +2 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault.d.ts.map +1 -1
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault.js +2 -2
- package/esm/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.d.ts +59 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.js +84 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions.d.ts +68 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions.js +86 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-history.d.ts +54 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-history.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-history.js +59 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-history.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-latest.d.ts +42 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-latest.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-latest.js +56 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-latest.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-epochs.d.ts +77 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-epochs.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-epochs.js +92 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-epochs.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-status.d.ts +34 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-status.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-status.js +45 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-status.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault.d.ts +34 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault.js +42 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-fee-distributions.d.ts +60 -0
- package/esm/models/operations/get-orgs-by-org-id-fee-distributions.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-fee-distributions.js +66 -0
- package/esm/models/operations/get-orgs-by-org-id-fee-distributions.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-fee-splits.d.ts +31 -0
- package/esm/models/operations/get-orgs-by-org-id-fee-splits.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-fee-splits.js +39 -0
- package/esm/models/operations/get-orgs-by-org-id-fee-splits.js.map +1 -1
- package/esm/sdk/distributions.d.ts +2 -2
- package/esm/sdk/distributions.d.ts.map +1 -1
- package/esm/sdk/distributions.js.map +1 -1
- package/esm/sdk/fees.d.ts +2 -2
- package/esm/sdk/fees.d.ts.map +1 -1
- package/esm/sdk/fees.js.map +1 -1
- package/esm/sdk/nav.d.ts +2 -2
- package/esm/sdk/nav.d.ts.map +1 -1
- package/esm/sdk/nav.js.map +1 -1
- package/esm/sdk/vaults.d.ts +3 -3
- package/esm/sdk/vaults.d.ts.map +1 -1
- package/esm/sdk/vaults.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.ts +10 -6
- package/src/funcs/distributions-get-orgs-by-org-id-assets-by-asset-id-distributions.ts +10 -6
- package/src/funcs/fees-get-orgs-by-org-id-fee-distributions.ts +9 -6
- package/src/funcs/fees-get-orgs-by-org-id-fee-splits.ts +6 -6
- package/src/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-history.ts +9 -6
- package/src/funcs/nav-get-orgs-by-org-id-assets-by-asset-id-nav-latest.ts +9 -6
- package/src/funcs/organizations-delete-orgs-by-org-id-members-by-user-id.ts +1 -1
- package/src/funcs/organizations-put-orgs-by-org-id-members-by-user-id.ts +5 -3
- package/src/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-epochs.ts +9 -6
- package/src/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault-status.ts +9 -6
- package/src/funcs/vaults-get-orgs-by-org-id-assets-by-asset-id-vault.ts +9 -6
- package/src/lib/config.ts +2 -2
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.ts +251 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions.ts +265 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-history.ts +172 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-nav-latest.ts +155 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-epochs.ts +274 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault-status.ts +149 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-vault.ts +144 -0
- package/src/models/operations/get-orgs-by-org-id-fee-distributions.ts +202 -0
- package/src/models/operations/get-orgs-by-org-id-fee-splits.ts +91 -0
- package/src/sdk/distributions.ts +4 -2
- package/src/sdk/fees.ts +2 -2
- package/src/sdk/nav.ts +2 -2
- package/src/sdk/vaults.ts +3 -3
package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id.ts
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
6
12
|
|
|
7
13
|
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdRequest = {
|
|
8
14
|
orgId: string;
|
|
@@ -10,6 +16,59 @@ export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdRequest = {
|
|
|
10
16
|
distId: string;
|
|
11
17
|
};
|
|
12
18
|
|
|
19
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount =
|
|
20
|
+
| string
|
|
21
|
+
| number;
|
|
22
|
+
|
|
23
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount =
|
|
24
|
+
| string
|
|
25
|
+
| number;
|
|
26
|
+
|
|
27
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected =
|
|
28
|
+
| string
|
|
29
|
+
| number;
|
|
30
|
+
|
|
31
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount =
|
|
32
|
+
| string
|
|
33
|
+
| number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A row of the `distributions` table.
|
|
37
|
+
*/
|
|
38
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution = {
|
|
39
|
+
id?: string | null | undefined;
|
|
40
|
+
assetId?: string | null | undefined;
|
|
41
|
+
distributorAddress?: string | null | undefined;
|
|
42
|
+
payoutToken?: string | null | undefined;
|
|
43
|
+
totalAmount?: string | number | null | undefined;
|
|
44
|
+
depositedAmount?: string | number | null | undefined;
|
|
45
|
+
processingFeeBps?: number | null | undefined;
|
|
46
|
+
processingFeeCollected?: string | number | null | undefined;
|
|
47
|
+
claimedAmount?: string | number | null | undefined;
|
|
48
|
+
depositDeadline?: string | null | undefined;
|
|
49
|
+
recordDate?: string | null | undefined;
|
|
50
|
+
payoutDate?: string | null | undefined;
|
|
51
|
+
claimDeadline?: string | null | undefined;
|
|
52
|
+
merkleRoot?: string | null | undefined;
|
|
53
|
+
totalRecipients?: number | null | undefined;
|
|
54
|
+
status?: string | null | undefined;
|
|
55
|
+
chainEid?: number | null | undefined;
|
|
56
|
+
onChainId?: number | null | undefined;
|
|
57
|
+
createdAt?: string | null | undefined;
|
|
58
|
+
updatedAt?: string | null | undefined;
|
|
59
|
+
[additionalProperties: string]: unknown;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Response
|
|
64
|
+
*/
|
|
65
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse = {
|
|
66
|
+
/**
|
|
67
|
+
* A row of the `distributions` table.
|
|
68
|
+
*/
|
|
69
|
+
distribution: GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution;
|
|
70
|
+
};
|
|
71
|
+
|
|
13
72
|
/** @internal */
|
|
14
73
|
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdRequest$Outbound =
|
|
15
74
|
{
|
|
@@ -38,3 +97,195 @@ export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdRequestToJSON(
|
|
|
38
97
|
.parse(getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdRequest),
|
|
39
98
|
);
|
|
40
99
|
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount$inboundSchema:
|
|
103
|
+
z.ZodMiniType<
|
|
104
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount,
|
|
105
|
+
unknown
|
|
106
|
+
> = smartUnion([types.string(), types.number()]);
|
|
107
|
+
|
|
108
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmountFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<
|
|
111
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount,
|
|
112
|
+
SDKValidationError
|
|
113
|
+
> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) =>
|
|
117
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount$inboundSchema
|
|
118
|
+
.parse(JSON.parse(x)),
|
|
119
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdTotalAmount' from JSON`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount$inboundSchema:
|
|
125
|
+
z.ZodMiniType<
|
|
126
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount,
|
|
127
|
+
unknown
|
|
128
|
+
> = smartUnion([types.string(), types.number()]);
|
|
129
|
+
|
|
130
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmountFromJSON(
|
|
131
|
+
jsonString: string,
|
|
132
|
+
): SafeParseResult<
|
|
133
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount,
|
|
134
|
+
SDKValidationError
|
|
135
|
+
> {
|
|
136
|
+
return safeParse(
|
|
137
|
+
jsonString,
|
|
138
|
+
(x) =>
|
|
139
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount$inboundSchema
|
|
140
|
+
.parse(JSON.parse(x)),
|
|
141
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDepositedAmount' from JSON`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected$inboundSchema:
|
|
147
|
+
z.ZodMiniType<
|
|
148
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected,
|
|
149
|
+
unknown
|
|
150
|
+
> = smartUnion([types.string(), types.number()]);
|
|
151
|
+
|
|
152
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollectedFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<
|
|
155
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected,
|
|
156
|
+
SDKValidationError
|
|
157
|
+
> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) =>
|
|
161
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected$inboundSchema
|
|
162
|
+
.parse(JSON.parse(x)),
|
|
163
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdProcessingFeeCollected' from JSON`,
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** @internal */
|
|
168
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount$inboundSchema:
|
|
169
|
+
z.ZodMiniType<
|
|
170
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount,
|
|
171
|
+
unknown
|
|
172
|
+
> = smartUnion([types.string(), types.number()]);
|
|
173
|
+
|
|
174
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmountFromJSON(
|
|
175
|
+
jsonString: string,
|
|
176
|
+
): SafeParseResult<
|
|
177
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount,
|
|
178
|
+
SDKValidationError
|
|
179
|
+
> {
|
|
180
|
+
return safeParse(
|
|
181
|
+
jsonString,
|
|
182
|
+
(x) =>
|
|
183
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount$inboundSchema
|
|
184
|
+
.parse(JSON.parse(x)),
|
|
185
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdClaimedAmount' from JSON`,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** @internal */
|
|
190
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution$inboundSchema:
|
|
191
|
+
z.ZodMiniType<
|
|
192
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution,
|
|
193
|
+
unknown
|
|
194
|
+
> = z.pipe(
|
|
195
|
+
z.catchall(
|
|
196
|
+
z.object({
|
|
197
|
+
id: z.optional(z.nullable(types.string())),
|
|
198
|
+
asset_id: z.optional(z.nullable(types.string())),
|
|
199
|
+
distributor_address: z.optional(z.nullable(types.string())),
|
|
200
|
+
payout_token: z.optional(z.nullable(types.string())),
|
|
201
|
+
total_amount: z.optional(
|
|
202
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
203
|
+
),
|
|
204
|
+
deposited_amount: z.optional(
|
|
205
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
206
|
+
),
|
|
207
|
+
processing_fee_bps: z.optional(z.nullable(types.number())),
|
|
208
|
+
processing_fee_collected: z.optional(
|
|
209
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
210
|
+
),
|
|
211
|
+
claimed_amount: z.optional(
|
|
212
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
213
|
+
),
|
|
214
|
+
deposit_deadline: z.optional(z.nullable(types.string())),
|
|
215
|
+
record_date: z.optional(z.nullable(types.string())),
|
|
216
|
+
payout_date: z.optional(z.nullable(types.string())),
|
|
217
|
+
claim_deadline: z.optional(z.nullable(types.string())),
|
|
218
|
+
merkle_root: z.optional(z.nullable(types.string())),
|
|
219
|
+
total_recipients: z.optional(z.nullable(types.number())),
|
|
220
|
+
status: z.optional(z.nullable(types.string())),
|
|
221
|
+
chain_eid: z.optional(z.nullable(types.number())),
|
|
222
|
+
on_chain_id: z.optional(z.nullable(types.number())),
|
|
223
|
+
created_at: z.optional(z.nullable(types.string())),
|
|
224
|
+
updated_at: z.optional(z.nullable(types.string())),
|
|
225
|
+
}),
|
|
226
|
+
z.any(),
|
|
227
|
+
),
|
|
228
|
+
z.transform((v) => {
|
|
229
|
+
return remap$(v, {
|
|
230
|
+
"asset_id": "assetId",
|
|
231
|
+
"distributor_address": "distributorAddress",
|
|
232
|
+
"payout_token": "payoutToken",
|
|
233
|
+
"total_amount": "totalAmount",
|
|
234
|
+
"deposited_amount": "depositedAmount",
|
|
235
|
+
"processing_fee_bps": "processingFeeBps",
|
|
236
|
+
"processing_fee_collected": "processingFeeCollected",
|
|
237
|
+
"claimed_amount": "claimedAmount",
|
|
238
|
+
"deposit_deadline": "depositDeadline",
|
|
239
|
+
"record_date": "recordDate",
|
|
240
|
+
"payout_date": "payoutDate",
|
|
241
|
+
"claim_deadline": "claimDeadline",
|
|
242
|
+
"merkle_root": "merkleRoot",
|
|
243
|
+
"total_recipients": "totalRecipients",
|
|
244
|
+
"chain_eid": "chainEid",
|
|
245
|
+
"on_chain_id": "onChainId",
|
|
246
|
+
"created_at": "createdAt",
|
|
247
|
+
"updated_at": "updatedAt",
|
|
248
|
+
});
|
|
249
|
+
}),
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistributionFromJSON(
|
|
253
|
+
jsonString: string,
|
|
254
|
+
): SafeParseResult<
|
|
255
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution,
|
|
256
|
+
SDKValidationError
|
|
257
|
+
> {
|
|
258
|
+
return safeParse(
|
|
259
|
+
jsonString,
|
|
260
|
+
(x) =>
|
|
261
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution$inboundSchema
|
|
262
|
+
.parse(JSON.parse(x)),
|
|
263
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution' from JSON`,
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** @internal */
|
|
268
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse$inboundSchema:
|
|
269
|
+
z.ZodMiniType<
|
|
270
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse,
|
|
271
|
+
unknown
|
|
272
|
+
> = z.object({
|
|
273
|
+
distribution: z.lazy(() =>
|
|
274
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdDistribution$inboundSchema
|
|
275
|
+
),
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponseFromJSON(
|
|
279
|
+
jsonString: string,
|
|
280
|
+
): SafeParseResult<
|
|
281
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse,
|
|
282
|
+
SDKValidationError
|
|
283
|
+
> {
|
|
284
|
+
return safeParse(
|
|
285
|
+
jsonString,
|
|
286
|
+
(x) =>
|
|
287
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse$inboundSchema
|
|
288
|
+
.parse(JSON.parse(x)),
|
|
289
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsByDistIdResponse' from JSON`,
|
|
290
|
+
);
|
|
291
|
+
}
|
|
@@ -3,12 +3,80 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
6
12
|
|
|
7
13
|
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsRequest = {
|
|
8
14
|
orgId: string;
|
|
9
15
|
assetId: string;
|
|
10
16
|
};
|
|
11
17
|
|
|
18
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount =
|
|
19
|
+
| string
|
|
20
|
+
| number;
|
|
21
|
+
|
|
22
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount =
|
|
23
|
+
| string
|
|
24
|
+
| number;
|
|
25
|
+
|
|
26
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected =
|
|
27
|
+
| string
|
|
28
|
+
| number;
|
|
29
|
+
|
|
30
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount =
|
|
31
|
+
| string
|
|
32
|
+
| number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A row of the `distributions` table.
|
|
36
|
+
*/
|
|
37
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution = {
|
|
38
|
+
id?: string | null | undefined;
|
|
39
|
+
assetId?: string | null | undefined;
|
|
40
|
+
distributorAddress?: string | null | undefined;
|
|
41
|
+
payoutToken?: string | null | undefined;
|
|
42
|
+
totalAmount?: string | number | null | undefined;
|
|
43
|
+
depositedAmount?: string | number | null | undefined;
|
|
44
|
+
processingFeeBps?: number | null | undefined;
|
|
45
|
+
processingFeeCollected?: string | number | null | undefined;
|
|
46
|
+
claimedAmount?: string | number | null | undefined;
|
|
47
|
+
depositDeadline?: string | null | undefined;
|
|
48
|
+
recordDate?: string | null | undefined;
|
|
49
|
+
payoutDate?: string | null | undefined;
|
|
50
|
+
claimDeadline?: string | null | undefined;
|
|
51
|
+
merkleRoot?: string | null | undefined;
|
|
52
|
+
totalRecipients?: number | null | undefined;
|
|
53
|
+
status?: string | null | undefined;
|
|
54
|
+
chainEid?: number | null | undefined;
|
|
55
|
+
onChainId?: number | null | undefined;
|
|
56
|
+
createdAt?: string | null | undefined;
|
|
57
|
+
updatedAt?: string | null | undefined;
|
|
58
|
+
[additionalProperties: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Response
|
|
63
|
+
*/
|
|
64
|
+
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse = {
|
|
65
|
+
distributions: Array<GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution>;
|
|
66
|
+
/**
|
|
67
|
+
* Total matching rows, ignoring limit/offset
|
|
68
|
+
*/
|
|
69
|
+
total: number;
|
|
70
|
+
/**
|
|
71
|
+
* Page size that was applied
|
|
72
|
+
*/
|
|
73
|
+
limit: number;
|
|
74
|
+
/**
|
|
75
|
+
* Row offset that was applied
|
|
76
|
+
*/
|
|
77
|
+
offset: number;
|
|
78
|
+
};
|
|
79
|
+
|
|
12
80
|
/** @internal */
|
|
13
81
|
export type GetOrgsByOrgIdAssetsByAssetIdDistributionsRequest$Outbound = {
|
|
14
82
|
orgId: string;
|
|
@@ -35,3 +103,200 @@ export function getOrgsByOrgIdAssetsByAssetIdDistributionsRequestToJSON(
|
|
|
35
103
|
),
|
|
36
104
|
);
|
|
37
105
|
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount$inboundSchema:
|
|
109
|
+
z.ZodMiniType<
|
|
110
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount,
|
|
111
|
+
unknown
|
|
112
|
+
> = smartUnion([types.string(), types.number()]);
|
|
113
|
+
|
|
114
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmountFromJSON(
|
|
115
|
+
jsonString: string,
|
|
116
|
+
): SafeParseResult<
|
|
117
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount,
|
|
118
|
+
SDKValidationError
|
|
119
|
+
> {
|
|
120
|
+
return safeParse(
|
|
121
|
+
jsonString,
|
|
122
|
+
(x) =>
|
|
123
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount$inboundSchema.parse(
|
|
124
|
+
JSON.parse(x),
|
|
125
|
+
),
|
|
126
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsTotalAmount' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount$inboundSchema:
|
|
132
|
+
z.ZodMiniType<
|
|
133
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount,
|
|
134
|
+
unknown
|
|
135
|
+
> = smartUnion([types.string(), types.number()]);
|
|
136
|
+
|
|
137
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmountFromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<
|
|
140
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount,
|
|
141
|
+
SDKValidationError
|
|
142
|
+
> {
|
|
143
|
+
return safeParse(
|
|
144
|
+
jsonString,
|
|
145
|
+
(x) =>
|
|
146
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount$inboundSchema
|
|
147
|
+
.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsDepositedAmount' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected$inboundSchema:
|
|
154
|
+
z.ZodMiniType<
|
|
155
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected,
|
|
156
|
+
unknown
|
|
157
|
+
> = smartUnion([types.string(), types.number()]);
|
|
158
|
+
|
|
159
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollectedFromJSON(
|
|
160
|
+
jsonString: string,
|
|
161
|
+
): SafeParseResult<
|
|
162
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected,
|
|
163
|
+
SDKValidationError
|
|
164
|
+
> {
|
|
165
|
+
return safeParse(
|
|
166
|
+
jsonString,
|
|
167
|
+
(x) =>
|
|
168
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected$inboundSchema
|
|
169
|
+
.parse(JSON.parse(x)),
|
|
170
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsProcessingFeeCollected' from JSON`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount$inboundSchema:
|
|
176
|
+
z.ZodMiniType<
|
|
177
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount,
|
|
178
|
+
unknown
|
|
179
|
+
> = smartUnion([types.string(), types.number()]);
|
|
180
|
+
|
|
181
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmountFromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<
|
|
184
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount,
|
|
185
|
+
SDKValidationError
|
|
186
|
+
> {
|
|
187
|
+
return safeParse(
|
|
188
|
+
jsonString,
|
|
189
|
+
(x) =>
|
|
190
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount$inboundSchema
|
|
191
|
+
.parse(JSON.parse(x)),
|
|
192
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsClaimedAmount' from JSON`,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution$inboundSchema:
|
|
198
|
+
z.ZodMiniType<
|
|
199
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.pipe(
|
|
202
|
+
z.catchall(
|
|
203
|
+
z.object({
|
|
204
|
+
id: z.optional(z.nullable(types.string())),
|
|
205
|
+
asset_id: z.optional(z.nullable(types.string())),
|
|
206
|
+
distributor_address: z.optional(z.nullable(types.string())),
|
|
207
|
+
payout_token: z.optional(z.nullable(types.string())),
|
|
208
|
+
total_amount: z.optional(
|
|
209
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
210
|
+
),
|
|
211
|
+
deposited_amount: z.optional(
|
|
212
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
213
|
+
),
|
|
214
|
+
processing_fee_bps: z.optional(z.nullable(types.number())),
|
|
215
|
+
processing_fee_collected: z.optional(
|
|
216
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
217
|
+
),
|
|
218
|
+
claimed_amount: z.optional(
|
|
219
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
220
|
+
),
|
|
221
|
+
deposit_deadline: z.optional(z.nullable(types.string())),
|
|
222
|
+
record_date: z.optional(z.nullable(types.string())),
|
|
223
|
+
payout_date: z.optional(z.nullable(types.string())),
|
|
224
|
+
claim_deadline: z.optional(z.nullable(types.string())),
|
|
225
|
+
merkle_root: z.optional(z.nullable(types.string())),
|
|
226
|
+
total_recipients: z.optional(z.nullable(types.number())),
|
|
227
|
+
status: z.optional(z.nullable(types.string())),
|
|
228
|
+
chain_eid: z.optional(z.nullable(types.number())),
|
|
229
|
+
on_chain_id: z.optional(z.nullable(types.number())),
|
|
230
|
+
created_at: z.optional(z.nullable(types.string())),
|
|
231
|
+
updated_at: z.optional(z.nullable(types.string())),
|
|
232
|
+
}),
|
|
233
|
+
z.any(),
|
|
234
|
+
),
|
|
235
|
+
z.transform((v) => {
|
|
236
|
+
return remap$(v, {
|
|
237
|
+
"asset_id": "assetId",
|
|
238
|
+
"distributor_address": "distributorAddress",
|
|
239
|
+
"payout_token": "payoutToken",
|
|
240
|
+
"total_amount": "totalAmount",
|
|
241
|
+
"deposited_amount": "depositedAmount",
|
|
242
|
+
"processing_fee_bps": "processingFeeBps",
|
|
243
|
+
"processing_fee_collected": "processingFeeCollected",
|
|
244
|
+
"claimed_amount": "claimedAmount",
|
|
245
|
+
"deposit_deadline": "depositDeadline",
|
|
246
|
+
"record_date": "recordDate",
|
|
247
|
+
"payout_date": "payoutDate",
|
|
248
|
+
"claim_deadline": "claimDeadline",
|
|
249
|
+
"merkle_root": "merkleRoot",
|
|
250
|
+
"total_recipients": "totalRecipients",
|
|
251
|
+
"chain_eid": "chainEid",
|
|
252
|
+
"on_chain_id": "onChainId",
|
|
253
|
+
"created_at": "createdAt",
|
|
254
|
+
"updated_at": "updatedAt",
|
|
255
|
+
});
|
|
256
|
+
}),
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsDistributionFromJSON(
|
|
260
|
+
jsonString: string,
|
|
261
|
+
): SafeParseResult<
|
|
262
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution,
|
|
263
|
+
SDKValidationError
|
|
264
|
+
> {
|
|
265
|
+
return safeParse(
|
|
266
|
+
jsonString,
|
|
267
|
+
(x) =>
|
|
268
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution$inboundSchema
|
|
269
|
+
.parse(JSON.parse(x)),
|
|
270
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution' from JSON`,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** @internal */
|
|
275
|
+
export const GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse$inboundSchema:
|
|
276
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse, unknown> = z
|
|
277
|
+
.object({
|
|
278
|
+
distributions: z.array(
|
|
279
|
+
z.lazy(() =>
|
|
280
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsDistribution$inboundSchema
|
|
281
|
+
),
|
|
282
|
+
),
|
|
283
|
+
total: types.number(),
|
|
284
|
+
limit: types.number(),
|
|
285
|
+
offset: types.number(),
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
export function getOrgsByOrgIdAssetsByAssetIdDistributionsResponseFromJSON(
|
|
289
|
+
jsonString: string,
|
|
290
|
+
): SafeParseResult<
|
|
291
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse,
|
|
292
|
+
SDKValidationError
|
|
293
|
+
> {
|
|
294
|
+
return safeParse(
|
|
295
|
+
jsonString,
|
|
296
|
+
(x) =>
|
|
297
|
+
GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse$inboundSchema.parse(
|
|
298
|
+
JSON.parse(x),
|
|
299
|
+
),
|
|
300
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdDistributionsResponse' from JSON`,
|
|
301
|
+
);
|
|
302
|
+
}
|