@polyester/sdk 0.32.1-devnet-20261102140938 → 0.32.2-devnet-20261102164441

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 (47) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +2 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/gen/changelog/v1/changelog_pb.d.ts +643 -0
  7. package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -0
  8. package/dist/gen/changelog/v1/changelog_pb.js +272 -0
  9. package/dist/gen/changelog/v1/changelog_pb.js.map +1 -0
  10. package/dist/gen/index.d.ts +2 -1
  11. package/dist/gen/index.js +2 -1
  12. package/dist/index.d.ts +4 -1
  13. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  14. package/dist/services/balances/balances.schemas.d.ts +3 -3
  15. package/dist/services/changelog/changelog.codecs.d.ts +13 -0
  16. package/dist/services/changelog/changelog.codecs.d.ts.map +1 -0
  17. package/dist/services/changelog/changelog.codecs.js +83 -0
  18. package/dist/services/changelog/changelog.codecs.js.map +1 -0
  19. package/dist/services/changelog/changelog.d.ts +36 -0
  20. package/dist/services/changelog/changelog.d.ts.map +1 -0
  21. package/dist/services/changelog/changelog.js +53 -0
  22. package/dist/services/changelog/changelog.js.map +1 -0
  23. package/dist/services/changelog/changelog.schemas.d.ts +358 -0
  24. package/dist/services/changelog/changelog.schemas.d.ts.map +1 -0
  25. package/dist/services/changelog/changelog.schemas.js +101 -0
  26. package/dist/services/changelog/changelog.schemas.js.map +1 -0
  27. package/dist/services/changelog/changelog.types.d.ts +3 -0
  28. package/dist/services/changelog/service.d.ts +8 -0
  29. package/dist/services/changelog/service.d.ts.map +1 -0
  30. package/dist/services/changelog/service.js +9 -0
  31. package/dist/services/changelog/service.js.map +1 -0
  32. package/dist/services/checkpoints/checkpoints.schemas.d.ts +3 -3
  33. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  34. package/dist/services/lifecycle/lifecycle.schemas.d.ts +133 -133
  35. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  36. package/dist/services/orders/orders-batch.schemas.d.ts +5 -5
  37. package/dist/services/orders/orders-output.schemas.d.ts +11 -11
  38. package/dist/services/rewards/rewards.schemas.d.ts +3 -3
  39. package/dist/services/subaccounts/subaccounts.schemas.d.ts +13 -13
  40. package/dist/services/trades/trades.schemas.d.ts +2 -2
  41. package/dist/services/transfers/transfers.schemas.d.ts +1 -1
  42. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  43. package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
  44. package/dist/wired-services.d.ts.map +1 -1
  45. package/dist/wired-services.js +2 -0
  46. package/dist/wired-services.js.map +1 -1
  47. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ import { PublicApiTransports } from "../../shared/transports.js";
2
+ import { PolyesterRequestOptions } from "../../shared/request-options.js";
3
+ import { ChangelogPost, GetChangelogPostInput, ListChangelogChangesInput, ListChangelogChangesResult, ListChangelogPostsInput, ListChangelogPostsResult } from "./changelog.schemas.js";
4
+ //#region src/services/changelog/changelog.d.ts
5
+ /**
6
+ * Reads the product changelog published for the environment the client calls. Public and
7
+ * read-only: no authentication, cacheable GET requests, rate-limited per client address.
8
+ * Enum values the SDK does not know decode as `"unspecified"`.
9
+ */
10
+ declare class ChangelogService {
11
+ #private;
12
+ constructor(transports: PublicApiTransports);
13
+ /**
14
+ * Lists post summaries newest first, with change counts by kind. Pass the previous
15
+ * `nextPageToken` as `pageToken` to continue; an empty `nextPageToken` means no more posts.
16
+ * Use `limit: 1` to poll for the latest post.
17
+ */
18
+ listPosts(input?: ListChangelogPostsInput, options?: PolyesterRequestOptions): Promise<ListChangelogPostsResult>;
19
+ /**
20
+ * Returns one post with every section and change. A slug is the post's coverage cutoff date,
21
+ * `YYYY-MM-DD`, with `-2`, `-3` for later posts on the same day. An unknown slug throws a
22
+ * not-found error. Large posts can hold hundreds of changes; page them with `listChanges`
23
+ * and `postSlug` instead.
24
+ */
25
+ getPost(input: GetChangelogPostInput, options?: PolyesterRequestOptions): Promise<ChangelogPost>;
26
+ /**
27
+ * Lists individual changes across posts, posts newest first unless `sort` is `"asc"`;
28
+ * changes keep publication order inside each post. Changes addressed to `all_users` match
29
+ * every `audiences` filter. Reuse a `pageToken` only with the same filters, time bounds and
30
+ * sort.
31
+ */
32
+ listChanges(input?: ListChangelogChangesInput, options?: PolyesterRequestOptions): Promise<ListChangelogChangesResult>;
33
+ }
34
+ //#endregion
35
+ export { ChangelogService };
36
+ //# sourceMappingURL=changelog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.d.ts","names":[],"sources":["../../../src/services/changelog/changelog.ts"],"mappings":";;;;;;;;;cA4Ba;;EAGG,YAAA,YAAY;;;;;;EASlB,UACF,QAAO,yBACP,UAAU,0BACX,QAAQ;;;;;;;EAYL,QACF,OAAO,uBACP,UAAU,0BACX,QAAQ;;;;;;;EAYL,YACF,QAAO,2BACP,UAAU,0BACX,QAAQ"}
@@ -0,0 +1,53 @@
1
+ import { parse } from "../../shared/validation.js";
2
+ import { toConnectCallOptions } from "../../shared/request-options.js";
3
+ import { ChangelogService as ChangelogService$1 } from "../../gen/changelog/v1/changelog_pb.js";
4
+ import { GetChangelogPostInputSchema, GetChangelogPostResultSchema, ListChangelogChangesInputSchema, ListChangelogChangesResultSchema, ListChangelogPostsInputSchema, ListChangelogPostsResultSchema } from "./changelog.schemas.js";
5
+ import { createClient } from "@connectrpc/connect";
6
+ //#region src/services/changelog/changelog.ts
7
+ /**
8
+ * Reads the product changelog published for the environment the client calls. Public and
9
+ * read-only: no authentication, cacheable GET requests, rate-limited per client address.
10
+ * Enum values the SDK does not know decode as `"unspecified"`.
11
+ */
12
+ var ChangelogService = class {
13
+ #client;
14
+ constructor(transports) {
15
+ this.#client = createClient(ChangelogService$1, transports.publicApi);
16
+ }
17
+ /**
18
+ * Lists post summaries newest first, with change counts by kind. Pass the previous
19
+ * `nextPageToken` as `pageToken` to continue; an empty `nextPageToken` means no more posts.
20
+ * Use `limit: 1` to poll for the latest post.
21
+ */
22
+ async listPosts(input = {}, options) {
23
+ const request = parse(ListChangelogPostsInputSchema, input);
24
+ const response = await this.#client.listPosts(request, toConnectCallOptions(options));
25
+ return parse(ListChangelogPostsResultSchema, response);
26
+ }
27
+ /**
28
+ * Returns one post with every section and change. A slug is the post's coverage cutoff date,
29
+ * `YYYY-MM-DD`, with `-2`, `-3` for later posts on the same day. An unknown slug throws a
30
+ * not-found error. Large posts can hold hundreds of changes; page them with `listChanges`
31
+ * and `postSlug` instead.
32
+ */
33
+ async getPost(input, options) {
34
+ const request = parse(GetChangelogPostInputSchema, input);
35
+ const response = await this.#client.getPost(request, toConnectCallOptions(options));
36
+ return parse(GetChangelogPostResultSchema, response).post;
37
+ }
38
+ /**
39
+ * Lists individual changes across posts, posts newest first unless `sort` is `"asc"`;
40
+ * changes keep publication order inside each post. Changes addressed to `all_users` match
41
+ * every `audiences` filter. Reuse a `pageToken` only with the same filters, time bounds and
42
+ * sort.
43
+ */
44
+ async listChanges(input = {}, options) {
45
+ const request = parse(ListChangelogChangesInputSchema, input);
46
+ const response = await this.#client.listChanges(request, toConnectCallOptions(options));
47
+ return parse(ListChangelogChangesResultSchema, response);
48
+ }
49
+ };
50
+ //#endregion
51
+ export { ChangelogService };
52
+
53
+ //# sourceMappingURL=changelog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.js","names":["#client","Proto.ChangelogService"],"sources":["../../../src/services/changelog/changelog.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/changelog/v1/changelog_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { PublicApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n GetChangelogPostInputSchema,\n GetChangelogPostResultSchema,\n ListChangelogChangesInputSchema,\n ListChangelogChangesResultSchema,\n ListChangelogPostsInputSchema,\n ListChangelogPostsResultSchema,\n type ChangelogPost,\n type GetChangelogPostInput,\n type ListChangelogChangesInput,\n type ListChangelogChangesResult,\n type ListChangelogPostsInput,\n type ListChangelogPostsResult,\n} from \"./changelog.schemas.js\";\n\n/**\n * Reads the product changelog published for the environment the client calls. Public and\n * read-only: no authentication, cacheable GET requests, rate-limited per client address.\n * Enum values the SDK does not know decode as `\"unspecified\"`.\n */\nexport class ChangelogService {\n #client: Client<typeof Proto.ChangelogService>;\n\n constructor(transports: PublicApiTransports) {\n this.#client = createClient(Proto.ChangelogService, transports.publicApi);\n }\n\n /**\n * Lists post summaries newest first, with change counts by kind. Pass the previous\n * `nextPageToken` as `pageToken` to continue; an empty `nextPageToken` means no more posts.\n * Use `limit: 1` to poll for the latest post.\n */\n async listPosts(\n input: ListChangelogPostsInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<ListChangelogPostsResult> {\n const request = parse(ListChangelogPostsInputSchema, input);\n const response = await this.#client.listPosts(request, toConnectCallOptions(options));\n return parse(ListChangelogPostsResultSchema, response);\n }\n\n /**\n * Returns one post with every section and change. A slug is the post's coverage cutoff date,\n * `YYYY-MM-DD`, with `-2`, `-3` for later posts on the same day. An unknown slug throws a\n * not-found error. Large posts can hold hundreds of changes; page them with `listChanges`\n * and `postSlug` instead.\n */\n async getPost(\n input: GetChangelogPostInput,\n options?: PolyesterRequestOptions,\n ): Promise<ChangelogPost> {\n const request = parse(GetChangelogPostInputSchema, input);\n const response = await this.#client.getPost(request, toConnectCallOptions(options));\n return parse(GetChangelogPostResultSchema, response).post;\n }\n\n /**\n * Lists individual changes across posts, posts newest first unless `sort` is `\"asc\"`;\n * changes keep publication order inside each post. Changes addressed to `all_users` match\n * every `audiences` filter. Reuse a `pageToken` only with the same filters, time bounds and\n * sort.\n */\n async listChanges(\n input: ListChangelogChangesInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<ListChangelogChangesResult> {\n const request = parse(ListChangelogChangesInputSchema, input);\n const response = await this.#client.listChanges(request, toConnectCallOptions(options));\n return parse(ListChangelogChangesResultSchema, response);\n }\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAa,mBAAb,MAA8B;CAC1B;CAEA,YAAY,YAAiC;EACzC,KAAKA,UAAU,aAAaC,oBAAwB,WAAW,SAAS;CAC5E;;;;;;CAOA,MAAM,UACF,QAAiC,CAAC,GAClC,SACiC;EACjC,MAAM,UAAU,MAAM,+BAA+B,KAAK;EAC1D,MAAM,WAAW,MAAM,KAAKD,QAAQ,UAAU,SAAS,qBAAqB,OAAO,CAAC;EACpF,OAAO,MAAM,gCAAgC,QAAQ;CACzD;;;;;;;CAQA,MAAM,QACF,OACA,SACsB;EACtB,MAAM,UAAU,MAAM,6BAA6B,KAAK;EACxD,MAAM,WAAW,MAAM,KAAKA,QAAQ,QAAQ,SAAS,qBAAqB,OAAO,CAAC;EAClF,OAAO,MAAM,8BAA8B,QAAQ,CAAC,CAAC;CACzD;;;;;;;CAQA,MAAM,YACF,QAAmC,CAAC,GACpC,SACmC;EACnC,MAAM,UAAU,MAAM,iCAAiC,KAAK;EAC5D,MAAM,WAAW,MAAM,KAAKA,QAAQ,YAAY,SAAS,qBAAqB,OAAO,CAAC;EACtF,OAAO,MAAM,kCAAkC,QAAQ;CAC3D;AACJ"}
@@ -0,0 +1,358 @@
1
+ import { Audience, ChangeCategory, SortDirection, Surface } from "../../gen/changelog/v1/changelog_pb.js";
2
+ import * as v from "valibot";
3
+ //#region src/services/changelog/changelog.schemas.d.ts
4
+ /** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */
5
+ declare const ListChangelogPostsInputSchema: v.StrictObjectSchema<{
6
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 100, undefined>]>, 0>;
7
+ readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
8
+ }, undefined>;
9
+ type ListChangelogPostsInput = v.InferInput<typeof ListChangelogPostsInputSchema>;
10
+ declare const GetChangelogPostInputSchema: v.StrictObjectSchema<{
11
+ readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
12
+ }, undefined>;
13
+ type GetChangelogPostInput = v.InferInput<typeof GetChangelogPostInputSchema>;
14
+ /**
15
+ * Filters on different fields combine with AND; values within one field combine with OR.
16
+ * Times are epoch milliseconds on post publication time: `startTime` inclusive, `endTime`
17
+ * exclusive and after `startTime`. `limit` is 0 through 500; 0 or omitted uses the server
18
+ * default of 100.
19
+ */
20
+ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
21
+ readonly categories: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["breaking_change", "new_feature", "improvement", "bug_fix"], undefined>, undefined>, readonly []>;
22
+ readonly actionRequired: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
23
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trading", "funding", "accounts", "api", "explorer", "documentation", "platform"], undefined>, undefined>, readonly []>;
24
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["all_users", "traders", "market_makers", "developers"], undefined>, undefined>, readonly []>;
25
+ readonly startTime: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
26
+ readonly endTime: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
27
+ readonly postSlug: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
28
+ readonly sort: v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, undefined>;
29
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 500, undefined>]>, 0>;
30
+ readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
31
+ }, undefined>, v.CheckAction<{
32
+ categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
33
+ actionRequired?: boolean | undefined;
34
+ surfaces: ("trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
35
+ audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
36
+ startTime?: number | undefined;
37
+ endTime?: number | undefined;
38
+ postSlug: string;
39
+ sort?: "asc" | "desc" | undefined;
40
+ limit: number;
41
+ pageToken: string;
42
+ }, "endTime: must be after startTime">, v.TransformAction<{
43
+ categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
44
+ actionRequired?: boolean | undefined;
45
+ surfaces: ("trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
46
+ audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
47
+ startTime?: number | undefined;
48
+ endTime?: number | undefined;
49
+ postSlug: string;
50
+ sort?: "asc" | "desc" | undefined;
51
+ limit: number;
52
+ pageToken: string;
53
+ }, {
54
+ categories: (ChangeCategory.BREAKING_CHANGE | ChangeCategory.NEW_FEATURE | ChangeCategory.IMPROVEMENT | ChangeCategory.BUG_FIX)[];
55
+ surfaces: (Surface.TRADING | Surface.FUNDING | Surface.ACCOUNTS | Surface.API | Surface.EXPLORER | Surface.DOCUMENTATION | Surface.PLATFORM)[];
56
+ audiences: (Audience.ALL_USERS | Audience.TRADERS | Audience.MARKET_MAKERS | Audience.DEVELOPERS)[];
57
+ startTime: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
58
+ endTime: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
59
+ sort: SortDirection.SORT_ASC | SortDirection.SORT_DESC | undefined;
60
+ actionRequired?: boolean | undefined;
61
+ postSlug: string;
62
+ limit: number;
63
+ pageToken: string;
64
+ }>]>;
65
+ type ListChangelogChangesInput = v.InferInput<typeof ListChangelogChangesInputSchema>;
66
+ /** `id` is the public base58 identifier, stable across environments. */
67
+ declare const ChangelogChangeSchema: v.ObjectSchema<{
68
+ readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
69
+ readonly title: v.StringSchema<undefined>;
70
+ readonly summary: v.StringSchema<undefined>;
71
+ readonly details: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
72
+ readonly category: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix">]>;
73
+ readonly actionRequired: v.BooleanSchema<undefined>;
74
+ readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
75
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
76
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform">]>, undefined>, readonly []>;
77
+ }, undefined>;
78
+ type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;
79
+ declare const ChangelogSectionSchema: v.ObjectSchema<{
80
+ readonly heading: v.StringSchema<undefined>;
81
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
82
+ readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
83
+ readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
84
+ readonly title: v.StringSchema<undefined>;
85
+ readonly summary: v.StringSchema<undefined>;
86
+ readonly details: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
87
+ readonly category: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix">]>;
88
+ readonly actionRequired: v.BooleanSchema<undefined>;
89
+ readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
90
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
91
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform">]>, undefined>, readonly []>;
92
+ }, undefined>, undefined>, readonly []>;
93
+ }, undefined>;
94
+ type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;
95
+ /** `coverageCutoff` is the exclusive end of the covered period, `undefined` when unknown. */
96
+ declare const ChangelogPostSummarySchema: v.ObjectSchema<{
97
+ readonly slug: v.StringSchema<undefined>;
98
+ readonly title: v.StringSchema<undefined>;
99
+ readonly introduction: v.StringSchema<undefined>;
100
+ readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
101
+ readonly seconds: v.BigintSchema<undefined>;
102
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
103
+ }, undefined>, v.TransformAction<{
104
+ seconds: bigint;
105
+ nanos: number;
106
+ }, number>]>;
107
+ readonly coverageCutoff: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
108
+ readonly seconds: v.BigintSchema<undefined>;
109
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
110
+ }, undefined>, undefined>, v.TransformAction<{
111
+ seconds: bigint;
112
+ nanos: number;
113
+ } | undefined, number | undefined>]>;
114
+ readonly changeCount: v.NumberSchema<undefined>;
115
+ readonly breakingChangeCount: v.NumberSchema<undefined>;
116
+ readonly actionRequiredCount: v.NumberSchema<undefined>;
117
+ readonly newFeatureCount: v.NumberSchema<undefined>;
118
+ readonly improvementCount: v.NumberSchema<undefined>;
119
+ readonly bugFixCount: v.NumberSchema<undefined>;
120
+ }, undefined>;
121
+ type ChangelogPostSummary = v.InferOutput<typeof ChangelogPostSummarySchema>;
122
+ declare const ListChangelogPostsResultSchema: v.ObjectSchema<{
123
+ readonly posts: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
124
+ readonly slug: v.StringSchema<undefined>;
125
+ readonly title: v.StringSchema<undefined>;
126
+ readonly introduction: v.StringSchema<undefined>;
127
+ readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
128
+ readonly seconds: v.BigintSchema<undefined>;
129
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
130
+ }, undefined>, v.TransformAction<{
131
+ seconds: bigint;
132
+ nanos: number;
133
+ }, number>]>;
134
+ readonly coverageCutoff: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
135
+ readonly seconds: v.BigintSchema<undefined>;
136
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
137
+ }, undefined>, undefined>, v.TransformAction<{
138
+ seconds: bigint;
139
+ nanos: number;
140
+ } | undefined, number | undefined>]>;
141
+ readonly changeCount: v.NumberSchema<undefined>;
142
+ readonly breakingChangeCount: v.NumberSchema<undefined>;
143
+ readonly actionRequiredCount: v.NumberSchema<undefined>;
144
+ readonly newFeatureCount: v.NumberSchema<undefined>;
145
+ readonly improvementCount: v.NumberSchema<undefined>;
146
+ readonly bugFixCount: v.NumberSchema<undefined>;
147
+ }, undefined>, undefined>, readonly []>;
148
+ readonly nextPageToken: v.StringSchema<undefined>;
149
+ }, undefined>;
150
+ type ListChangelogPostsResult = v.InferOutput<typeof ListChangelogPostsResultSchema>;
151
+ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
152
+ readonly summary: v.ObjectSchema<{
153
+ readonly slug: v.StringSchema<undefined>;
154
+ readonly title: v.StringSchema<undefined>;
155
+ readonly introduction: v.StringSchema<undefined>;
156
+ readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
157
+ readonly seconds: v.BigintSchema<undefined>;
158
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
159
+ }, undefined>, v.TransformAction<{
160
+ seconds: bigint;
161
+ nanos: number;
162
+ }, number>]>;
163
+ readonly coverageCutoff: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
164
+ readonly seconds: v.BigintSchema<undefined>;
165
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
166
+ }, undefined>, undefined>, v.TransformAction<{
167
+ seconds: bigint;
168
+ nanos: number;
169
+ } | undefined, number | undefined>]>;
170
+ readonly changeCount: v.NumberSchema<undefined>;
171
+ readonly breakingChangeCount: v.NumberSchema<undefined>;
172
+ readonly actionRequiredCount: v.NumberSchema<undefined>;
173
+ readonly newFeatureCount: v.NumberSchema<undefined>;
174
+ readonly improvementCount: v.NumberSchema<undefined>;
175
+ readonly bugFixCount: v.NumberSchema<undefined>;
176
+ }, undefined>;
177
+ readonly sections: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
178
+ readonly heading: v.StringSchema<undefined>;
179
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
180
+ readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
181
+ readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
182
+ readonly title: v.StringSchema<undefined>;
183
+ readonly summary: v.StringSchema<undefined>;
184
+ readonly details: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
185
+ readonly category: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix">]>;
186
+ readonly actionRequired: v.BooleanSchema<undefined>;
187
+ readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
188
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
189
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform">]>, undefined>, readonly []>;
190
+ }, undefined>, undefined>, readonly []>;
191
+ }, undefined>, undefined>, readonly []>;
192
+ }, undefined>, v.TransformAction<{
193
+ summary: {
194
+ slug: string;
195
+ title: string;
196
+ introduction: string;
197
+ publishedAt: number;
198
+ coverageCutoff?: number | undefined;
199
+ changeCount: number;
200
+ breakingChangeCount: number;
201
+ actionRequiredCount: number;
202
+ newFeatureCount: number;
203
+ improvementCount: number;
204
+ bugFixCount: number;
205
+ };
206
+ sections: {
207
+ heading: string;
208
+ summary?: string | undefined;
209
+ changes: {
210
+ id: string;
211
+ title: string;
212
+ summary: string;
213
+ details?: string | undefined;
214
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
215
+ actionRequired: boolean;
216
+ migrationGuidance?: string | undefined;
217
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
218
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
219
+ }[];
220
+ }[];
221
+ }, {
222
+ sections: {
223
+ heading: string;
224
+ summary?: string | undefined;
225
+ changes: {
226
+ id: string;
227
+ title: string;
228
+ summary: string;
229
+ details?: string | undefined;
230
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
231
+ actionRequired: boolean;
232
+ migrationGuidance?: string | undefined;
233
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
234
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
235
+ }[];
236
+ }[];
237
+ slug: string;
238
+ title: string;
239
+ introduction: string;
240
+ publishedAt: number;
241
+ coverageCutoff?: number | undefined;
242
+ changeCount: number;
243
+ breakingChangeCount: number;
244
+ actionRequiredCount: number;
245
+ newFeatureCount: number;
246
+ improvementCount: number;
247
+ bugFixCount: number;
248
+ }>]>;
249
+ type ChangelogPost = v.InferOutput<typeof ChangelogPostSchema>;
250
+ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
251
+ readonly change: v.ObjectSchema<{
252
+ readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
253
+ readonly title: v.StringSchema<undefined>;
254
+ readonly summary: v.StringSchema<undefined>;
255
+ readonly details: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
256
+ readonly category: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix">]>;
257
+ readonly actionRequired: v.BooleanSchema<undefined>;
258
+ readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
259
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
260
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform">]>, undefined>, readonly []>;
261
+ }, undefined>;
262
+ readonly postSlug: v.StringSchema<undefined>;
263
+ readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
264
+ readonly seconds: v.BigintSchema<undefined>;
265
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
266
+ }, undefined>, v.TransformAction<{
267
+ seconds: bigint;
268
+ nanos: number;
269
+ }, number>]>;
270
+ readonly sectionHeading: v.StringSchema<undefined>;
271
+ }, undefined>, v.TransformAction<{
272
+ change: {
273
+ id: string;
274
+ title: string;
275
+ summary: string;
276
+ details?: string | undefined;
277
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
278
+ actionRequired: boolean;
279
+ migrationGuidance?: string | undefined;
280
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
281
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
282
+ };
283
+ postSlug: string;
284
+ publishedAt: number;
285
+ sectionHeading: string;
286
+ }, {
287
+ postSlug: string;
288
+ publishedAt: number;
289
+ sectionHeading: string;
290
+ id: string;
291
+ title: string;
292
+ summary: string;
293
+ details?: string | undefined;
294
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
295
+ actionRequired: boolean;
296
+ migrationGuidance?: string | undefined;
297
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
298
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
299
+ }>]>;
300
+ /** A change with the slug, publication time and section heading of the post that announced it. */
301
+ type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;
302
+ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
303
+ readonly changes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
304
+ readonly change: v.ObjectSchema<{
305
+ readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
306
+ readonly title: v.StringSchema<undefined>;
307
+ readonly summary: v.StringSchema<undefined>;
308
+ readonly details: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
309
+ readonly category: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix">]>;
310
+ readonly actionRequired: v.BooleanSchema<undefined>;
311
+ readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
312
+ readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
313
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform">]>, undefined>, readonly []>;
314
+ }, undefined>;
315
+ readonly postSlug: v.StringSchema<undefined>;
316
+ readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
317
+ readonly seconds: v.BigintSchema<undefined>;
318
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
319
+ }, undefined>, v.TransformAction<{
320
+ seconds: bigint;
321
+ nanos: number;
322
+ }, number>]>;
323
+ readonly sectionHeading: v.StringSchema<undefined>;
324
+ }, undefined>, v.TransformAction<{
325
+ change: {
326
+ id: string;
327
+ title: string;
328
+ summary: string;
329
+ details?: string | undefined;
330
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
331
+ actionRequired: boolean;
332
+ migrationGuidance?: string | undefined;
333
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
334
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
335
+ };
336
+ postSlug: string;
337
+ publishedAt: number;
338
+ sectionHeading: string;
339
+ }, {
340
+ postSlug: string;
341
+ publishedAt: number;
342
+ sectionHeading: string;
343
+ id: string;
344
+ title: string;
345
+ summary: string;
346
+ details?: string | undefined;
347
+ category: "unspecified" | "breaking_change" | "new_feature" | "improvement" | "bug_fix";
348
+ actionRequired: boolean;
349
+ migrationGuidance?: string | undefined;
350
+ audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
351
+ surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform")[];
352
+ }>]>, undefined>, readonly []>;
353
+ readonly nextPageToken: v.StringSchema<undefined>;
354
+ }, undefined>;
355
+ type ListChangelogChangesResult = v.InferOutput<typeof ListChangelogChangesResultSchema>;
356
+ //#endregion
357
+ export { ChangelogChange, ChangelogChangeEntry, ChangelogChangeEntrySchema, ChangelogChangeSchema, ChangelogPost, ChangelogPostSchema, ChangelogPostSummary, ChangelogPostSummarySchema, ChangelogSection, ChangelogSectionSchema, GetChangelogPostInput, GetChangelogPostInputSchema, ListChangelogChangesInput, ListChangelogChangesInputSchema, ListChangelogChangesResult, ListChangelogChangesResultSchema, ListChangelogPostsInput, ListChangelogPostsInputSchema, ListChangelogPostsResult, ListChangelogPostsResultSchema };
358
+ //# sourceMappingURL=changelog.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.schemas.d.ts","names":[],"sources":["../../../src/services/changelog/changelog.schemas.ts"],"mappings":";;;;cA6Ba,+BAA6B,EAAA;;;;KAK9B,0BAA0B,EAAE,kBAAkB;cAE7C,6BAA2B,EAAA;;;KAI5B,wBAAwB,EAAE,kBAAkB;;;;;;;cAQ3C,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BhC,4BAA4B,EAAE,kBAAkB;;cAG/C,uBAAqB,EAAA;;;;;;;;;;;KAYtB,kBAAkB,EAAE,mBAAmB;cAEtC,wBAAsB,EAAA;;;;;;;;;;;;;;;KAMvB,mBAAmB,EAAE,mBAAmB;;cAGvC,4BAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAc3B,uBAAuB,EAAE,mBAAmB;cAE3C,gCAA8B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAK/B,2BAA2B,EAAE,mBAAmB;cAE/C,qBAAmB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQpB,gBAAgB,EAAE,mBAAmB;cAIpC,4BAA0B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW3B,uBAAuB,EAAE,mBAAmB;cAE3C,kCAAgC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKjC,6BAA6B,EAAE,mBAAmB"}
@@ -0,0 +1,101 @@
1
+ import { OptionalTimestampMsSchema, PublicIdSchema, TimestampMsSchema } from "../../shared/schemas.js";
2
+ import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
3
+ import { msToTimestamp } from "../../utils/timestamp.js";
4
+ import { CHANGELOG_AUDIENCE_VALUES, CHANGELOG_CHANGE_CATEGORY_VALUES, CHANGELOG_SORT_VALUES, CHANGELOG_SURFACE_VALUES, ChangelogAudienceCodec, ChangelogChangeCategoryCodec, ChangelogSortCodec, ChangelogSurfaceCodec } from "./changelog.codecs.js";
5
+ import * as v from "valibot";
6
+ //#region src/services/changelog/changelog.schemas.ts
7
+ const PageTokenInputSchema = v.optional(v.pipe(v.string(), v.trim()), "");
8
+ const SlugInputSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
9
+ const TimestampMsInputSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(Number.MAX_SAFE_INTEGER));
10
+ /** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */
11
+ const ListChangelogPostsInputSchema = v.strictObject({
12
+ limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),
13
+ pageToken: PageTokenInputSchema
14
+ });
15
+ const GetChangelogPostInputSchema = v.strictObject({ slug: SlugInputSchema });
16
+ /**
17
+ * Filters on different fields combine with AND; values within one field combine with OR.
18
+ * Times are epoch milliseconds on post publication time: `startTime` inclusive, `endTime`
19
+ * exclusive and after `startTime`. `limit` is 0 through 500; 0 or omitted uses the server
20
+ * default of 100.
21
+ */
22
+ const ListChangelogChangesInputSchema = v.pipe(v.strictObject({
23
+ categories: v.optional(v.array(v.picklist(CHANGELOG_CHANGE_CATEGORY_VALUES)), []),
24
+ actionRequired: v.optional(v.boolean()),
25
+ surfaces: v.optional(v.array(v.picklist(CHANGELOG_SURFACE_VALUES)), []),
26
+ audiences: v.optional(v.array(v.picklist(CHANGELOG_AUDIENCE_VALUES)), []),
27
+ startTime: v.optional(TimestampMsInputSchema),
28
+ endTime: v.optional(TimestampMsInputSchema),
29
+ postSlug: v.optional(v.pipe(v.string(), v.trim()), ""),
30
+ sort: v.optional(v.picklist(CHANGELOG_SORT_VALUES)),
31
+ limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(500)), 0),
32
+ pageToken: PageTokenInputSchema
33
+ }), v.check(({ startTime, endTime }) => startTime === void 0 || endTime === void 0 || endTime > startTime, "endTime: must be after startTime"), v.transform(({ categories, surfaces, audiences, startTime, endTime, sort, ...rest }) => ({
34
+ ...rest,
35
+ categories: categories.map((value) => ChangelogChangeCategoryCodec.inputToProto[value]),
36
+ surfaces: surfaces.map((value) => ChangelogSurfaceCodec.inputToProto[value]),
37
+ audiences: audiences.map((value) => ChangelogAudienceCodec.inputToProto[value]),
38
+ startTime: startTime === void 0 ? void 0 : msToTimestamp(startTime),
39
+ endTime: endTime === void 0 ? void 0 : msToTimestamp(endTime),
40
+ sort: sort === void 0 ? void 0 : ChangelogSortCodec.inputToProto[sort]
41
+ })));
42
+ /** `id` is the public base58 identifier, stable across environments. */
43
+ const ChangelogChangeSchema = v.object({
44
+ id: PublicIdSchema,
45
+ title: v.string(),
46
+ summary: v.string(),
47
+ details: v.optional(v.string()),
48
+ category: enumLabelSchema(ChangelogChangeCategoryCodec.protoToOutput),
49
+ actionRequired: v.boolean(),
50
+ migrationGuidance: v.optional(v.string()),
51
+ audiences: v.optional(v.array(enumLabelSchema(ChangelogAudienceCodec.protoToOutput)), []),
52
+ surfaces: v.optional(v.array(enumLabelSchema(ChangelogSurfaceCodec.protoToOutput)), [])
53
+ });
54
+ const ChangelogSectionSchema = v.object({
55
+ heading: v.string(),
56
+ summary: v.optional(v.string()),
57
+ changes: v.optional(v.array(ChangelogChangeSchema), [])
58
+ });
59
+ /** `coverageCutoff` is the exclusive end of the covered period, `undefined` when unknown. */
60
+ const ChangelogPostSummarySchema = v.object({
61
+ slug: v.string(),
62
+ title: v.string(),
63
+ introduction: v.string(),
64
+ publishedAt: TimestampMsSchema,
65
+ coverageCutoff: OptionalTimestampMsSchema,
66
+ changeCount: v.number(),
67
+ breakingChangeCount: v.number(),
68
+ actionRequiredCount: v.number(),
69
+ newFeatureCount: v.number(),
70
+ improvementCount: v.number(),
71
+ bugFixCount: v.number()
72
+ });
73
+ const ListChangelogPostsResultSchema = v.object({
74
+ posts: v.optional(v.array(ChangelogPostSummarySchema), []),
75
+ nextPageToken: v.string()
76
+ });
77
+ const ChangelogPostSchema = v.pipe(v.object({
78
+ summary: ChangelogPostSummarySchema,
79
+ sections: v.optional(v.array(ChangelogSectionSchema), [])
80
+ }), v.transform(({ summary, sections }) => ({
81
+ ...summary,
82
+ sections
83
+ })));
84
+ const GetChangelogPostResultSchema = v.object({ post: ChangelogPostSchema });
85
+ const ChangelogChangeEntrySchema = v.pipe(v.object({
86
+ change: ChangelogChangeSchema,
87
+ postSlug: v.string(),
88
+ publishedAt: TimestampMsSchema,
89
+ sectionHeading: v.string()
90
+ }), v.transform(({ change, ...entry }) => ({
91
+ ...change,
92
+ ...entry
93
+ })));
94
+ const ListChangelogChangesResultSchema = v.object({
95
+ changes: v.optional(v.array(ChangelogChangeEntrySchema), []),
96
+ nextPageToken: v.string()
97
+ });
98
+ //#endregion
99
+ export { ChangelogChangeEntrySchema, ChangelogChangeSchema, ChangelogPostSchema, ChangelogPostSummarySchema, ChangelogSectionSchema, GetChangelogPostInputSchema, GetChangelogPostResultSchema, ListChangelogChangesInputSchema, ListChangelogChangesResultSchema, ListChangelogPostsInputSchema, ListChangelogPostsResultSchema };
100
+
101
+ //# sourceMappingURL=changelog.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.schemas.js","names":[],"sources":["../../../src/services/changelog/changelog.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport {\n OptionalTimestampMsSchema,\n PublicIdSchema,\n TimestampMsSchema,\n} from \"../../shared/schemas.js\";\nimport { msToTimestamp } from \"../../utils/timestamp.js\";\nimport {\n CHANGELOG_AUDIENCE_VALUES,\n CHANGELOG_CHANGE_CATEGORY_VALUES,\n CHANGELOG_SORT_VALUES,\n CHANGELOG_SURFACE_VALUES,\n ChangelogAudienceCodec,\n ChangelogChangeCategoryCodec,\n ChangelogSortCodec,\n ChangelogSurfaceCodec,\n} from \"./changelog.codecs.js\";\n\nconst PageTokenInputSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\nconst SlugInputSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst TimestampMsInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n);\n\n/** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */\nexport const ListChangelogPostsInputSchema = v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),\n pageToken: PageTokenInputSchema,\n});\n\nexport type ListChangelogPostsInput = v.InferInput<typeof ListChangelogPostsInputSchema>;\n\nexport const GetChangelogPostInputSchema = v.strictObject({\n slug: SlugInputSchema,\n});\n\nexport type GetChangelogPostInput = v.InferInput<typeof GetChangelogPostInputSchema>;\n\n/**\n * Filters on different fields combine with AND; values within one field combine with OR.\n * Times are epoch milliseconds on post publication time: `startTime` inclusive, `endTime`\n * exclusive and after `startTime`. `limit` is 0 through 500; 0 or omitted uses the server\n * default of 100.\n */\nexport const ListChangelogChangesInputSchema = v.pipe(\n v.strictObject({\n categories: v.optional(v.array(v.picklist(CHANGELOG_CHANGE_CATEGORY_VALUES)), []),\n actionRequired: v.optional(v.boolean()),\n surfaces: v.optional(v.array(v.picklist(CHANGELOG_SURFACE_VALUES)), []),\n audiences: v.optional(v.array(v.picklist(CHANGELOG_AUDIENCE_VALUES)), []),\n startTime: v.optional(TimestampMsInputSchema),\n endTime: v.optional(TimestampMsInputSchema),\n postSlug: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n sort: v.optional(v.picklist(CHANGELOG_SORT_VALUES)),\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(500)), 0),\n pageToken: PageTokenInputSchema,\n }),\n v.check(\n ({ startTime, endTime }) =>\n startTime === undefined || endTime === undefined || endTime > startTime,\n \"endTime: must be after startTime\",\n ),\n v.transform(({ categories, surfaces, audiences, startTime, endTime, sort, ...rest }) => ({\n ...rest,\n categories: categories.map((value) => ChangelogChangeCategoryCodec.inputToProto[value]),\n surfaces: surfaces.map((value) => ChangelogSurfaceCodec.inputToProto[value]),\n audiences: audiences.map((value) => ChangelogAudienceCodec.inputToProto[value]),\n startTime: startTime === undefined ? undefined : msToTimestamp(startTime),\n endTime: endTime === undefined ? undefined : msToTimestamp(endTime),\n sort: sort === undefined ? undefined : ChangelogSortCodec.inputToProto[sort],\n })),\n);\n\nexport type ListChangelogChangesInput = v.InferInput<typeof ListChangelogChangesInputSchema>;\n\n/** `id` is the public base58 identifier, stable across environments. */\nexport const ChangelogChangeSchema = v.object({\n id: PublicIdSchema,\n title: v.string(),\n summary: v.string(),\n details: v.optional(v.string()),\n category: enumLabelSchema(ChangelogChangeCategoryCodec.protoToOutput),\n actionRequired: v.boolean(),\n migrationGuidance: v.optional(v.string()),\n audiences: v.optional(v.array(enumLabelSchema(ChangelogAudienceCodec.protoToOutput)), []),\n surfaces: v.optional(v.array(enumLabelSchema(ChangelogSurfaceCodec.protoToOutput)), []),\n});\n\nexport type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;\n\nexport const ChangelogSectionSchema = v.object({\n heading: v.string(),\n summary: v.optional(v.string()),\n changes: v.optional(v.array(ChangelogChangeSchema), []),\n});\n\nexport type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;\n\n/** `coverageCutoff` is the exclusive end of the covered period, `undefined` when unknown. */\nexport const ChangelogPostSummarySchema = v.object({\n slug: v.string(),\n title: v.string(),\n introduction: v.string(),\n publishedAt: TimestampMsSchema,\n coverageCutoff: OptionalTimestampMsSchema,\n changeCount: v.number(),\n breakingChangeCount: v.number(),\n actionRequiredCount: v.number(),\n newFeatureCount: v.number(),\n improvementCount: v.number(),\n bugFixCount: v.number(),\n});\n\nexport type ChangelogPostSummary = v.InferOutput<typeof ChangelogPostSummarySchema>;\n\nexport const ListChangelogPostsResultSchema = v.object({\n posts: v.optional(v.array(ChangelogPostSummarySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogPostsResult = v.InferOutput<typeof ListChangelogPostsResultSchema>;\n\nexport const ChangelogPostSchema = v.pipe(\n v.object({\n summary: ChangelogPostSummarySchema,\n sections: v.optional(v.array(ChangelogSectionSchema), []),\n }),\n v.transform(({ summary, sections }) => ({ ...summary, sections })),\n);\n\nexport type ChangelogPost = v.InferOutput<typeof ChangelogPostSchema>;\n\nexport const GetChangelogPostResultSchema = v.object({ post: ChangelogPostSchema });\n\nexport const ChangelogChangeEntrySchema = v.pipe(\n v.object({\n change: ChangelogChangeSchema,\n postSlug: v.string(),\n publishedAt: TimestampMsSchema,\n sectionHeading: v.string(),\n }),\n v.transform(({ change, ...entry }) => ({ ...change, ...entry })),\n);\n\n/** A change with the slug, publication time and section heading of the post that announced it. */\nexport type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;\n\nexport const ListChangelogChangesResultSchema = v.object({\n changes: v.optional(v.array(ChangelogChangeEntrySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogChangesResult = v.InferOutput<typeof ListChangelogChangesResultSchema>;\n"],"mappings":";;;;;;AAmBA,MAAM,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AACxE,MAAM,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AACnE,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,SAAS,CAAC,GACZ,EAAE,SAAS,OAAO,gBAAgB,CACtC;;AAGA,MAAa,gCAAgC,EAAE,aAAa;CACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC;CACpF,WAAW;AACf,CAAC;AAID,MAAa,8BAA8B,EAAE,aAAa,EACtD,MAAM,gBACV,CAAC;;;;;;;AAUD,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;CACX,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,gCAAgC,CAAC,GAAG,CAAC,CAAC;CAChF,gBAAgB,EAAE,SAAS,EAAE,QAAQ,CAAC;CACtC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,wBAAwB,CAAC,GAAG,CAAC,CAAC;CACtE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,yBAAyB,CAAC,GAAG,CAAC,CAAC;CACxE,WAAW,EAAE,SAAS,sBAAsB;CAC5C,SAAS,EAAE,SAAS,sBAAsB;CAC1C,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;CACrD,MAAM,EAAE,SAAS,EAAE,SAAS,qBAAqB,CAAC;CAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC;CACpF,WAAW;AACf,CAAC,GACD,EAAE,OACG,EAAE,WAAW,cACV,cAAc,KAAA,KAAa,YAAY,KAAA,KAAa,UAAU,WAClE,kCACJ,GACA,EAAE,WAAW,EAAE,YAAY,UAAU,WAAW,WAAW,SAAS,MAAM,GAAG,YAAY;CACrF,GAAG;CACH,YAAY,WAAW,KAAK,UAAU,6BAA6B,aAAa,MAAM;CACtF,UAAU,SAAS,KAAK,UAAU,sBAAsB,aAAa,MAAM;CAC3E,WAAW,UAAU,KAAK,UAAU,uBAAuB,aAAa,MAAM;CAC9E,WAAW,cAAc,KAAA,IAAY,KAAA,IAAY,cAAc,SAAS;CACxE,SAAS,YAAY,KAAA,IAAY,KAAA,IAAY,cAAc,OAAO;CAClE,MAAM,SAAS,KAAA,IAAY,KAAA,IAAY,mBAAmB,aAAa;AAC3E,EAAE,CACN;;AAKA,MAAa,wBAAwB,EAAE,OAAO;CAC1C,IAAI;CACJ,OAAO,EAAE,OAAO;CAChB,SAAS,EAAE,OAAO;CAClB,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;CAC9B,UAAU,gBAAgB,6BAA6B,aAAa;CACpE,gBAAgB,EAAE,QAAQ;CAC1B,mBAAmB,EAAE,SAAS,EAAE,OAAO,CAAC;CACxC,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,uBAAuB,aAAa,CAAC,GAAG,CAAC,CAAC;CACxF,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,sBAAsB,aAAa,CAAC,GAAG,CAAC,CAAC;AAC1F,CAAC;AAID,MAAa,yBAAyB,EAAE,OAAO;CAC3C,SAAS,EAAE,OAAO;CAClB,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;CAC9B,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAC1D,CAAC;;AAKD,MAAa,6BAA6B,EAAE,OAAO;CAC/C,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,OAAO;CAChB,cAAc,EAAE,OAAO;CACvB,aAAa;CACb,gBAAgB;CAChB,aAAa,EAAE,OAAO;CACtB,qBAAqB,EAAE,OAAO;CAC9B,qBAAqB,EAAE,OAAO;CAC9B,iBAAiB,EAAE,OAAO;CAC1B,kBAAkB,EAAE,OAAO;CAC3B,aAAa,EAAE,OAAO;AAC1B,CAAC;AAID,MAAa,iCAAiC,EAAE,OAAO;CACnD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,GAAG,CAAC,CAAC;CACzD,eAAe,EAAE,OAAO;AAC5B,CAAC;AAID,MAAa,sBAAsB,EAAE,KACjC,EAAE,OAAO;CACL,SAAS;CACT,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAC5D,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,gBAAgB;CAAE,GAAG;CAAS;AAAS,EAAE,CACrE;AAIA,MAAa,+BAA+B,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAa,6BAA6B,EAAE,KACxC,EAAE,OAAO;CACL,QAAQ;CACR,UAAU,EAAE,OAAO;CACnB,aAAa;CACb,gBAAgB,EAAE,OAAO;AAC7B,CAAC,GACD,EAAE,WAAW,EAAE,QAAQ,GAAG,aAAa;CAAE,GAAG;CAAQ,GAAG;AAAM,EAAE,CACnE;AAKA,MAAa,mCAAmC,EAAE,OAAO;CACrD,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,GAAG,CAAC,CAAC;CAC3D,eAAe,EAAE,OAAO;AAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ChangelogChange, ChangelogChangeEntry, ChangelogPost, ChangelogPostSummary, ChangelogSection, GetChangelogPostInput, ListChangelogChangesInput, ListChangelogChangesResult, ListChangelogPostsInput, ListChangelogPostsResult } from "./changelog.schemas.js";
2
+ import { ChangelogAudience, ChangelogChangeCategory, ChangelogSort, ChangelogSurface } from "./changelog.codecs.js";
3
+ export type { ChangelogAudience, ChangelogChange, ChangelogChangeCategory, ChangelogChangeEntry, ChangelogPost, ChangelogPostSummary, ChangelogSection, ChangelogSort, ChangelogSurface, GetChangelogPostInput, ListChangelogChangesInput, ListChangelogChangesResult, ListChangelogPostsInput, ListChangelogPostsResult };
@@ -0,0 +1,8 @@
1
+ import { ChangelogService } from "./changelog.js";
2
+ import { PolyesterCore } from "../../core-client.js";
3
+ //#region src/services/changelog/service.d.ts
4
+ /** Returns the client's ChangelogService, creating it on first use. */
5
+ declare const changelogService: (client: PolyesterCore) => ChangelogService;
6
+ //#endregion
7
+ export { changelogService };
8
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","names":[],"sources":["../../../src/services/changelog/service.ts"],"mappings":";;;;cAIa,mBAAgB,QAAhB,kBAAgB"}
@@ -0,0 +1,9 @@
1
+ import { defineService } from "../../core-client.js";
2
+ import { ChangelogService } from "./changelog.js";
3
+ //#region src/services/changelog/service.ts
4
+ /** Returns the client's ChangelogService, creating it on first use. */
5
+ const changelogService = defineService((context) => new ChangelogService(context.transports));
6
+ //#endregion
7
+ export { changelogService };
8
+
9
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","names":[],"sources":["../../../src/services/changelog/service.ts"],"sourcesContent":["import { defineService } from \"../../core-client.js\";\nimport { ChangelogService } from \"./changelog.js\";\n\n/** Returns the client's ChangelogService, creating it on first use. */\nexport const changelogService = defineService(\n (context) => new ChangelogService(context.transports),\n);\n"],"mappings":";;;;AAIA,MAAa,mBAAmB,eAC3B,YAAY,IAAI,iBAAiB,QAAQ,UAAU,CACxD"}