@clossir-tech/ts-sdk 0.9.1 → 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/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 +1 -1
- 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/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
|
@@ -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
|
+
}
|
|
@@ -3,12 +3,64 @@
|
|
|
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 GetOrgsByOrgIdAssetsByAssetIdNavHistoryRequest = {
|
|
8
14
|
orgId: string;
|
|
9
15
|
assetId: string;
|
|
10
16
|
};
|
|
11
17
|
|
|
18
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare =
|
|
19
|
+
| string
|
|
20
|
+
| number;
|
|
21
|
+
|
|
22
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound = string | number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A row of the `nav_updates` table.
|
|
26
|
+
*/
|
|
27
|
+
export type Update = {
|
|
28
|
+
id?: string | null | undefined;
|
|
29
|
+
assetId?: string | null | undefined;
|
|
30
|
+
chainEid?: number | null | undefined;
|
|
31
|
+
navPerShare?: string | number | null | undefined;
|
|
32
|
+
asOfTimestamp?: string | null | undefined;
|
|
33
|
+
round?: string | number | null | undefined;
|
|
34
|
+
oracleType?: string | null | undefined;
|
|
35
|
+
status?: string | null | undefined;
|
|
36
|
+
rejectionReason?: string | null | undefined;
|
|
37
|
+
circuitBreakerActive?: boolean | null | undefined;
|
|
38
|
+
consecutiveRejections?: number | null | undefined;
|
|
39
|
+
sourceTxHash?: string | null | undefined;
|
|
40
|
+
receivedAt?: string | null | undefined;
|
|
41
|
+
createdAt?: string | null | undefined;
|
|
42
|
+
[additionalProperties: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Response
|
|
47
|
+
*/
|
|
48
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse = {
|
|
49
|
+
updates: Array<Update>;
|
|
50
|
+
/**
|
|
51
|
+
* Total matching rows, ignoring limit/offset
|
|
52
|
+
*/
|
|
53
|
+
total: number;
|
|
54
|
+
/**
|
|
55
|
+
* Page size that was applied
|
|
56
|
+
*/
|
|
57
|
+
limit: number;
|
|
58
|
+
/**
|
|
59
|
+
* Row offset that was applied
|
|
60
|
+
*/
|
|
61
|
+
offset: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
12
64
|
/** @internal */
|
|
13
65
|
export type GetOrgsByOrgIdAssetsByAssetIdNavHistoryRequest$Outbound = {
|
|
14
66
|
orgId: string;
|
|
@@ -35,3 +87,123 @@ export function getOrgsByOrgIdAssetsByAssetIdNavHistoryRequestToJSON(
|
|
|
35
87
|
),
|
|
36
88
|
);
|
|
37
89
|
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare$inboundSchema:
|
|
93
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare, unknown> =
|
|
94
|
+
smartUnion([types.string(), types.number()]);
|
|
95
|
+
|
|
96
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShareFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<
|
|
99
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare,
|
|
100
|
+
SDKValidationError
|
|
101
|
+
> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) =>
|
|
105
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare$inboundSchema.parse(
|
|
106
|
+
JSON.parse(x),
|
|
107
|
+
),
|
|
108
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavHistoryNavPerShare' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound$inboundSchema:
|
|
114
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound, unknown> =
|
|
115
|
+
smartUnion([types.string(), types.number()]);
|
|
116
|
+
|
|
117
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavHistoryRoundFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<
|
|
120
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound,
|
|
121
|
+
SDKValidationError
|
|
122
|
+
> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) =>
|
|
126
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound$inboundSchema.parse(
|
|
127
|
+
JSON.parse(x),
|
|
128
|
+
),
|
|
129
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavHistoryRound' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const Update$inboundSchema: z.ZodMiniType<Update, unknown> = z.pipe(
|
|
135
|
+
z.catchall(
|
|
136
|
+
z.object({
|
|
137
|
+
id: z.optional(z.nullable(types.string())),
|
|
138
|
+
asset_id: z.optional(z.nullable(types.string())),
|
|
139
|
+
chain_eid: z.optional(z.nullable(types.number())),
|
|
140
|
+
nav_per_share: z.optional(
|
|
141
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
142
|
+
),
|
|
143
|
+
as_of_timestamp: z.optional(z.nullable(types.string())),
|
|
144
|
+
round: z.optional(
|
|
145
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
146
|
+
),
|
|
147
|
+
oracle_type: z.optional(z.nullable(types.string())),
|
|
148
|
+
status: z.optional(z.nullable(types.string())),
|
|
149
|
+
rejection_reason: z.optional(z.nullable(types.string())),
|
|
150
|
+
circuit_breaker_active: z.optional(z.nullable(types.boolean())),
|
|
151
|
+
consecutive_rejections: z.optional(z.nullable(types.number())),
|
|
152
|
+
source_tx_hash: z.optional(z.nullable(types.string())),
|
|
153
|
+
received_at: z.optional(z.nullable(types.string())),
|
|
154
|
+
created_at: z.optional(z.nullable(types.string())),
|
|
155
|
+
}),
|
|
156
|
+
z.any(),
|
|
157
|
+
),
|
|
158
|
+
z.transform((v) => {
|
|
159
|
+
return remap$(v, {
|
|
160
|
+
"asset_id": "assetId",
|
|
161
|
+
"chain_eid": "chainEid",
|
|
162
|
+
"nav_per_share": "navPerShare",
|
|
163
|
+
"as_of_timestamp": "asOfTimestamp",
|
|
164
|
+
"oracle_type": "oracleType",
|
|
165
|
+
"rejection_reason": "rejectionReason",
|
|
166
|
+
"circuit_breaker_active": "circuitBreakerActive",
|
|
167
|
+
"consecutive_rejections": "consecutiveRejections",
|
|
168
|
+
"source_tx_hash": "sourceTxHash",
|
|
169
|
+
"received_at": "receivedAt",
|
|
170
|
+
"created_at": "createdAt",
|
|
171
|
+
});
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
export function updateFromJSON(
|
|
176
|
+
jsonString: string,
|
|
177
|
+
): SafeParseResult<Update, SDKValidationError> {
|
|
178
|
+
return safeParse(
|
|
179
|
+
jsonString,
|
|
180
|
+
(x) => Update$inboundSchema.parse(JSON.parse(x)),
|
|
181
|
+
`Failed to parse 'Update' from JSON`,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse$inboundSchema:
|
|
187
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse, unknown> = z
|
|
188
|
+
.object({
|
|
189
|
+
updates: z.array(z.lazy(() => Update$inboundSchema)),
|
|
190
|
+
total: types.number(),
|
|
191
|
+
limit: types.number(),
|
|
192
|
+
offset: types.number(),
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavHistoryResponseFromJSON(
|
|
196
|
+
jsonString: string,
|
|
197
|
+
): SafeParseResult<
|
|
198
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse,
|
|
199
|
+
SDKValidationError
|
|
200
|
+
> {
|
|
201
|
+
return safeParse(
|
|
202
|
+
jsonString,
|
|
203
|
+
(x) =>
|
|
204
|
+
GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse$inboundSchema.parse(
|
|
205
|
+
JSON.parse(x),
|
|
206
|
+
),
|
|
207
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavHistoryResponse' from JSON`,
|
|
208
|
+
);
|
|
209
|
+
}
|
|
@@ -3,12 +3,50 @@
|
|
|
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 GetOrgsByOrgIdAssetsByAssetIdNavLatestRequest = {
|
|
8
14
|
orgId: string;
|
|
9
15
|
assetId: string;
|
|
10
16
|
};
|
|
11
17
|
|
|
18
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare = string | number;
|
|
19
|
+
|
|
20
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavLatestRound = string | number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A row of the `nav_updates` table.
|
|
24
|
+
*/
|
|
25
|
+
export type Nav = {
|
|
26
|
+
id?: string | null | undefined;
|
|
27
|
+
assetId?: string | null | undefined;
|
|
28
|
+
chainEid?: number | null | undefined;
|
|
29
|
+
navPerShare?: string | number | null | undefined;
|
|
30
|
+
asOfTimestamp?: string | null | undefined;
|
|
31
|
+
round?: string | number | null | undefined;
|
|
32
|
+
oracleType?: string | null | undefined;
|
|
33
|
+
status?: string | null | undefined;
|
|
34
|
+
rejectionReason?: string | null | undefined;
|
|
35
|
+
circuitBreakerActive?: boolean | null | undefined;
|
|
36
|
+
consecutiveRejections?: number | null | undefined;
|
|
37
|
+
sourceTxHash?: string | null | undefined;
|
|
38
|
+
receivedAt?: string | null | undefined;
|
|
39
|
+
createdAt?: string | null | undefined;
|
|
40
|
+
[additionalProperties: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Response
|
|
45
|
+
*/
|
|
46
|
+
export type GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse = {
|
|
47
|
+
nav: Nav | null;
|
|
48
|
+
};
|
|
49
|
+
|
|
12
50
|
/** @internal */
|
|
13
51
|
export type GetOrgsByOrgIdAssetsByAssetIdNavLatestRequest$Outbound = {
|
|
14
52
|
orgId: string;
|
|
@@ -35,3 +73,120 @@ export function getOrgsByOrgIdAssetsByAssetIdNavLatestRequestToJSON(
|
|
|
35
73
|
),
|
|
36
74
|
);
|
|
37
75
|
}
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare$inboundSchema:
|
|
79
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare, unknown> =
|
|
80
|
+
smartUnion([types.string(), types.number()]);
|
|
81
|
+
|
|
82
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShareFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<
|
|
85
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare,
|
|
86
|
+
SDKValidationError
|
|
87
|
+
> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) =>
|
|
91
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare$inboundSchema.parse(
|
|
92
|
+
JSON.parse(x),
|
|
93
|
+
),
|
|
94
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavLatestNavPerShare' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavLatestRound$inboundSchema:
|
|
100
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavLatestRound, unknown> =
|
|
101
|
+
smartUnion([types.string(), types.number()]);
|
|
102
|
+
|
|
103
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavLatestRoundFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<
|
|
106
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestRound,
|
|
107
|
+
SDKValidationError
|
|
108
|
+
> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) =>
|
|
112
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestRound$inboundSchema.parse(
|
|
113
|
+
JSON.parse(x),
|
|
114
|
+
),
|
|
115
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavLatestRound' from JSON`,
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const Nav$inboundSchema: z.ZodMiniType<Nav, unknown> = z.pipe(
|
|
121
|
+
z.catchall(
|
|
122
|
+
z.object({
|
|
123
|
+
id: z.optional(z.nullable(types.string())),
|
|
124
|
+
asset_id: z.optional(z.nullable(types.string())),
|
|
125
|
+
chain_eid: z.optional(z.nullable(types.number())),
|
|
126
|
+
nav_per_share: z.optional(
|
|
127
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
128
|
+
),
|
|
129
|
+
as_of_timestamp: z.optional(z.nullable(types.string())),
|
|
130
|
+
round: z.optional(
|
|
131
|
+
z.nullable(smartUnion([types.string(), types.number()])),
|
|
132
|
+
),
|
|
133
|
+
oracle_type: z.optional(z.nullable(types.string())),
|
|
134
|
+
status: z.optional(z.nullable(types.string())),
|
|
135
|
+
rejection_reason: z.optional(z.nullable(types.string())),
|
|
136
|
+
circuit_breaker_active: z.optional(z.nullable(types.boolean())),
|
|
137
|
+
consecutive_rejections: z.optional(z.nullable(types.number())),
|
|
138
|
+
source_tx_hash: z.optional(z.nullable(types.string())),
|
|
139
|
+
received_at: z.optional(z.nullable(types.string())),
|
|
140
|
+
created_at: z.optional(z.nullable(types.string())),
|
|
141
|
+
}),
|
|
142
|
+
z.any(),
|
|
143
|
+
),
|
|
144
|
+
z.transform((v) => {
|
|
145
|
+
return remap$(v, {
|
|
146
|
+
"asset_id": "assetId",
|
|
147
|
+
"chain_eid": "chainEid",
|
|
148
|
+
"nav_per_share": "navPerShare",
|
|
149
|
+
"as_of_timestamp": "asOfTimestamp",
|
|
150
|
+
"oracle_type": "oracleType",
|
|
151
|
+
"rejection_reason": "rejectionReason",
|
|
152
|
+
"circuit_breaker_active": "circuitBreakerActive",
|
|
153
|
+
"consecutive_rejections": "consecutiveRejections",
|
|
154
|
+
"source_tx_hash": "sourceTxHash",
|
|
155
|
+
"received_at": "receivedAt",
|
|
156
|
+
"created_at": "createdAt",
|
|
157
|
+
});
|
|
158
|
+
}),
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
export function navFromJSON(
|
|
162
|
+
jsonString: string,
|
|
163
|
+
): SafeParseResult<Nav, SDKValidationError> {
|
|
164
|
+
return safeParse(
|
|
165
|
+
jsonString,
|
|
166
|
+
(x) => Nav$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
+
`Failed to parse 'Nav' from JSON`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse$inboundSchema:
|
|
173
|
+
z.ZodMiniType<GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse, unknown> = z
|
|
174
|
+
.object({
|
|
175
|
+
nav: types.nullable(z.lazy(() => Nav$inboundSchema)),
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
export function getOrgsByOrgIdAssetsByAssetIdNavLatestResponseFromJSON(
|
|
179
|
+
jsonString: string,
|
|
180
|
+
): SafeParseResult<
|
|
181
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse,
|
|
182
|
+
SDKValidationError
|
|
183
|
+
> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) =>
|
|
187
|
+
GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse$inboundSchema.parse(
|
|
188
|
+
JSON.parse(x),
|
|
189
|
+
),
|
|
190
|
+
`Failed to parse 'GetOrgsByOrgIdAssetsByAssetIdNavLatestResponse' from JSON`,
|
|
191
|
+
);
|
|
192
|
+
}
|