@archdao/archdao-client 2.0.1 → 2.1.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.
Files changed (156) hide show
  1. package/README.md +7 -6
  2. package/dist/commonjs/funcs/organizationGetOrganization.d.ts +1 -1
  3. package/dist/commonjs/funcs/organizationGetOrganization.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/organizationGetOrganization.js +7 -4
  5. package/dist/commonjs/funcs/organizationGetOrganization.js.map +1 -1
  6. package/dist/commonjs/funcs/proposalDeleteProposal.d.ts +1 -1
  7. package/dist/commonjs/funcs/proposalDeleteProposal.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/proposalDeleteProposal.js +7 -4
  9. package/dist/commonjs/funcs/proposalDeleteProposal.js.map +1 -1
  10. package/dist/commonjs/funcs/proposalGetProposal.d.ts +1 -1
  11. package/dist/commonjs/funcs/proposalGetProposal.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/proposalGetProposal.js +7 -4
  13. package/dist/commonjs/funcs/proposalGetProposal.js.map +1 -1
  14. package/dist/commonjs/funcs/raiseGetRaise.d.ts +1 -1
  15. package/dist/commonjs/funcs/raiseGetRaise.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/raiseGetRaise.js +7 -4
  17. package/dist/commonjs/funcs/raiseGetRaise.js.map +1 -1
  18. package/dist/commonjs/funcs/userGetUser.d.ts +1 -1
  19. package/dist/commonjs/funcs/userGetUser.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/userGetUser.js +7 -4
  21. package/dist/commonjs/funcs/userGetUser.js.map +1 -1
  22. package/dist/commonjs/lib/config.d.ts +4 -4
  23. package/dist/commonjs/lib/config.d.ts.map +1 -1
  24. package/dist/commonjs/lib/config.js +10 -6
  25. package/dist/commonjs/lib/config.js.map +1 -1
  26. package/dist/commonjs/models/components/decisionmarket.d.ts +4 -4
  27. package/dist/commonjs/models/components/decisionmarket.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/decisionmarket.js +6 -6
  29. package/dist/commonjs/models/components/decisionmarket.js.map +1 -1
  30. package/dist/commonjs/models/components/nonce.d.ts +4 -4
  31. package/dist/commonjs/models/components/nonce.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/nonce.js +6 -4
  33. package/dist/commonjs/models/components/nonce.js.map +1 -1
  34. package/dist/commonjs/models/components/organization.d.ts +4 -4
  35. package/dist/commonjs/models/components/organization.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/organization.js +6 -4
  37. package/dist/commonjs/models/components/organization.js.map +1 -1
  38. package/dist/commonjs/models/components/proposal.d.ts +4 -4
  39. package/dist/commonjs/models/components/proposal.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/proposal.js +6 -4
  41. package/dist/commonjs/models/components/proposal.js.map +1 -1
  42. package/dist/commonjs/models/components/raise.d.ts +4 -4
  43. package/dist/commonjs/models/components/raise.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/raise.js +6 -6
  45. package/dist/commonjs/models/components/raise.js.map +1 -1
  46. package/dist/commonjs/models/components/raisecontribution.d.ts +4 -4
  47. package/dist/commonjs/models/components/raisecontribution.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/raisecontribution.js +6 -4
  49. package/dist/commonjs/models/components/raisecontribution.js.map +1 -1
  50. package/dist/commonjs/models/components/user.d.ts +4 -4
  51. package/dist/commonjs/models/components/user.d.ts.map +1 -1
  52. package/dist/commonjs/models/components/user.js +6 -4
  53. package/dist/commonjs/models/components/user.js.map +1 -1
  54. package/dist/commonjs/sdk/organization.d.ts +1 -1
  55. package/dist/commonjs/sdk/organization.d.ts.map +1 -1
  56. package/dist/commonjs/sdk/organization.js +2 -2
  57. package/dist/commonjs/sdk/organization.js.map +1 -1
  58. package/dist/commonjs/sdk/proposal.d.ts +2 -2
  59. package/dist/commonjs/sdk/proposal.d.ts.map +1 -1
  60. package/dist/commonjs/sdk/proposal.js +4 -4
  61. package/dist/commonjs/sdk/proposal.js.map +1 -1
  62. package/dist/commonjs/sdk/raise.d.ts +1 -1
  63. package/dist/commonjs/sdk/raise.d.ts.map +1 -1
  64. package/dist/commonjs/sdk/raise.js +2 -2
  65. package/dist/commonjs/sdk/raise.js.map +1 -1
  66. package/dist/commonjs/sdk/user.d.ts +1 -1
  67. package/dist/commonjs/sdk/user.d.ts.map +1 -1
  68. package/dist/commonjs/sdk/user.js +2 -2
  69. package/dist/commonjs/sdk/user.js.map +1 -1
  70. package/dist/esm/funcs/organizationGetOrganization.d.ts +1 -1
  71. package/dist/esm/funcs/organizationGetOrganization.d.ts.map +1 -1
  72. package/dist/esm/funcs/organizationGetOrganization.js +7 -4
  73. package/dist/esm/funcs/organizationGetOrganization.js.map +1 -1
  74. package/dist/esm/funcs/proposalDeleteProposal.d.ts +1 -1
  75. package/dist/esm/funcs/proposalDeleteProposal.d.ts.map +1 -1
  76. package/dist/esm/funcs/proposalDeleteProposal.js +7 -4
  77. package/dist/esm/funcs/proposalDeleteProposal.js.map +1 -1
  78. package/dist/esm/funcs/proposalGetProposal.d.ts +1 -1
  79. package/dist/esm/funcs/proposalGetProposal.d.ts.map +1 -1
  80. package/dist/esm/funcs/proposalGetProposal.js +7 -4
  81. package/dist/esm/funcs/proposalGetProposal.js.map +1 -1
  82. package/dist/esm/funcs/raiseGetRaise.d.ts +1 -1
  83. package/dist/esm/funcs/raiseGetRaise.d.ts.map +1 -1
  84. package/dist/esm/funcs/raiseGetRaise.js +7 -4
  85. package/dist/esm/funcs/raiseGetRaise.js.map +1 -1
  86. package/dist/esm/funcs/userGetUser.d.ts +1 -1
  87. package/dist/esm/funcs/userGetUser.d.ts.map +1 -1
  88. package/dist/esm/funcs/userGetUser.js +7 -4
  89. package/dist/esm/funcs/userGetUser.js.map +1 -1
  90. package/dist/esm/lib/config.d.ts +4 -4
  91. package/dist/esm/lib/config.d.ts.map +1 -1
  92. package/dist/esm/lib/config.js +10 -6
  93. package/dist/esm/lib/config.js.map +1 -1
  94. package/dist/esm/models/components/decisionmarket.d.ts +4 -4
  95. package/dist/esm/models/components/decisionmarket.d.ts.map +1 -1
  96. package/dist/esm/models/components/decisionmarket.js +6 -6
  97. package/dist/esm/models/components/decisionmarket.js.map +1 -1
  98. package/dist/esm/models/components/nonce.d.ts +4 -4
  99. package/dist/esm/models/components/nonce.d.ts.map +1 -1
  100. package/dist/esm/models/components/nonce.js +6 -4
  101. package/dist/esm/models/components/nonce.js.map +1 -1
  102. package/dist/esm/models/components/organization.d.ts +4 -4
  103. package/dist/esm/models/components/organization.d.ts.map +1 -1
  104. package/dist/esm/models/components/organization.js +6 -4
  105. package/dist/esm/models/components/organization.js.map +1 -1
  106. package/dist/esm/models/components/proposal.d.ts +4 -4
  107. package/dist/esm/models/components/proposal.d.ts.map +1 -1
  108. package/dist/esm/models/components/proposal.js +6 -4
  109. package/dist/esm/models/components/proposal.js.map +1 -1
  110. package/dist/esm/models/components/raise.d.ts +4 -4
  111. package/dist/esm/models/components/raise.d.ts.map +1 -1
  112. package/dist/esm/models/components/raise.js +6 -6
  113. package/dist/esm/models/components/raise.js.map +1 -1
  114. package/dist/esm/models/components/raisecontribution.d.ts +4 -4
  115. package/dist/esm/models/components/raisecontribution.d.ts.map +1 -1
  116. package/dist/esm/models/components/raisecontribution.js +6 -4
  117. package/dist/esm/models/components/raisecontribution.js.map +1 -1
  118. package/dist/esm/models/components/user.d.ts +4 -4
  119. package/dist/esm/models/components/user.d.ts.map +1 -1
  120. package/dist/esm/models/components/user.js +6 -4
  121. package/dist/esm/models/components/user.js.map +1 -1
  122. package/dist/esm/sdk/organization.d.ts +1 -1
  123. package/dist/esm/sdk/organization.d.ts.map +1 -1
  124. package/dist/esm/sdk/organization.js +2 -2
  125. package/dist/esm/sdk/organization.js.map +1 -1
  126. package/dist/esm/sdk/proposal.d.ts +2 -2
  127. package/dist/esm/sdk/proposal.d.ts.map +1 -1
  128. package/dist/esm/sdk/proposal.js +4 -4
  129. package/dist/esm/sdk/proposal.js.map +1 -1
  130. package/dist/esm/sdk/raise.d.ts +1 -1
  131. package/dist/esm/sdk/raise.d.ts.map +1 -1
  132. package/dist/esm/sdk/raise.js +2 -2
  133. package/dist/esm/sdk/raise.js.map +1 -1
  134. package/dist/esm/sdk/user.d.ts +1 -1
  135. package/dist/esm/sdk/user.d.ts.map +1 -1
  136. package/dist/esm/sdk/user.js +2 -2
  137. package/dist/esm/sdk/user.js.map +1 -1
  138. package/jsr.json +1 -1
  139. package/package.json +1 -1
  140. package/src/funcs/organizationGetOrganization.ts +8 -4
  141. package/src/funcs/proposalDeleteProposal.ts +8 -4
  142. package/src/funcs/proposalGetProposal.ts +8 -4
  143. package/src/funcs/raiseGetRaise.ts +8 -4
  144. package/src/funcs/userGetUser.ts +8 -4
  145. package/src/lib/config.ts +10 -6
  146. package/src/models/components/decisionmarket.ts +10 -10
  147. package/src/models/components/nonce.ts +10 -8
  148. package/src/models/components/organization.ts +10 -8
  149. package/src/models/components/proposal.ts +10 -8
  150. package/src/models/components/raise.ts +10 -10
  151. package/src/models/components/raisecontribution.ts +10 -8
  152. package/src/models/components/user.ts +10 -8
  153. package/src/sdk/organization.ts +2 -2
  154. package/src/sdk/proposal.ts +4 -4
  155. package/src/sdk/raise.ts +2 -2
  156. package/src/sdk/user.ts +2 -2
@@ -19,8 +19,8 @@ export class User extends ClientSDK {
19
19
  /**
20
20
  * Get user
21
21
  */
22
- async getUser(request, options) {
23
- return unwrapAsync(userGetUser(this, request, options));
22
+ async getUser(id, options) {
23
+ return unwrapAsync(userGetUser(this, id, options));
24
24
  }
25
25
  /**
26
26
  * Update user
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/sdk/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjC;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,OAAoC,EACpC,OAAwB;QAExB,OAAO,WAAW,CAAC,aAAa,CAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CACX,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/sdk/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjC;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,OAAoC,EACpC,OAAwB;QAExB,OAAO,WAAW,CAAC,aAAa,CAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CACX,EAAU,EACV,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,EAAE,EACF,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@archdao/archdao-client",
5
- "version": "2.0.1",
5
+ "version": "2.1.0",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archdao/archdao-client",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "author": "ArchDaoFi",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
33
33
  */
34
34
  export function organizationGetOrganization(
35
35
  client: ArchDAOCore,
36
- request: operations.GetOrganizationRequest,
36
+ slug: string,
37
37
  security?: operations.GetOrganizationSecurity | undefined,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -52,7 +52,7 @@ export function organizationGetOrganization(
52
52
  > {
53
53
  return new APIPromise($do(
54
54
  client,
55
- request,
55
+ slug,
56
56
  security,
57
57
  options,
58
58
  ));
@@ -60,7 +60,7 @@ export function organizationGetOrganization(
60
60
 
61
61
  async function $do(
62
62
  client: ArchDAOCore,
63
- request: operations.GetOrganizationRequest,
63
+ slug: string,
64
64
  security?: operations.GetOrganizationSecurity | undefined,
65
65
  options?: RequestOptions,
66
66
  ): Promise<
@@ -80,8 +80,12 @@ async function $do(
80
80
  APICall,
81
81
  ]
82
82
  > {
83
+ const input: operations.GetOrganizationRequest = {
84
+ slug: slug,
85
+ };
86
+
83
87
  const parsed = safeParse(
84
- request,
88
+ input,
85
89
  (value) => operations.GetOrganizationRequest$outboundSchema.parse(value),
86
90
  "Input validation failed",
87
91
  );
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
33
33
  */
34
34
  export function proposalDeleteProposal(
35
35
  client: ArchDAOCore,
36
- request: operations.DeleteProposalRequest,
36
+ id: number,
37
37
  options?: RequestOptions,
38
38
  ): APIPromise<
39
39
  Result<
@@ -51,14 +51,14 @@ export function proposalDeleteProposal(
51
51
  > {
52
52
  return new APIPromise($do(
53
53
  client,
54
- request,
54
+ id,
55
55
  options,
56
56
  ));
57
57
  }
58
58
 
59
59
  async function $do(
60
60
  client: ArchDAOCore,
61
- request: operations.DeleteProposalRequest,
61
+ id: number,
62
62
  options?: RequestOptions,
63
63
  ): Promise<
64
64
  [
@@ -77,8 +77,12 @@ async function $do(
77
77
  APICall,
78
78
  ]
79
79
  > {
80
+ const input: operations.DeleteProposalRequest = {
81
+ id: id,
82
+ };
83
+
80
84
  const parsed = safeParse(
81
- request,
85
+ input,
82
86
  (value) => operations.DeleteProposalRequest$outboundSchema.parse(value),
83
87
  "Input validation failed",
84
88
  );
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
33
33
  */
34
34
  export function proposalGetProposal(
35
35
  client: ArchDAOCore,
36
- request: operations.GetProposalRequest,
36
+ id: number,
37
37
  security?: operations.GetProposalSecurity | undefined,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -52,7 +52,7 @@ export function proposalGetProposal(
52
52
  > {
53
53
  return new APIPromise($do(
54
54
  client,
55
- request,
55
+ id,
56
56
  security,
57
57
  options,
58
58
  ));
@@ -60,7 +60,7 @@ export function proposalGetProposal(
60
60
 
61
61
  async function $do(
62
62
  client: ArchDAOCore,
63
- request: operations.GetProposalRequest,
63
+ id: number,
64
64
  security?: operations.GetProposalSecurity | undefined,
65
65
  options?: RequestOptions,
66
66
  ): Promise<
@@ -80,8 +80,12 @@ async function $do(
80
80
  APICall,
81
81
  ]
82
82
  > {
83
+ const input: operations.GetProposalRequest = {
84
+ id: id,
85
+ };
86
+
83
87
  const parsed = safeParse(
84
- request,
88
+ input,
85
89
  (value) => operations.GetProposalRequest$outboundSchema.parse(value),
86
90
  "Input validation failed",
87
91
  );
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
33
33
  */
34
34
  export function raiseGetRaise(
35
35
  client: ArchDAOCore,
36
- request: operations.GetRaiseRequest,
36
+ id: number,
37
37
  security?: operations.GetRaiseSecurity | undefined,
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
@@ -52,7 +52,7 @@ export function raiseGetRaise(
52
52
  > {
53
53
  return new APIPromise($do(
54
54
  client,
55
- request,
55
+ id,
56
56
  security,
57
57
  options,
58
58
  ));
@@ -60,7 +60,7 @@ export function raiseGetRaise(
60
60
 
61
61
  async function $do(
62
62
  client: ArchDAOCore,
63
- request: operations.GetRaiseRequest,
63
+ id: number,
64
64
  security?: operations.GetRaiseSecurity | undefined,
65
65
  options?: RequestOptions,
66
66
  ): Promise<
@@ -80,8 +80,12 @@ async function $do(
80
80
  APICall,
81
81
  ]
82
82
  > {
83
+ const input: operations.GetRaiseRequest = {
84
+ id: id,
85
+ };
86
+
83
87
  const parsed = safeParse(
84
- request,
88
+ input,
85
89
  (value) => operations.GetRaiseRequest$outboundSchema.parse(value),
86
90
  "Input validation failed",
87
91
  );
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  */
31
31
  export function userGetUser(
32
32
  client: ArchDAOCore,
33
- request: operations.GetUserRequest,
33
+ id: number,
34
34
  options?: RequestOptions,
35
35
  ): APIPromise<
36
36
  Result<
@@ -48,14 +48,14 @@ export function userGetUser(
48
48
  > {
49
49
  return new APIPromise($do(
50
50
  client,
51
- request,
51
+ id,
52
52
  options,
53
53
  ));
54
54
  }
55
55
 
56
56
  async function $do(
57
57
  client: ArchDAOCore,
58
- request: operations.GetUserRequest,
58
+ id: number,
59
59
  options?: RequestOptions,
60
60
  ): Promise<
61
61
  [
@@ -74,8 +74,12 @@ async function $do(
74
74
  APICall,
75
75
  ]
76
76
  > {
77
+ const input: operations.GetUserRequest = {
78
+ id: id,
79
+ };
80
+
77
81
  const parsed = safeParse(
78
- request,
82
+ input,
79
83
  (value) => operations.GetUserRequest$outboundSchema.parse(value),
80
84
  "Input validation failed",
81
85
  );
package/src/lib/config.ts CHANGED
@@ -12,13 +12,17 @@ import { Params, pathToFunc } from "./url.js";
12
12
  */
13
13
  export const ServerList = [
14
14
  /**
15
- * Production
15
+ * Local Development
16
16
  */
17
- "https://api.archdao.fi/v1",
17
+ "http://localhost:3001",
18
18
  /**
19
- * Mock Server
19
+ * Test Server
20
20
  */
21
21
  "https://mocks.archdao.fi/v1",
22
+ /**
23
+ * Production
24
+ */
25
+ "https://api.archdao.fi/v1",
22
26
  ] as const;
23
27
 
24
28
  export type SDKOptions = {
@@ -64,9 +68,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
68
 
65
69
  export const SDK_METADATA = {
66
70
  language: "typescript",
67
- openapiDocVersion: "2.0.1",
68
- sdkVersion: "2.0.1",
71
+ openapiDocVersion: "2.1.0",
72
+ sdkVersion: "2.1.0",
69
73
  genVersion: "2.634.2",
70
74
  userAgent:
71
- "speakeasy-sdk/typescript 2.0.1 2.634.2 2.0.1 @archdao/archdao-client",
75
+ "speakeasy-sdk/typescript 2.1.0 2.634.2 2.1.0 @archdao/archdao-client",
72
76
  } as const;
@@ -15,6 +15,8 @@ export const Side = {
15
15
  export type Side = ClosedEnum<typeof Side>;
16
16
 
17
17
  export type DecisionMarket = {
18
+ created?: Date | undefined;
19
+ updated?: Date | undefined;
18
20
  id: number;
19
21
  proposalId: number;
20
22
  side: Side;
@@ -23,8 +25,6 @@ export type DecisionMarket = {
23
25
  conditionalUsdcAddress: string;
24
26
  price: number;
25
27
  twapObservation: number;
26
- created?: Date | undefined;
27
- updated?: Date | undefined;
28
28
  };
29
29
 
30
30
  /** @internal */
@@ -53,6 +53,10 @@ export const DecisionMarket$inboundSchema: z.ZodType<
53
53
  z.ZodTypeDef,
54
54
  unknown
55
55
  > = z.object({
56
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
57
+ .optional(),
58
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
59
+ .optional(),
56
60
  id: z.number().int(),
57
61
  proposalId: z.number().int(),
58
62
  side: Side$inboundSchema,
@@ -61,14 +65,12 @@ export const DecisionMarket$inboundSchema: z.ZodType<
61
65
  conditionalUsdcAddress: z.string(),
62
66
  price: z.number(),
63
67
  twapObservation: z.number(),
64
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
65
- .optional(),
66
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
67
- .optional(),
68
68
  });
69
69
 
70
70
  /** @internal */
71
71
  export type DecisionMarket$Outbound = {
72
+ created?: string | undefined;
73
+ updated?: string | undefined;
72
74
  id: number;
73
75
  proposalId: number;
74
76
  side: string;
@@ -77,8 +79,6 @@ export type DecisionMarket$Outbound = {
77
79
  conditionalUsdcAddress: string;
78
80
  price: number;
79
81
  twapObservation: number;
80
- created?: string | undefined;
81
- updated?: string | undefined;
82
82
  };
83
83
 
84
84
  /** @internal */
@@ -87,6 +87,8 @@ export const DecisionMarket$outboundSchema: z.ZodType<
87
87
  z.ZodTypeDef,
88
88
  DecisionMarket
89
89
  > = z.object({
90
+ created: z.date().transform(v => v.toISOString()).optional(),
91
+ updated: z.date().transform(v => v.toISOString()).optional(),
90
92
  id: z.number().int(),
91
93
  proposalId: z.number().int(),
92
94
  side: Side$outboundSchema,
@@ -95,8 +97,6 @@ export const DecisionMarket$outboundSchema: z.ZodType<
95
97
  conditionalUsdcAddress: z.string(),
96
98
  price: z.number(),
97
99
  twapObservation: z.number(),
98
- created: z.date().transform(v => v.toISOString()).optional(),
99
- updated: z.date().transform(v => v.toISOString()).optional(),
100
100
  });
101
101
 
102
102
  /**
@@ -8,30 +8,32 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type Nonce = {
11
+ created?: Date | undefined;
12
+ updated?: Date | undefined;
11
13
  nonce: number;
12
14
  userAgent: string;
13
15
  ipAddress: string;
14
- created: Date;
15
- updated: Date;
16
16
  };
17
17
 
18
18
  /** @internal */
19
19
  export const Nonce$inboundSchema: z.ZodType<Nonce, z.ZodTypeDef, unknown> = z
20
20
  .object({
21
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
22
+ .optional(),
23
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
24
+ .optional(),
21
25
  nonce: z.number().int(),
22
26
  userAgent: z.string(),
23
27
  ipAddress: z.string(),
24
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
25
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
26
28
  });
27
29
 
28
30
  /** @internal */
29
31
  export type Nonce$Outbound = {
32
+ created?: string | undefined;
33
+ updated?: string | undefined;
30
34
  nonce: number;
31
35
  userAgent: string;
32
36
  ipAddress: string;
33
- created: string;
34
- updated: string;
35
37
  };
36
38
 
37
39
  /** @internal */
@@ -40,11 +42,11 @@ export const Nonce$outboundSchema: z.ZodType<
40
42
  z.ZodTypeDef,
41
43
  Nonce
42
44
  > = z.object({
45
+ created: z.date().transform(v => v.toISOString()).optional(),
46
+ updated: z.date().transform(v => v.toISOString()).optional(),
43
47
  nonce: z.number().int(),
44
48
  userAgent: z.string(),
45
49
  ipAddress: z.string(),
46
- created: z.date().transform(v => v.toISOString()),
47
- updated: z.date().transform(v => v.toISOString()),
48
50
  });
49
51
 
50
52
  /**
@@ -62,6 +62,8 @@ export const Type = {
62
62
  export type Type = ClosedEnum<typeof Type>;
63
63
 
64
64
  export type Organization = {
65
+ created?: Date | undefined;
66
+ updated?: Date | undefined;
65
67
  id: number;
66
68
  type: Type;
67
69
  name: string;
@@ -78,8 +80,6 @@ export type Organization = {
78
80
  proposals?: Array<Proposal> | undefined;
79
81
  user?: User | undefined;
80
82
  userId: number;
81
- created: Date;
82
- updated: Date;
83
83
  };
84
84
 
85
85
  /** @internal */
@@ -108,6 +108,10 @@ export const Organization$inboundSchema: z.ZodType<
108
108
  z.ZodTypeDef,
109
109
  unknown
110
110
  > = z.object({
111
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
112
+ .optional(),
113
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
114
+ .optional(),
111
115
  id: z.number().int(),
112
116
  type: Type$inboundSchema,
113
117
  name: z.string(),
@@ -124,12 +128,12 @@ export const Organization$inboundSchema: z.ZodType<
124
128
  proposals: z.array(Proposal$inboundSchema).optional(),
125
129
  user: User$inboundSchema.optional(),
126
130
  userId: z.number().int(),
127
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
128
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
129
131
  });
130
132
 
131
133
  /** @internal */
132
134
  export type Organization$Outbound = {
135
+ created?: string | undefined;
136
+ updated?: string | undefined;
133
137
  id: number;
134
138
  type: string;
135
139
  name: string;
@@ -146,8 +150,6 @@ export type Organization$Outbound = {
146
150
  proposals?: Array<Proposal$Outbound> | undefined;
147
151
  user?: User$Outbound | undefined;
148
152
  userId: number;
149
- created: string;
150
- updated: string;
151
153
  };
152
154
 
153
155
  /** @internal */
@@ -156,6 +158,8 @@ export const Organization$outboundSchema: z.ZodType<
156
158
  z.ZodTypeDef,
157
159
  Organization
158
160
  > = z.object({
161
+ created: z.date().transform(v => v.toISOString()).optional(),
162
+ updated: z.date().transform(v => v.toISOString()).optional(),
159
163
  id: z.number().int(),
160
164
  type: Type$outboundSchema,
161
165
  name: z.string(),
@@ -172,8 +176,6 @@ export const Organization$outboundSchema: z.ZodType<
172
176
  proposals: z.array(Proposal$outboundSchema).optional(),
173
177
  user: User$outboundSchema.optional(),
174
178
  userId: z.number().int(),
175
- created: z.date().transform(v => v.toISOString()),
176
- updated: z.date().transform(v => v.toISOString()),
177
179
  });
178
180
 
179
181
  /**
@@ -32,6 +32,8 @@ export const Outcome = {
32
32
  export type Outcome = ClosedEnum<typeof Outcome>;
33
33
 
34
34
  export type Proposal = {
35
+ created?: Date | undefined;
36
+ updated?: Date | undefined;
35
37
  id: number;
36
38
  organizationId: number;
37
39
  userId: number;
@@ -51,8 +53,6 @@ export type Proposal = {
51
53
  executedAt?: Date | undefined;
52
54
  actions?: Array<ProposalAction> | undefined;
53
55
  decisionMarkets?: Array<DecisionMarket> | undefined;
54
- created: Date;
55
- updated: Date;
56
56
  };
57
57
 
58
58
  /** @internal */
@@ -80,6 +80,10 @@ export const Proposal$inboundSchema: z.ZodType<
80
80
  z.ZodTypeDef,
81
81
  unknown
82
82
  > = z.object({
83
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
84
+ .optional(),
85
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
86
+ .optional(),
83
87
  id: z.number().int(),
84
88
  organizationId: z.number().int(),
85
89
  userId: z.number().int(),
@@ -105,12 +109,12 @@ export const Proposal$inboundSchema: z.ZodType<
105
109
  .optional(),
106
110
  actions: z.array(ProposalAction$inboundSchema).optional(),
107
111
  decisionMarkets: z.array(DecisionMarket$inboundSchema).optional(),
108
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
109
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
110
112
  });
111
113
 
112
114
  /** @internal */
113
115
  export type Proposal$Outbound = {
116
+ created?: string | undefined;
117
+ updated?: string | undefined;
114
118
  id: number;
115
119
  organizationId: number;
116
120
  userId: number;
@@ -130,8 +134,6 @@ export type Proposal$Outbound = {
130
134
  executedAt?: string | undefined;
131
135
  actions?: Array<ProposalAction$Outbound> | undefined;
132
136
  decisionMarkets?: Array<DecisionMarket$Outbound> | undefined;
133
- created: string;
134
- updated: string;
135
137
  };
136
138
 
137
139
  /** @internal */
@@ -140,6 +142,8 @@ export const Proposal$outboundSchema: z.ZodType<
140
142
  z.ZodTypeDef,
141
143
  Proposal
142
144
  > = z.object({
145
+ created: z.date().transform(v => v.toISOString()).optional(),
146
+ updated: z.date().transform(v => v.toISOString()).optional(),
143
147
  id: z.number().int(),
144
148
  organizationId: z.number().int(),
145
149
  userId: z.number().int(),
@@ -159,8 +163,6 @@ export const Proposal$outboundSchema: z.ZodType<
159
163
  executedAt: z.date().transform(v => v.toISOString()).optional(),
160
164
  actions: z.array(ProposalAction$outboundSchema).optional(),
161
165
  decisionMarkets: z.array(DecisionMarket$outboundSchema).optional(),
162
- created: z.date().transform(v => v.toISOString()),
163
- updated: z.date().transform(v => v.toISOString()),
164
166
  });
165
167
 
166
168
  /**
@@ -19,6 +19,8 @@ import {
19
19
  } from "./raisestatus.js";
20
20
 
21
21
  export type Raise = {
22
+ created?: Date | undefined;
23
+ updated?: Date | undefined;
22
24
  id: number;
23
25
  organizationId: number;
24
26
  address?: string | undefined;
@@ -29,13 +31,15 @@ export type Raise = {
29
31
  endDate?: Date | undefined;
30
32
  status: RaiseStatus;
31
33
  allocations?: Array<RaiseAllocation> | undefined;
32
- created?: Date | undefined;
33
- updated?: Date | undefined;
34
34
  };
35
35
 
36
36
  /** @internal */
37
37
  export const Raise$inboundSchema: z.ZodType<Raise, z.ZodTypeDef, unknown> = z
38
38
  .object({
39
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
40
+ .optional(),
41
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
42
+ .optional(),
39
43
  id: z.number().int(),
40
44
  organizationId: z.number().int(),
41
45
  address: z.string().optional(),
@@ -48,14 +52,12 @@ export const Raise$inboundSchema: z.ZodType<Raise, z.ZodTypeDef, unknown> = z
48
52
  .optional(),
49
53
  status: RaiseStatus$inboundSchema,
50
54
  allocations: z.array(RaiseAllocation$inboundSchema).optional(),
51
- created: z.string().datetime({ offset: true }).transform(v => new Date(v))
52
- .optional(),
53
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
54
- .optional(),
55
55
  });
56
56
 
57
57
  /** @internal */
58
58
  export type Raise$Outbound = {
59
+ created?: string | undefined;
60
+ updated?: string | undefined;
59
61
  id: number;
60
62
  organizationId: number;
61
63
  address?: string | undefined;
@@ -66,8 +68,6 @@ export type Raise$Outbound = {
66
68
  endDate?: string | undefined;
67
69
  status: string;
68
70
  allocations?: Array<RaiseAllocation$Outbound> | undefined;
69
- created?: string | undefined;
70
- updated?: string | undefined;
71
71
  };
72
72
 
73
73
  /** @internal */
@@ -76,6 +76,8 @@ export const Raise$outboundSchema: z.ZodType<
76
76
  z.ZodTypeDef,
77
77
  Raise
78
78
  > = z.object({
79
+ created: z.date().transform(v => v.toISOString()).optional(),
80
+ updated: z.date().transform(v => v.toISOString()).optional(),
79
81
  id: z.number().int(),
80
82
  organizationId: z.number().int(),
81
83
  address: z.string().optional(),
@@ -86,8 +88,6 @@ export const Raise$outboundSchema: z.ZodType<
86
88
  endDate: z.date().transform(v => v.toISOString()).optional(),
87
89
  status: RaiseStatus$outboundSchema,
88
90
  allocations: z.array(RaiseAllocation$outboundSchema).optional(),
89
- created: z.date().transform(v => v.toISOString()).optional(),
90
- updated: z.date().transform(v => v.toISOString()).optional(),
91
91
  });
92
92
 
93
93
  /**
@@ -8,12 +8,12 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type RaiseContribution = {
11
+ created?: Date | undefined;
12
+ updated?: Date | undefined;
11
13
  id: number;
12
14
  raiseId: number;
13
15
  address: string;
14
16
  amountInvested: number;
15
- created: Date;
16
- updated: Date;
17
17
  };
18
18
 
19
19
  /** @internal */
@@ -22,22 +22,24 @@ export const RaiseContribution$inboundSchema: z.ZodType<
22
22
  z.ZodTypeDef,
23
23
  unknown
24
24
  > = z.object({
25
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
26
+ .optional(),
27
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v))
28
+ .optional(),
25
29
  id: z.number().int(),
26
30
  raiseId: z.number().int(),
27
31
  address: z.string(),
28
32
  amountInvested: z.number(),
29
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
30
- updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
31
33
  });
32
34
 
33
35
  /** @internal */
34
36
  export type RaiseContribution$Outbound = {
37
+ created?: string | undefined;
38
+ updated?: string | undefined;
35
39
  id: number;
36
40
  raiseId: number;
37
41
  address: string;
38
42
  amountInvested: number;
39
- created: string;
40
- updated: string;
41
43
  };
42
44
 
43
45
  /** @internal */
@@ -46,12 +48,12 @@ export const RaiseContribution$outboundSchema: z.ZodType<
46
48
  z.ZodTypeDef,
47
49
  RaiseContribution
48
50
  > = z.object({
51
+ created: z.date().transform(v => v.toISOString()).optional(),
52
+ updated: z.date().transform(v => v.toISOString()).optional(),
49
53
  id: z.number().int(),
50
54
  raiseId: z.number().int(),
51
55
  address: z.string(),
52
56
  amountInvested: z.number(),
53
- created: z.date().transform(v => v.toISOString()),
54
- updated: z.date().transform(v => v.toISOString()),
55
57
  });
56
58
 
57
59
  /**