@polar-sh/sdk 0.17.4 → 0.18.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 (284) hide show
  1. package/FUNCTIONS.md +106 -0
  2. package/README.md +181 -30
  3. package/RUNTIMES.md +22 -0
  4. package/docs/sdks/checkouts/README.md +1 -1
  5. package/hooks/hooks.d.ts.map +1 -1
  6. package/hooks/hooks.js +18 -0
  7. package/hooks/hooks.js.map +1 -1
  8. package/hooks/types.d.ts +3 -0
  9. package/hooks/types.d.ts.map +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/lib/config.js.map +1 -1
  13. package/models/components/benefit.d.ts +2 -3
  14. package/models/components/benefit.d.ts.map +1 -1
  15. package/models/components/benefit.js +0 -3
  16. package/models/components/benefit.js.map +1 -1
  17. package/models/components/benefitadssubscriber.d.ts +7 -7
  18. package/models/components/benefitadssubscriber.d.ts.map +1 -1
  19. package/models/components/benefitadssubscriber.js +11 -11
  20. package/models/components/benefitadssubscriber.js.map +1 -1
  21. package/models/components/benefitgrant.d.ts +4 -5
  22. package/models/components/benefitgrant.d.ts.map +1 -1
  23. package/models/components/benefitgrant.js +0 -5
  24. package/models/components/benefitgrant.js.map +1 -1
  25. package/models/components/benefitgrantwebhook.d.ts +8 -9
  26. package/models/components/benefitgrantwebhook.d.ts.map +1 -1
  27. package/models/components/benefitgrantwebhook.js +0 -9
  28. package/models/components/benefitgrantwebhook.js.map +1 -1
  29. package/models/components/benefittype.d.ts +0 -3
  30. package/models/components/benefittype.d.ts.map +1 -1
  31. package/models/components/benefittype.js +0 -1
  32. package/models/components/benefittype.js.map +1 -1
  33. package/models/components/checkoutlinkproduct.d.ts +2 -24
  34. package/models/components/checkoutlinkproduct.d.ts.map +1 -1
  35. package/models/components/checkoutlinkproduct.js +3 -27
  36. package/models/components/checkoutlinkproduct.js.map +1 -1
  37. package/models/components/checkoutproduct.d.ts +2 -24
  38. package/models/components/checkoutproduct.d.ts.map +1 -1
  39. package/models/components/checkoutproduct.js +3 -27
  40. package/models/components/checkoutproduct.js.map +1 -1
  41. package/models/components/index.d.ts +0 -15
  42. package/models/components/index.d.ts.map +1 -1
  43. package/models/components/index.js +0 -15
  44. package/models/components/index.js.map +1 -1
  45. package/models/components/listresourceuserbenefit.d.ts +0 -9
  46. package/models/components/listresourceuserbenefit.d.ts.map +1 -1
  47. package/models/components/listresourceuserbenefit.js +0 -13
  48. package/models/components/listresourceuserbenefit.js.map +1 -1
  49. package/models/components/oauth2client.js +2 -2
  50. package/models/components/oauth2client.js.map +1 -1
  51. package/models/components/oauth2clientconfiguration.js +2 -2
  52. package/models/components/oauth2clientconfiguration.js.map +1 -1
  53. package/models/components/oauth2clientconfigurationupdate.js +2 -2
  54. package/models/components/oauth2clientconfigurationupdate.js.map +1 -1
  55. package/models/components/organizationfeaturesettings.d.ts +0 -5
  56. package/models/components/organizationfeaturesettings.d.ts.map +1 -1
  57. package/models/components/organizationfeaturesettings.js +0 -4
  58. package/models/components/organizationfeaturesettings.js.map +1 -1
  59. package/models/components/scope.d.ts +0 -6
  60. package/models/components/scope.d.ts.map +1 -1
  61. package/models/components/scope.js +0 -2
  62. package/models/components/scope.js.map +1 -1
  63. package/models/components/userorderproduct.d.ts +2 -24
  64. package/models/components/userorderproduct.d.ts.map +1 -1
  65. package/models/components/userorderproduct.js +3 -27
  66. package/models/components/userorderproduct.js.map +1 -1
  67. package/models/components/usersubscriptionproduct.d.ts +2 -24
  68. package/models/components/usersubscriptionproduct.d.ts.map +1 -1
  69. package/models/components/usersubscriptionproduct.js +3 -27
  70. package/models/components/usersubscriptionproduct.js.map +1 -1
  71. package/models/operations/benefitsupdate.d.ts +4 -4
  72. package/models/operations/benefitsupdate.d.ts.map +1 -1
  73. package/models/operations/benefitsupdate.js +0 -4
  74. package/models/operations/benefitsupdate.js.map +1 -1
  75. package/models/operations/index.d.ts +0 -8
  76. package/models/operations/index.d.ts.map +1 -1
  77. package/models/operations/index.js +0 -8
  78. package/models/operations/index.js.map +1 -1
  79. package/models/operations/usersbenefitsget.d.ts +2 -6
  80. package/models/operations/usersbenefitsget.d.ts.map +1 -1
  81. package/models/operations/usersbenefitsget.js +0 -6
  82. package/models/operations/usersbenefitsget.js.map +1 -1
  83. package/package.json +1 -3
  84. package/sdk/sdk.d.ts +0 -3
  85. package/sdk/sdk.d.ts.map +1 -1
  86. package/sdk/sdk.js +0 -5
  87. package/sdk/sdk.js.map +1 -1
  88. package/src/hooks/hooks.ts +20 -0
  89. package/src/hooks/types.ts +9 -0
  90. package/src/lib/config.ts +3 -3
  91. package/src/models/components/benefit.ts +0 -10
  92. package/src/models/components/benefitadssubscriber.ts +12 -15
  93. package/src/models/components/benefitgrant.ts +0 -14
  94. package/src/models/components/benefitgrantwebhook.ts +0 -22
  95. package/src/models/components/benefittype.ts +0 -1
  96. package/src/models/components/checkoutlinkproduct.ts +4 -68
  97. package/src/models/components/checkoutproduct.ts +4 -66
  98. package/src/models/components/index.ts +0 -15
  99. package/src/models/components/listresourceuserbenefit.ts +0 -30
  100. package/src/models/components/oauth2client.ts +2 -2
  101. package/src/models/components/oauth2clientconfiguration.ts +2 -2
  102. package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
  103. package/src/models/components/organizationfeaturesettings.ts +0 -9
  104. package/src/models/components/scope.ts +0 -2
  105. package/src/models/components/userorderproduct.ts +4 -60
  106. package/src/models/components/usersubscriptionproduct.ts +4 -68
  107. package/src/models/operations/benefitsupdate.ts +0 -8
  108. package/src/models/operations/index.ts +0 -8
  109. package/src/models/operations/usersbenefitsget.ts +0 -12
  110. package/src/sdk/sdk.ts +0 -6
  111. package/src/types/index.ts +1 -0
  112. package/src/types/webhooks.ts +7 -0
  113. package/types/index.d.ts +1 -0
  114. package/types/index.d.ts.map +1 -1
  115. package/types/webhooks.d.ts +4 -0
  116. package/types/webhooks.d.ts.map +1 -0
  117. package/types/webhooks.js +6 -0
  118. package/types/webhooks.js.map +1 -0
  119. package/docs/sdks/articles/README.md +0 -724
  120. package/funcs/articlesCreate.d.ts +0 -16
  121. package/funcs/articlesCreate.d.ts.map +0 -1
  122. package/funcs/articlesCreate.js +0 -99
  123. package/funcs/articlesCreate.js.map +0 -1
  124. package/funcs/articlesDelete.d.ts +0 -16
  125. package/funcs/articlesDelete.d.ts.map +0 -1
  126. package/funcs/articlesDelete.js +0 -105
  127. package/funcs/articlesDelete.js.map +0 -1
  128. package/funcs/articlesExport.d.ts +0 -16
  129. package/funcs/articlesExport.d.ts.map +0 -1
  130. package/funcs/articlesExport.js +0 -103
  131. package/funcs/articlesExport.js.map +0 -1
  132. package/funcs/articlesGet.d.ts +0 -17
  133. package/funcs/articlesGet.d.ts.map +0 -1
  134. package/funcs/articlesGet.js +0 -105
  135. package/funcs/articlesGet.js.map +0 -1
  136. package/funcs/articlesList.d.ts +0 -19
  137. package/funcs/articlesList.d.ts.map +0 -1
  138. package/funcs/articlesList.js +0 -138
  139. package/funcs/articlesList.js.map +0 -1
  140. package/funcs/articlesPreview.d.ts +0 -16
  141. package/funcs/articlesPreview.d.ts.map +0 -1
  142. package/funcs/articlesPreview.js +0 -106
  143. package/funcs/articlesPreview.js.map +0 -1
  144. package/funcs/articlesReceivers.d.ts +0 -17
  145. package/funcs/articlesReceivers.d.ts.map +0 -1
  146. package/funcs/articlesReceivers.js +0 -105
  147. package/funcs/articlesReceivers.js.map +0 -1
  148. package/funcs/articlesSend.d.ts +0 -16
  149. package/funcs/articlesSend.d.ts.map +0 -1
  150. package/funcs/articlesSend.js +0 -105
  151. package/funcs/articlesSend.js.map +0 -1
  152. package/funcs/articlesUpdate.d.ts +0 -17
  153. package/funcs/articlesUpdate.d.ts.map +0 -1
  154. package/funcs/articlesUpdate.js +0 -106
  155. package/funcs/articlesUpdate.js.map +0 -1
  156. package/models/components/article.d.ts +0 -68
  157. package/models/components/article.d.ts.map +0 -1
  158. package/models/components/article.js +0 -129
  159. package/models/components/article.js.map +0 -1
  160. package/models/components/articlebyline.d.ts +0 -28
  161. package/models/components/articlebyline.d.ts.map +0 -1
  162. package/models/components/articlebyline.js +0 -50
  163. package/models/components/articlebyline.js.map +0 -1
  164. package/models/components/articlecreate.d.ts +0 -93
  165. package/models/components/articlecreate.d.ts.map +0 -1
  166. package/models/components/articlecreate.js +0 -112
  167. package/models/components/articlecreate.js.map +0 -1
  168. package/models/components/articlepreview.d.ts +0 -32
  169. package/models/components/articlepreview.d.ts.map +0 -1
  170. package/models/components/articlepreview.js +0 -59
  171. package/models/components/articlepreview.js.map +0 -1
  172. package/models/components/articlereceivers.d.ts +0 -33
  173. package/models/components/articlereceivers.d.ts.map +0 -1
  174. package/models/components/articlereceivers.js +0 -76
  175. package/models/components/articlereceivers.js.map +0 -1
  176. package/models/components/articleupdate.d.ts +0 -85
  177. package/models/components/articleupdate.d.ts.map +0 -1
  178. package/models/components/articleupdate.js +0 -108
  179. package/models/components/articleupdate.js.map +0 -1
  180. package/models/components/articlevisibility.d.ts +0 -31
  181. package/models/components/articlevisibility.d.ts.map +0 -1
  182. package/models/components/articlevisibility.js +0 -51
  183. package/models/components/articlevisibility.js.map +0 -1
  184. package/models/components/benefitarticles.d.ts +0 -100
  185. package/models/components/benefitarticles.d.ts.map +0 -1
  186. package/models/components/benefitarticles.js +0 -107
  187. package/models/components/benefitarticles.js.map +0 -1
  188. package/models/components/benefitarticlesproperties.d.ts +0 -35
  189. package/models/components/benefitarticlesproperties.d.ts.map +0 -1
  190. package/models/components/benefitarticlesproperties.js +0 -68
  191. package/models/components/benefitarticlesproperties.js.map +0 -1
  192. package/models/components/benefitarticlessubscriber.d.ts +0 -99
  193. package/models/components/benefitarticlessubscriber.d.ts.map +0 -1
  194. package/models/components/benefitarticlessubscriber.js +0 -113
  195. package/models/components/benefitarticlessubscriber.js.map +0 -1
  196. package/models/components/benefitarticlessubscriberproperties.d.ts +0 -35
  197. package/models/components/benefitarticlessubscriberproperties.d.ts.map +0 -1
  198. package/models/components/benefitarticlessubscriberproperties.js +0 -68
  199. package/models/components/benefitarticlessubscriberproperties.js.map +0 -1
  200. package/models/components/benefitarticlesupdate.d.ts +0 -57
  201. package/models/components/benefitarticlesupdate.d.ts.map +0 -1
  202. package/models/components/benefitarticlesupdate.js +0 -79
  203. package/models/components/benefitarticlesupdate.js.map +0 -1
  204. package/models/components/benefitgrantarticlesproperties.d.ts +0 -25
  205. package/models/components/benefitgrantarticlesproperties.d.ts.map +0 -1
  206. package/models/components/benefitgrantarticlesproperties.js +0 -55
  207. package/models/components/benefitgrantarticlesproperties.js.map +0 -1
  208. package/models/components/bylineprofile.d.ts +0 -31
  209. package/models/components/bylineprofile.d.ts.map +0 -1
  210. package/models/components/bylineprofile.js +0 -70
  211. package/models/components/bylineprofile.js.map +0 -1
  212. package/models/components/listresourcearticle.d.ts +0 -33
  213. package/models/components/listresourcearticle.d.ts.map +0 -1
  214. package/models/components/listresourcearticle.js +0 -63
  215. package/models/components/listresourcearticle.js.map +0 -1
  216. package/models/operations/articlesdelete.d.ts +0 -29
  217. package/models/operations/articlesdelete.d.ts.map +0 -1
  218. package/models/operations/articlesdelete.js +0 -59
  219. package/models/operations/articlesdelete.js.map +0 -1
  220. package/models/operations/articlesexport.d.ts +0 -29
  221. package/models/operations/articlesexport.d.ts.map +0 -1
  222. package/models/operations/articlesexport.js +0 -68
  223. package/models/operations/articlesexport.js.map +0 -1
  224. package/models/operations/articlesget.d.ts +0 -29
  225. package/models/operations/articlesget.d.ts.map +0 -1
  226. package/models/operations/articlesget.js +0 -59
  227. package/models/operations/articlesget.js.map +0 -1
  228. package/models/operations/articleslist.d.ts +0 -141
  229. package/models/operations/articleslist.d.ts.map +0 -1
  230. package/models/operations/articleslist.js +0 -184
  231. package/models/operations/articleslist.js.map +0 -1
  232. package/models/operations/articlespreview.d.ts +0 -32
  233. package/models/operations/articlespreview.d.ts.map +0 -1
  234. package/models/operations/articlespreview.js +0 -71
  235. package/models/operations/articlespreview.js.map +0 -1
  236. package/models/operations/articlesreceivers.d.ts +0 -29
  237. package/models/operations/articlesreceivers.d.ts.map +0 -1
  238. package/models/operations/articlesreceivers.js +0 -59
  239. package/models/operations/articlesreceivers.js.map +0 -1
  240. package/models/operations/articlessend.d.ts +0 -29
  241. package/models/operations/articlessend.d.ts.map +0 -1
  242. package/models/operations/articlessend.js +0 -59
  243. package/models/operations/articlessend.js.map +0 -1
  244. package/models/operations/articlesupdate.d.ts +0 -32
  245. package/models/operations/articlesupdate.d.ts.map +0 -1
  246. package/models/operations/articlesupdate.js +0 -71
  247. package/models/operations/articlesupdate.js.map +0 -1
  248. package/sdk/articles.d.ts +0 -72
  249. package/sdk/articles.d.ts.map +0 -1
  250. package/sdk/articles.js +0 -103
  251. package/sdk/articles.js.map +0 -1
  252. package/src/funcs/articlesCreate.ts +0 -131
  253. package/src/funcs/articlesDelete.ts +0 -144
  254. package/src/funcs/articlesExport.ts +0 -136
  255. package/src/funcs/articlesGet.ts +0 -141
  256. package/src/funcs/articlesList.ts +0 -205
  257. package/src/funcs/articlesPreview.ts +0 -145
  258. package/src/funcs/articlesReceivers.ts +0 -138
  259. package/src/funcs/articlesSend.ts +0 -144
  260. package/src/funcs/articlesUpdate.ts +0 -145
  261. package/src/models/components/article.ts +0 -187
  262. package/src/models/components/articlebyline.ts +0 -33
  263. package/src/models/components/articlecreate.ts +0 -191
  264. package/src/models/components/articlepreview.ts +0 -65
  265. package/src/models/components/articlereceivers.ts +0 -87
  266. package/src/models/components/articleupdate.ts +0 -179
  267. package/src/models/components/articlevisibility.ts +0 -34
  268. package/src/models/components/benefitarticles.ts +0 -175
  269. package/src/models/components/benefitarticlesproperties.ts +0 -81
  270. package/src/models/components/benefitarticlessubscriber.ts +0 -189
  271. package/src/models/components/benefitarticlessubscriberproperties.ts +0 -86
  272. package/src/models/components/benefitarticlesupdate.ts +0 -102
  273. package/src/models/components/benefitgrantarticlesproperties.ts +0 -60
  274. package/src/models/components/bylineprofile.ts +0 -75
  275. package/src/models/components/listresourcearticle.ts +0 -82
  276. package/src/models/operations/articlesdelete.ts +0 -66
  277. package/src/models/operations/articlesexport.ts +0 -75
  278. package/src/models/operations/articlesget.ts +0 -66
  279. package/src/models/operations/articleslist.ts +0 -342
  280. package/src/models/operations/articlespreview.ts +0 -80
  281. package/src/models/operations/articlesreceivers.ts +0 -66
  282. package/src/models/operations/articlessend.ts +0 -66
  283. package/src/models/operations/articlesupdate.ts +0 -80
  284. package/src/sdk/articles.ts +0 -173
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- BenefitArticles,
12
- BenefitArticles$inboundSchema,
13
- BenefitArticles$Outbound,
14
- BenefitArticles$outboundSchema,
15
- } from "./benefitarticles.js";
16
10
  import {
17
11
  BenefitBase,
18
12
  BenefitBase$inboundSchema,
@@ -32,8 +26,6 @@ import {
32
26
  ProductPrice$outboundSchema,
33
27
  } from "./productprice.js";
34
28
 
35
- export type CheckoutProductBenefits = BenefitBase | BenefitArticles;
36
-
37
29
  /**
38
30
  * Product data for a checkout session.
39
31
  */
@@ -77,63 +69,13 @@ export type CheckoutProduct = {
77
69
  /**
78
70
  * List of benefits granted by the product.
79
71
  */
80
- benefits: Array<BenefitBase | BenefitArticles>;
72
+ benefits: Array<BenefitBase>;
81
73
  /**
82
74
  * List of medias associated to the product.
83
75
  */
84
76
  medias: Array<ProductMediaFileRead>;
85
77
  };
86
78
 
87
- /** @internal */
88
- export const CheckoutProductBenefits$inboundSchema: z.ZodType<
89
- CheckoutProductBenefits,
90
- z.ZodTypeDef,
91
- unknown
92
- > = z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]);
93
-
94
- /** @internal */
95
- export type CheckoutProductBenefits$Outbound =
96
- | BenefitBase$Outbound
97
- | BenefitArticles$Outbound;
98
-
99
- /** @internal */
100
- export const CheckoutProductBenefits$outboundSchema: z.ZodType<
101
- CheckoutProductBenefits$Outbound,
102
- z.ZodTypeDef,
103
- CheckoutProductBenefits
104
- > = z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]);
105
-
106
- /**
107
- * @internal
108
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
109
- */
110
- export namespace CheckoutProductBenefits$ {
111
- /** @deprecated use `CheckoutProductBenefits$inboundSchema` instead. */
112
- export const inboundSchema = CheckoutProductBenefits$inboundSchema;
113
- /** @deprecated use `CheckoutProductBenefits$outboundSchema` instead. */
114
- export const outboundSchema = CheckoutProductBenefits$outboundSchema;
115
- /** @deprecated use `CheckoutProductBenefits$Outbound` instead. */
116
- export type Outbound = CheckoutProductBenefits$Outbound;
117
- }
118
-
119
- export function checkoutProductBenefitsToJSON(
120
- checkoutProductBenefits: CheckoutProductBenefits,
121
- ): string {
122
- return JSON.stringify(
123
- CheckoutProductBenefits$outboundSchema.parse(checkoutProductBenefits),
124
- );
125
- }
126
-
127
- export function checkoutProductBenefitsFromJSON(
128
- jsonString: string,
129
- ): SafeParseResult<CheckoutProductBenefits, SDKValidationError> {
130
- return safeParse(
131
- jsonString,
132
- (x) => CheckoutProductBenefits$inboundSchema.parse(JSON.parse(x)),
133
- `Failed to parse 'CheckoutProductBenefits' from JSON`,
134
- );
135
- }
136
-
137
79
  /** @internal */
138
80
  export const CheckoutProduct$inboundSchema: z.ZodType<
139
81
  CheckoutProduct,
@@ -151,9 +93,7 @@ export const CheckoutProduct$inboundSchema: z.ZodType<
151
93
  is_archived: z.boolean(),
152
94
  organization_id: z.string(),
153
95
  prices: z.array(ProductPrice$inboundSchema),
154
- benefits: z.array(
155
- z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]),
156
- ),
96
+ benefits: z.array(BenefitBase$inboundSchema),
157
97
  medias: z.array(ProductMediaFileRead$inboundSchema),
158
98
  }).transform((v) => {
159
99
  return remap$(v, {
@@ -176,7 +116,7 @@ export type CheckoutProduct$Outbound = {
176
116
  is_archived: boolean;
177
117
  organization_id: string;
178
118
  prices: Array<ProductPrice$Outbound>;
179
- benefits: Array<BenefitBase$Outbound | BenefitArticles$Outbound>;
119
+ benefits: Array<BenefitBase$Outbound>;
180
120
  medias: Array<ProductMediaFileRead$Outbound>;
181
121
  };
182
122
 
@@ -195,9 +135,7 @@ export const CheckoutProduct$outboundSchema: z.ZodType<
195
135
  isArchived: z.boolean(),
196
136
  organizationId: z.string(),
197
137
  prices: z.array(ProductPrice$outboundSchema),
198
- benefits: z.array(
199
- z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]),
200
- ),
138
+ benefits: z.array(BenefitBase$outboundSchema),
201
139
  medias: z.array(ProductMediaFileRead$outboundSchema),
202
140
  }).transform((v) => {
203
141
  return remap$(v, {
@@ -6,13 +6,6 @@ export * from "./address.js";
6
6
  export * from "./advertisementcampaign.js";
7
7
  export * from "./advertisementcampaignlistresource.js";
8
8
  export * from "./advertisementsortproperty.js";
9
- export * from "./article.js";
10
- export * from "./articlebyline.js";
11
- export * from "./articlecreate.js";
12
- export * from "./articlepreview.js";
13
- export * from "./articlereceivers.js";
14
- export * from "./articleupdate.js";
15
- export * from "./articlevisibility.js";
16
9
  export * from "./assignee.js";
17
10
  export * from "./attachedcustomfield.js";
18
11
  export * from "./attachedcustomfieldcreate.js";
@@ -27,11 +20,6 @@ export * from "./benefitadscreate.js";
27
20
  export * from "./benefitadsproperties.js";
28
21
  export * from "./benefitadssubscriber.js";
29
22
  export * from "./benefitadsupdate.js";
30
- export * from "./benefitarticles.js";
31
- export * from "./benefitarticlesproperties.js";
32
- export * from "./benefitarticlessubscriber.js";
33
- export * from "./benefitarticlessubscriberproperties.js";
34
- export * from "./benefitarticlesupdate.js";
35
23
  export * from "./benefitbase.js";
36
24
  export * from "./benefitcreate.js";
37
25
  export * from "./benefitcustom.js";
@@ -66,7 +54,6 @@ export * from "./benefitgrant.js";
66
54
  export * from "./benefitgrantads.js";
67
55
  export * from "./benefitgrantadsproperties.js";
68
56
  export * from "./benefitgrantadssubscriberproperties.js";
69
- export * from "./benefitgrantarticlesproperties.js";
70
57
  export * from "./benefitgrantcustomproperties.js";
71
58
  export * from "./benefitgrantdiscordproperties.js";
72
59
  export * from "./benefitgrantdownloadablesproperties.js";
@@ -85,7 +72,6 @@ export * from "./benefitlicensekeyssubscriber.js";
85
72
  export * from "./benefitlicensekeyssubscriberproperties.js";
86
73
  export * from "./benefitlicensekeysupdate.js";
87
74
  export * from "./benefittype.js";
88
- export * from "./bylineprofile.js";
89
75
  export * from "./checkout.js";
90
76
  export * from "./checkoutconfirmstripe.js";
91
77
  export * from "./checkoutcreate.js";
@@ -183,7 +169,6 @@ export * from "./licensekeyupdate.js";
183
169
  export * from "./licensekeyuser.js";
184
170
  export * from "./licensekeyvalidate.js";
185
171
  export * from "./licensekeywithactivations.js";
186
- export * from "./listresourcearticle.js";
187
172
  export * from "./listresourcebenefit.js";
188
173
  export * from "./listresourcebenefitgrant.js";
189
174
  export * from "./listresourcecheckout.js";
@@ -12,12 +12,6 @@ import {
12
12
  BenefitAdsSubscriber$Outbound,
13
13
  BenefitAdsSubscriber$outboundSchema,
14
14
  } from "./benefitadssubscriber.js";
15
- import {
16
- BenefitArticlesSubscriber,
17
- BenefitArticlesSubscriber$inboundSchema,
18
- BenefitArticlesSubscriber$Outbound,
19
- BenefitArticlesSubscriber$outboundSchema,
20
- } from "./benefitarticlessubscriber.js";
21
15
  import {
22
16
  BenefitCustomSubscriber,
23
17
  BenefitCustomSubscriber$inboundSchema,
@@ -57,7 +51,6 @@ import {
57
51
 
58
52
  export type UserBenefit =
59
53
  | (BenefitAdsSubscriber & { type: "ads" })
60
- | (BenefitArticlesSubscriber & { type: "articles" })
61
54
  | (BenefitCustomSubscriber & { type: "custom" })
62
55
  | (BenefitDiscordSubscriber & { type: "discord" })
63
56
  | (BenefitDownloadablesSubscriber & { type: "downloadables" })
@@ -67,7 +60,6 @@ export type UserBenefit =
67
60
  export type ListResourceUserBenefit = {
68
61
  items: Array<
69
62
  | (BenefitAdsSubscriber & { type: "ads" })
70
- | (BenefitArticlesSubscriber & { type: "articles" })
71
63
  | (BenefitCustomSubscriber & { type: "custom" })
72
64
  | (BenefitDiscordSubscriber & { type: "discord" })
73
65
  | (BenefitDownloadablesSubscriber & { type: "downloadables" })
@@ -86,11 +78,6 @@ export const UserBenefit$inboundSchema: z.ZodType<
86
78
  BenefitAdsSubscriber$inboundSchema.and(
87
79
  z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })),
88
80
  ),
89
- BenefitArticlesSubscriber$inboundSchema.and(
90
- z.object({ type: z.literal("articles") }).transform((v) => ({
91
- type: v.type,
92
- })),
93
- ),
94
81
  BenefitCustomSubscriber$inboundSchema.and(
95
82
  z.object({ type: z.literal("custom") }).transform((v) => ({
96
83
  type: v.type,
@@ -121,7 +108,6 @@ export const UserBenefit$inboundSchema: z.ZodType<
121
108
  /** @internal */
122
109
  export type UserBenefit$Outbound =
123
110
  | (BenefitAdsSubscriber$Outbound & { type: "ads" })
124
- | (BenefitArticlesSubscriber$Outbound & { type: "articles" })
125
111
  | (BenefitCustomSubscriber$Outbound & { type: "custom" })
126
112
  | (BenefitDiscordSubscriber$Outbound & { type: "discord" })
127
113
  | (BenefitDownloadablesSubscriber$Outbound & { type: "downloadables" })
@@ -137,11 +123,6 @@ export const UserBenefit$outboundSchema: z.ZodType<
137
123
  BenefitAdsSubscriber$outboundSchema.and(
138
124
  z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })),
139
125
  ),
140
- BenefitArticlesSubscriber$outboundSchema.and(
141
- z.object({ type: z.literal("articles") }).transform((v) => ({
142
- type: v.type,
143
- })),
144
- ),
145
126
  BenefitCustomSubscriber$outboundSchema.and(
146
127
  z.object({ type: z.literal("custom") }).transform((v) => ({
147
128
  type: v.type,
@@ -209,11 +190,6 @@ export const ListResourceUserBenefit$inboundSchema: z.ZodType<
209
190
  type: v.type,
210
191
  })),
211
192
  ),
212
- BenefitArticlesSubscriber$inboundSchema.and(
213
- z.object({ type: z.literal("articles") }).transform((v) => ({
214
- type: v.type,
215
- })),
216
- ),
217
193
  BenefitCustomSubscriber$inboundSchema.and(
218
194
  z.object({ type: z.literal("custom") }).transform((v) => ({
219
195
  type: v.type,
@@ -248,7 +224,6 @@ export const ListResourceUserBenefit$inboundSchema: z.ZodType<
248
224
  export type ListResourceUserBenefit$Outbound = {
249
225
  items: Array<
250
226
  | (BenefitAdsSubscriber$Outbound & { type: "ads" })
251
- | (BenefitArticlesSubscriber$Outbound & { type: "articles" })
252
227
  | (BenefitCustomSubscriber$Outbound & { type: "custom" })
253
228
  | (BenefitDiscordSubscriber$Outbound & { type: "discord" })
254
229
  | (BenefitDownloadablesSubscriber$Outbound & { type: "downloadables" })
@@ -273,11 +248,6 @@ export const ListResourceUserBenefit$outboundSchema: z.ZodType<
273
248
  type: v.type,
274
249
  })),
275
250
  ),
276
- BenefitArticlesSubscriber$outboundSchema.and(
277
- z.object({ type: z.literal("articles") }).transform((v) => ({
278
- type: v.type,
279
- })),
280
- ),
281
251
  BenefitCustomSubscriber$outboundSchema.and(
282
252
  z.object({ type: z.literal("custom") }).transform((v) => ({
283
253
  type: v.type,
@@ -128,7 +128,7 @@ export const OAuth2Client$inboundSchema: z.ZodType<
128
128
  grant_types: z.array(GrantTypes$inboundSchema).optional(),
129
129
  response_types: z.array(ResponseTypes$inboundSchema).optional(),
130
130
  scope: z.string().default(
131
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
131
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
132
132
  ),
133
133
  client_name: z.string(),
134
134
  client_uri: z.nullable(z.string()).optional(),
@@ -196,7 +196,7 @@ export const OAuth2Client$outboundSchema: z.ZodType<
196
196
  grantTypes: z.array(GrantTypes$outboundSchema).optional(),
197
197
  responseTypes: z.array(ResponseTypes$outboundSchema).optional(),
198
198
  scope: z.string().default(
199
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
199
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
200
200
  ),
201
201
  clientName: z.string(),
202
202
  clientUri: z.nullable(z.string()).optional(),
@@ -134,7 +134,7 @@ export const OAuth2ClientConfiguration$inboundSchema: z.ZodType<
134
134
  response_types: z.array(OAuth2ClientConfigurationResponseTypes$inboundSchema)
135
135
  .optional(),
136
136
  scope: z.string().default(
137
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
137
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
138
138
  ),
139
139
  client_name: z.string(),
140
140
  client_uri: z.nullable(z.string()).optional(),
@@ -185,7 +185,7 @@ export const OAuth2ClientConfiguration$outboundSchema: z.ZodType<
185
185
  responseTypes: z.array(OAuth2ClientConfigurationResponseTypes$outboundSchema)
186
186
  .optional(),
187
187
  scope: z.string().default(
188
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
188
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
189
189
  ),
190
190
  clientName: z.string(),
191
191
  clientUri: z.nullable(z.string()).optional(),
@@ -138,7 +138,7 @@ export const OAuth2ClientConfigurationUpdate$inboundSchema: z.ZodType<
138
138
  OAuth2ClientConfigurationUpdateResponseTypes$inboundSchema,
139
139
  ).optional(),
140
140
  scope: z.string().default(
141
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
141
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
142
142
  ),
143
143
  client_name: z.string(),
144
144
  client_uri: z.nullable(z.string()).optional(),
@@ -192,7 +192,7 @@ export const OAuth2ClientConfigurationUpdate$outboundSchema: z.ZodType<
192
192
  OAuth2ClientConfigurationUpdateResponseTypes$outboundSchema,
193
193
  ).optional(),
194
194
  scope: z.string().default(
195
- "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
195
+ "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
196
196
  ),
197
197
  clientName: z.string(),
198
198
  clientUri: z.nullable(z.string()).optional(),
@@ -9,10 +9,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type OrganizationFeatureSettings = {
12
- /**
13
- * If this organization has articles enabled
14
- */
15
- articlesEnabled?: boolean | undefined;
16
12
  /**
17
13
  * If this organization has issue funding enabled
18
14
  */
@@ -25,18 +21,15 @@ export const OrganizationFeatureSettings$inboundSchema: z.ZodType<
25
21
  z.ZodTypeDef,
26
22
  unknown
27
23
  > = z.object({
28
- articles_enabled: z.boolean().default(false),
29
24
  issue_funding_enabled: z.boolean().default(false),
30
25
  }).transform((v) => {
31
26
  return remap$(v, {
32
- "articles_enabled": "articlesEnabled",
33
27
  "issue_funding_enabled": "issueFundingEnabled",
34
28
  });
35
29
  });
36
30
 
37
31
  /** @internal */
38
32
  export type OrganizationFeatureSettings$Outbound = {
39
- articles_enabled: boolean;
40
33
  issue_funding_enabled: boolean;
41
34
  };
42
35
 
@@ -46,11 +39,9 @@ export const OrganizationFeatureSettings$outboundSchema: z.ZodType<
46
39
  z.ZodTypeDef,
47
40
  OrganizationFeatureSettings
48
41
  > = z.object({
49
- articlesEnabled: z.boolean().default(false),
50
42
  issueFundingEnabled: z.boolean().default(false),
51
43
  }).transform((v) => {
52
44
  return remap$(v, {
53
- articlesEnabled: "articles_enabled",
54
45
  issueFundingEnabled: "issue_funding_enabled",
55
46
  });
56
47
  });
@@ -32,8 +32,6 @@ export const Scope = {
32
32
  SubscriptionsWrite: "subscriptions:write",
33
33
  OrdersRead: "orders:read",
34
34
  MetricsRead: "metrics:read",
35
- ArticlesRead: "articles:read",
36
- ArticlesWrite: "articles:write",
37
35
  WebhooksRead: "webhooks:read",
38
36
  WebhooksWrite: "webhooks:write",
39
37
  ExternalOrganizationsRead: "external_organizations:read",
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- BenefitArticles,
12
- BenefitArticles$inboundSchema,
13
- BenefitArticles$Outbound,
14
- BenefitArticles$outboundSchema,
15
- } from "./benefitarticles.js";
16
10
  import {
17
11
  BenefitBase,
18
12
  BenefitBase$inboundSchema,
@@ -38,8 +32,6 @@ import {
38
32
  ProductPrice$outboundSchema,
39
33
  } from "./productprice.js";
40
34
 
41
- export type Benefits = BenefitBase | BenefitArticles;
42
-
43
35
  export type UserOrderProduct = {
44
36
  /**
45
37
  * Creation timestamp of the object.
@@ -80,7 +72,7 @@ export type UserOrderProduct = {
80
72
  /**
81
73
  * List of benefits granted by the product.
82
74
  */
83
- benefits: Array<BenefitBase | BenefitArticles>;
75
+ benefits: Array<BenefitBase>;
84
76
  /**
85
77
  * List of medias associated to the product.
86
78
  */
@@ -88,50 +80,6 @@ export type UserOrderProduct = {
88
80
  organization: Organization;
89
81
  };
90
82
 
91
- /** @internal */
92
- export const Benefits$inboundSchema: z.ZodType<
93
- Benefits,
94
- z.ZodTypeDef,
95
- unknown
96
- > = z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]);
97
-
98
- /** @internal */
99
- export type Benefits$Outbound = BenefitBase$Outbound | BenefitArticles$Outbound;
100
-
101
- /** @internal */
102
- export const Benefits$outboundSchema: z.ZodType<
103
- Benefits$Outbound,
104
- z.ZodTypeDef,
105
- Benefits
106
- > = z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]);
107
-
108
- /**
109
- * @internal
110
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
- */
112
- export namespace Benefits$ {
113
- /** @deprecated use `Benefits$inboundSchema` instead. */
114
- export const inboundSchema = Benefits$inboundSchema;
115
- /** @deprecated use `Benefits$outboundSchema` instead. */
116
- export const outboundSchema = Benefits$outboundSchema;
117
- /** @deprecated use `Benefits$Outbound` instead. */
118
- export type Outbound = Benefits$Outbound;
119
- }
120
-
121
- export function benefitsToJSON(benefits: Benefits): string {
122
- return JSON.stringify(Benefits$outboundSchema.parse(benefits));
123
- }
124
-
125
- export function benefitsFromJSON(
126
- jsonString: string,
127
- ): SafeParseResult<Benefits, SDKValidationError> {
128
- return safeParse(
129
- jsonString,
130
- (x) => Benefits$inboundSchema.parse(JSON.parse(x)),
131
- `Failed to parse 'Benefits' from JSON`,
132
- );
133
- }
134
-
135
83
  /** @internal */
136
84
  export const UserOrderProduct$inboundSchema: z.ZodType<
137
85
  UserOrderProduct,
@@ -149,9 +97,7 @@ export const UserOrderProduct$inboundSchema: z.ZodType<
149
97
  is_archived: z.boolean(),
150
98
  organization_id: z.string(),
151
99
  prices: z.array(ProductPrice$inboundSchema),
152
- benefits: z.array(
153
- z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]),
154
- ),
100
+ benefits: z.array(BenefitBase$inboundSchema),
155
101
  medias: z.array(ProductMediaFileRead$inboundSchema),
156
102
  organization: Organization$inboundSchema,
157
103
  }).transform((v) => {
@@ -175,7 +121,7 @@ export type UserOrderProduct$Outbound = {
175
121
  is_archived: boolean;
176
122
  organization_id: string;
177
123
  prices: Array<ProductPrice$Outbound>;
178
- benefits: Array<BenefitBase$Outbound | BenefitArticles$Outbound>;
124
+ benefits: Array<BenefitBase$Outbound>;
179
125
  medias: Array<ProductMediaFileRead$Outbound>;
180
126
  organization: Organization$Outbound;
181
127
  };
@@ -195,9 +141,7 @@ export const UserOrderProduct$outboundSchema: z.ZodType<
195
141
  isArchived: z.boolean(),
196
142
  organizationId: z.string(),
197
143
  prices: z.array(ProductPrice$outboundSchema),
198
- benefits: z.array(
199
- z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]),
200
- ),
144
+ benefits: z.array(BenefitBase$outboundSchema),
201
145
  medias: z.array(ProductMediaFileRead$outboundSchema),
202
146
  organization: Organization$outboundSchema,
203
147
  }).transform((v) => {
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- BenefitArticles,
12
- BenefitArticles$inboundSchema,
13
- BenefitArticles$Outbound,
14
- BenefitArticles$outboundSchema,
15
- } from "./benefitarticles.js";
16
10
  import {
17
11
  BenefitBase,
18
12
  BenefitBase$inboundSchema,
@@ -38,8 +32,6 @@ import {
38
32
  ProductPrice$outboundSchema,
39
33
  } from "./productprice.js";
40
34
 
41
- export type UserSubscriptionProductBenefits = BenefitBase | BenefitArticles;
42
-
43
35
  export type UserSubscriptionProduct = {
44
36
  /**
45
37
  * Creation timestamp of the object.
@@ -80,7 +72,7 @@ export type UserSubscriptionProduct = {
80
72
  /**
81
73
  * List of benefits granted by the product.
82
74
  */
83
- benefits: Array<BenefitBase | BenefitArticles>;
75
+ benefits: Array<BenefitBase>;
84
76
  /**
85
77
  * List of medias associated to the product.
86
78
  */
@@ -88,58 +80,6 @@ export type UserSubscriptionProduct = {
88
80
  organization: Organization;
89
81
  };
90
82
 
91
- /** @internal */
92
- export const UserSubscriptionProductBenefits$inboundSchema: z.ZodType<
93
- UserSubscriptionProductBenefits,
94
- z.ZodTypeDef,
95
- unknown
96
- > = z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]);
97
-
98
- /** @internal */
99
- export type UserSubscriptionProductBenefits$Outbound =
100
- | BenefitBase$Outbound
101
- | BenefitArticles$Outbound;
102
-
103
- /** @internal */
104
- export const UserSubscriptionProductBenefits$outboundSchema: z.ZodType<
105
- UserSubscriptionProductBenefits$Outbound,
106
- z.ZodTypeDef,
107
- UserSubscriptionProductBenefits
108
- > = z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]);
109
-
110
- /**
111
- * @internal
112
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
113
- */
114
- export namespace UserSubscriptionProductBenefits$ {
115
- /** @deprecated use `UserSubscriptionProductBenefits$inboundSchema` instead. */
116
- export const inboundSchema = UserSubscriptionProductBenefits$inboundSchema;
117
- /** @deprecated use `UserSubscriptionProductBenefits$outboundSchema` instead. */
118
- export const outboundSchema = UserSubscriptionProductBenefits$outboundSchema;
119
- /** @deprecated use `UserSubscriptionProductBenefits$Outbound` instead. */
120
- export type Outbound = UserSubscriptionProductBenefits$Outbound;
121
- }
122
-
123
- export function userSubscriptionProductBenefitsToJSON(
124
- userSubscriptionProductBenefits: UserSubscriptionProductBenefits,
125
- ): string {
126
- return JSON.stringify(
127
- UserSubscriptionProductBenefits$outboundSchema.parse(
128
- userSubscriptionProductBenefits,
129
- ),
130
- );
131
- }
132
-
133
- export function userSubscriptionProductBenefitsFromJSON(
134
- jsonString: string,
135
- ): SafeParseResult<UserSubscriptionProductBenefits, SDKValidationError> {
136
- return safeParse(
137
- jsonString,
138
- (x) => UserSubscriptionProductBenefits$inboundSchema.parse(JSON.parse(x)),
139
- `Failed to parse 'UserSubscriptionProductBenefits' from JSON`,
140
- );
141
- }
142
-
143
83
  /** @internal */
144
84
  export const UserSubscriptionProduct$inboundSchema: z.ZodType<
145
85
  UserSubscriptionProduct,
@@ -157,9 +97,7 @@ export const UserSubscriptionProduct$inboundSchema: z.ZodType<
157
97
  is_archived: z.boolean(),
158
98
  organization_id: z.string(),
159
99
  prices: z.array(ProductPrice$inboundSchema),
160
- benefits: z.array(
161
- z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]),
162
- ),
100
+ benefits: z.array(BenefitBase$inboundSchema),
163
101
  medias: z.array(ProductMediaFileRead$inboundSchema),
164
102
  organization: Organization$inboundSchema,
165
103
  }).transform((v) => {
@@ -183,7 +121,7 @@ export type UserSubscriptionProduct$Outbound = {
183
121
  is_archived: boolean;
184
122
  organization_id: string;
185
123
  prices: Array<ProductPrice$Outbound>;
186
- benefits: Array<BenefitBase$Outbound | BenefitArticles$Outbound>;
124
+ benefits: Array<BenefitBase$Outbound>;
187
125
  medias: Array<ProductMediaFileRead$Outbound>;
188
126
  organization: Organization$Outbound;
189
127
  };
@@ -203,9 +141,7 @@ export const UserSubscriptionProduct$outboundSchema: z.ZodType<
203
141
  isArchived: z.boolean(),
204
142
  organizationId: z.string(),
205
143
  prices: z.array(ProductPrice$outboundSchema),
206
- benefits: z.array(
207
- z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]),
208
- ),
144
+ benefits: z.array(BenefitBase$outboundSchema),
209
145
  medias: z.array(ProductMediaFileRead$outboundSchema),
210
146
  organization: Organization$outboundSchema,
211
147
  }).transform((v) => {
@@ -10,7 +10,6 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type BenefitsUpdateBenefitUpdate =
13
- | components.BenefitArticlesUpdate
14
13
  | components.BenefitAdsUpdate
15
14
  | components.BenefitCustomUpdate
16
15
  | components.BenefitDiscordUpdate
@@ -21,7 +20,6 @@ export type BenefitsUpdateBenefitUpdate =
21
20
  export type BenefitsUpdateRequest = {
22
21
  id: string;
23
22
  requestBody:
24
- | components.BenefitArticlesUpdate
25
23
  | components.BenefitAdsUpdate
26
24
  | components.BenefitCustomUpdate
27
25
  | components.BenefitDiscordUpdate
@@ -36,7 +34,6 @@ export const BenefitsUpdateBenefitUpdate$inboundSchema: z.ZodType<
36
34
  z.ZodTypeDef,
37
35
  unknown
38
36
  > = z.union([
39
- components.BenefitArticlesUpdate$inboundSchema,
40
37
  components.BenefitAdsUpdate$inboundSchema,
41
38
  components.BenefitCustomUpdate$inboundSchema,
42
39
  components.BenefitDiscordUpdate$inboundSchema,
@@ -47,7 +44,6 @@ export const BenefitsUpdateBenefitUpdate$inboundSchema: z.ZodType<
47
44
 
48
45
  /** @internal */
49
46
  export type BenefitsUpdateBenefitUpdate$Outbound =
50
- | components.BenefitArticlesUpdate$Outbound
51
47
  | components.BenefitAdsUpdate$Outbound
52
48
  | components.BenefitCustomUpdate$Outbound
53
49
  | components.BenefitDiscordUpdate$Outbound
@@ -61,7 +57,6 @@ export const BenefitsUpdateBenefitUpdate$outboundSchema: z.ZodType<
61
57
  z.ZodTypeDef,
62
58
  BenefitsUpdateBenefitUpdate
63
59
  > = z.union([
64
- components.BenefitArticlesUpdate$outboundSchema,
65
60
  components.BenefitAdsUpdate$outboundSchema,
66
61
  components.BenefitCustomUpdate$outboundSchema,
67
62
  components.BenefitDiscordUpdate$outboundSchema,
@@ -111,7 +106,6 @@ export const BenefitsUpdateRequest$inboundSchema: z.ZodType<
111
106
  > = z.object({
112
107
  id: z.string(),
113
108
  RequestBody: z.union([
114
- components.BenefitArticlesUpdate$inboundSchema,
115
109
  components.BenefitAdsUpdate$inboundSchema,
116
110
  components.BenefitCustomUpdate$inboundSchema,
117
111
  components.BenefitDiscordUpdate$inboundSchema,
@@ -129,7 +123,6 @@ export const BenefitsUpdateRequest$inboundSchema: z.ZodType<
129
123
  export type BenefitsUpdateRequest$Outbound = {
130
124
  id: string;
131
125
  RequestBody:
132
- | components.BenefitArticlesUpdate$Outbound
133
126
  | components.BenefitAdsUpdate$Outbound
134
127
  | components.BenefitCustomUpdate$Outbound
135
128
  | components.BenefitDiscordUpdate$Outbound
@@ -146,7 +139,6 @@ export const BenefitsUpdateRequest$outboundSchema: z.ZodType<
146
139
  > = z.object({
147
140
  id: z.string(),
148
141
  requestBody: z.union([
149
- components.BenefitArticlesUpdate$outboundSchema,
150
142
  components.BenefitAdsUpdate$outboundSchema,
151
143
  components.BenefitCustomUpdate$outboundSchema,
152
144
  components.BenefitDiscordUpdate$outboundSchema,