graze-client 0.8.1 → 0.10.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.
- package/build/dts/GrazeClient.d.ts +337 -257
- package/build/dts/GrazeClient.d.ts.map +1 -1
- package/build/dts/builder.d.ts +2 -2
- package/build/dts/builder.d.ts.map +1 -1
- package/build/dts/common.d.ts +2 -3
- package/build/dts/common.d.ts.map +1 -1
- package/build/dts/index.d.ts +12 -12
- package/build/dts/index.d.ts.map +1 -1
- package/build/dts/schema/Post.d.ts +52 -52
- package/build/dts/schema/Post.d.ts.map +1 -1
- package/build/dts/schema/StickyPosts.d.ts +55 -56
- package/build/dts/schema/StickyPosts.d.ts.map +1 -1
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts +137 -137
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts.map +1 -1
- package/build/dts/schema/index.d.ts +1 -0
- package/build/dts/schema/index.d.ts.map +1 -1
- package/build/dts/schema/shared.d.ts +126 -126
- package/build/dts/schema/shared.d.ts.map +1 -1
- package/build/dts/stickyposts.d.ts +80 -78
- package/build/dts/stickyposts.d.ts.map +1 -1
- package/build/esm/GrazeClient.js +49 -33
- package/build/esm/GrazeClient.js.map +1 -1
- package/build/esm/builder.js +20 -20
- package/build/esm/builder.js.map +1 -1
- package/build/esm/common.js +4 -3
- package/build/esm/common.js.map +1 -1
- package/build/esm/index.js +11 -8
- package/build/esm/index.js.map +1 -1
- package/build/esm/schema/Post.js +9 -9
- package/build/esm/schema/Post.js.map +1 -1
- package/build/esm/schema/StickyPosts.js +8 -9
- package/build/esm/schema/StickyPosts.js.map +1 -1
- package/build/esm/schema/UpdateAlgorithmPayload.js +130 -53
- package/build/esm/schema/UpdateAlgorithmPayload.js.map +1 -1
- package/build/esm/schema/index.js +1 -0
- package/build/esm/schema/index.js.map +1 -1
- package/build/esm/schema/shared.js +14 -14
- package/build/esm/schema/shared.js.map +1 -1
- package/build/esm/stickyposts.js +28 -13
- package/build/esm/stickyposts.js.map +1 -1
- package/package.json +21 -23
- package/src/GrazeClient.ts +83 -76
- package/src/builder.ts +78 -74
- package/src/common.ts +5 -10
- package/src/index.ts +61 -52
- package/src/schema/Post.ts +16 -16
- package/src/schema/StickyPosts.ts +22 -26
- package/src/schema/UpdateAlgorithmPayload.ts +153 -145
- package/src/schema/index.ts +3 -2
- package/src/schema/shared.ts +32 -32
- package/src/stickyposts.ts +48 -27
|
@@ -1,224 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Effect } from "effect";
|
|
1
|
+
import { Config, Context, Effect, Layer, Schema } from "effect";
|
|
3
2
|
import * as Form from "./schema/UpdateAlgorithmPayload.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly draft_algorithm_manifest_id: number;
|
|
12
|
-
readonly record_name: string;
|
|
13
|
-
readonly display_name: string;
|
|
14
|
-
readonly description: string;
|
|
15
|
-
readonly feed_did: string;
|
|
16
|
-
readonly avatar_url: string | null;
|
|
17
|
-
readonly cpm_cents: number | null;
|
|
18
|
-
readonly deleted: boolean;
|
|
19
|
-
readonly active: boolean;
|
|
20
|
-
readonly public: boolean;
|
|
21
|
-
readonly monetization_available: boolean;
|
|
22
|
-
readonly status: string | null;
|
|
23
|
-
readonly unique_operator_ids: readonly number[];
|
|
24
|
-
readonly user_id: number;
|
|
25
|
-
readonly id: number;
|
|
26
|
-
readonly created_at: Date;
|
|
27
|
-
readonly updated_at: Date;
|
|
28
|
-
readonly deleted_at: Date | null;
|
|
29
|
-
};
|
|
30
|
-
}, unknown, never>;
|
|
31
|
-
getFeeds: () => Effect.Effect<{
|
|
32
|
-
readonly page: number;
|
|
33
|
-
readonly page_size: number;
|
|
34
|
-
readonly total_items: number;
|
|
35
|
-
readonly total_pages: number;
|
|
36
|
-
readonly user_algos: readonly {
|
|
37
|
-
readonly algorithm_uri: string;
|
|
38
|
-
readonly algorithm_manifest_id: number | null;
|
|
39
|
-
readonly draft_algorithm_manifest_id: number;
|
|
40
|
-
readonly record_name: string;
|
|
41
|
-
readonly display_name: string;
|
|
42
|
-
readonly description: string;
|
|
43
|
-
readonly feed_did: string;
|
|
44
|
-
readonly avatar_url: string | null;
|
|
45
|
-
readonly cpm_cents: number | null;
|
|
46
|
-
readonly deleted: boolean;
|
|
47
|
-
readonly active: boolean;
|
|
48
|
-
readonly public: boolean;
|
|
49
|
-
readonly monetization_available: boolean;
|
|
50
|
-
readonly status: string | null;
|
|
51
|
-
readonly unique_operator_ids: readonly number[];
|
|
52
|
-
readonly user_id: number;
|
|
53
|
-
readonly id: number;
|
|
54
|
-
readonly created_at: Date;
|
|
55
|
-
readonly updated_at: Date;
|
|
56
|
-
readonly deleted_at: Date | null;
|
|
57
|
-
readonly stats: {
|
|
58
|
-
readonly page_renders: number;
|
|
59
|
-
readonly unique_users: number;
|
|
60
|
-
readonly post_renders: number;
|
|
61
|
-
};
|
|
62
|
-
}[];
|
|
63
|
-
}, unknown, never>;
|
|
64
|
-
stickyposts: {
|
|
65
|
-
readonly create: <WithResponse extends boolean = false>(request: {
|
|
66
|
-
readonly payload: {
|
|
67
|
-
readonly algo_id: number;
|
|
68
|
-
readonly is_active: boolean;
|
|
69
|
-
readonly sticky_type: "pinned" | "rotating";
|
|
70
|
-
readonly post_url: string;
|
|
71
|
-
readonly stopping_criteria?: {
|
|
72
|
-
readonly expiration_time?: number | undefined;
|
|
73
|
-
} | undefined;
|
|
74
|
-
};
|
|
75
|
-
readonly withResponse?: WithResponse;
|
|
76
|
-
}) => Effect.Effect<WithResponse extends true ? [{
|
|
77
|
-
readonly message: string;
|
|
78
|
-
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
79
|
-
readonly message: string;
|
|
80
|
-
}, unknown, never>;
|
|
81
|
-
readonly get: <WithResponse extends boolean = false>(request: {
|
|
82
|
-
readonly path: {
|
|
83
|
-
readonly feedId: number;
|
|
84
|
-
};
|
|
85
|
-
readonly withResponse?: WithResponse;
|
|
86
|
-
}) => Effect.Effect<WithResponse extends true ? [{
|
|
87
|
-
readonly sticky_posts: readonly {
|
|
88
|
-
readonly id: number;
|
|
89
|
-
readonly created_at: string;
|
|
90
|
-
readonly updated_at: string;
|
|
91
|
-
readonly post: {
|
|
92
|
-
readonly embed: any;
|
|
93
|
-
readonly labels: any;
|
|
94
|
-
readonly $type: string;
|
|
95
|
-
readonly viewer: any;
|
|
96
|
-
readonly cid: string;
|
|
97
|
-
readonly uri: string;
|
|
98
|
-
readonly author: {
|
|
99
|
-
readonly labels: readonly any[];
|
|
100
|
-
readonly did: string;
|
|
101
|
-
readonly $type: string;
|
|
102
|
-
readonly avatar: string;
|
|
103
|
-
readonly handle: string;
|
|
104
|
-
readonly viewer: any;
|
|
105
|
-
readonly createdAt: string;
|
|
106
|
-
readonly associated: any;
|
|
107
|
-
readonly displayName: string;
|
|
108
|
-
};
|
|
109
|
-
readonly record: {
|
|
110
|
-
readonly text: string;
|
|
111
|
-
readonly reply: any;
|
|
112
|
-
readonly embed: any;
|
|
113
|
-
readonly labels: any;
|
|
114
|
-
readonly $type: string;
|
|
115
|
-
readonly createdAt: string;
|
|
116
|
-
readonly tags: any;
|
|
117
|
-
readonly langs: readonly string[] | null;
|
|
118
|
-
readonly facets: readonly any[] | null;
|
|
119
|
-
readonly entities: any;
|
|
120
|
-
};
|
|
121
|
-
readonly indexedAt: string;
|
|
122
|
-
readonly likeCount: number;
|
|
123
|
-
readonly quoteCount: number;
|
|
124
|
-
readonly replyCount: number;
|
|
125
|
-
readonly threadgate: unknown;
|
|
126
|
-
readonly repostCount: number;
|
|
127
|
-
};
|
|
128
|
-
readonly uri: string;
|
|
129
|
-
readonly author: string;
|
|
130
|
-
readonly is_active: boolean;
|
|
131
|
-
readonly sticky_type: "pinned" | "rotating";
|
|
132
|
-
readonly stopping_criteria?: {
|
|
133
|
-
readonly expiration_time?: number | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
readonly hidden: boolean;
|
|
136
|
-
}[];
|
|
137
|
-
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
138
|
-
readonly sticky_posts: readonly {
|
|
139
|
-
readonly id: number;
|
|
140
|
-
readonly created_at: string;
|
|
141
|
-
readonly updated_at: string;
|
|
142
|
-
readonly post: {
|
|
143
|
-
readonly embed: any;
|
|
144
|
-
readonly labels: any;
|
|
145
|
-
readonly $type: string;
|
|
146
|
-
readonly viewer: any;
|
|
147
|
-
readonly cid: string;
|
|
148
|
-
readonly uri: string;
|
|
149
|
-
readonly author: {
|
|
150
|
-
readonly labels: readonly any[];
|
|
151
|
-
readonly did: string;
|
|
152
|
-
readonly $type: string;
|
|
153
|
-
readonly avatar: string;
|
|
154
|
-
readonly handle: string;
|
|
155
|
-
readonly viewer: any;
|
|
156
|
-
readonly createdAt: string;
|
|
157
|
-
readonly associated: any;
|
|
158
|
-
readonly displayName: string;
|
|
159
|
-
};
|
|
160
|
-
readonly record: {
|
|
161
|
-
readonly text: string;
|
|
162
|
-
readonly reply: any;
|
|
163
|
-
readonly embed: any;
|
|
164
|
-
readonly labels: any;
|
|
165
|
-
readonly $type: string;
|
|
166
|
-
readonly createdAt: string;
|
|
167
|
-
readonly tags: any;
|
|
168
|
-
readonly langs: readonly string[] | null;
|
|
169
|
-
readonly facets: readonly any[] | null;
|
|
170
|
-
readonly entities: any;
|
|
171
|
-
};
|
|
172
|
-
readonly indexedAt: string;
|
|
173
|
-
readonly likeCount: number;
|
|
174
|
-
readonly quoteCount: number;
|
|
175
|
-
readonly replyCount: number;
|
|
176
|
-
readonly threadgate: unknown;
|
|
177
|
-
readonly repostCount: number;
|
|
178
|
-
};
|
|
179
|
-
readonly uri: string;
|
|
180
|
-
readonly author: string;
|
|
181
|
-
readonly is_active: boolean;
|
|
182
|
-
readonly sticky_type: "pinned" | "rotating";
|
|
183
|
-
readonly stopping_criteria?: {
|
|
184
|
-
readonly expiration_time?: number | undefined;
|
|
185
|
-
} | undefined;
|
|
186
|
-
readonly hidden: boolean;
|
|
187
|
-
}[];
|
|
188
|
-
}, unknown, never>;
|
|
189
|
-
readonly update: <WithResponse extends boolean = false>(request: {
|
|
190
|
-
readonly path: {
|
|
191
|
-
readonly feedId: number;
|
|
192
|
-
readonly stickyPostId: number;
|
|
193
|
-
};
|
|
194
|
-
readonly urlParams: {
|
|
195
|
-
readonly is_active: boolean;
|
|
196
|
-
readonly sticky_type: "pinned" | "rotating";
|
|
197
|
-
};
|
|
198
|
-
readonly withResponse?: WithResponse;
|
|
199
|
-
}) => Effect.Effect<WithResponse extends true ? [{
|
|
200
|
-
readonly message: string;
|
|
201
|
-
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
202
|
-
readonly message: string;
|
|
203
|
-
}, unknown, never>;
|
|
204
|
-
readonly delete: <WithResponse extends boolean = false>(request: {
|
|
205
|
-
readonly path: {
|
|
206
|
-
readonly feedId: number;
|
|
207
|
-
readonly stickyPostId: number;
|
|
208
|
-
};
|
|
209
|
-
readonly withResponse?: WithResponse;
|
|
210
|
-
}) => Effect.Effect<WithResponse extends true ? [{
|
|
211
|
-
readonly message: string;
|
|
212
|
-
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
213
|
-
readonly message: string;
|
|
214
|
-
}, unknown, never>;
|
|
215
|
-
};
|
|
216
|
-
getFeed: <WithResponse extends boolean = false>(request: {
|
|
217
|
-
readonly path: {
|
|
218
|
-
readonly feedId: number;
|
|
219
|
-
};
|
|
220
|
-
readonly withResponse?: WithResponse;
|
|
221
|
-
}) => Effect.Effect<WithResponse extends true ? [{
|
|
3
|
+
import * as HttpApiClient from "effect/unstable/httpapi/HttpApiClient";
|
|
4
|
+
import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint";
|
|
5
|
+
import * as HttpClient from "effect/unstable/http/HttpClient";
|
|
6
|
+
declare const grazeLive: Effect.Effect<{
|
|
7
|
+
updateAlgorithm: (data: Form.FullForm) => Effect.Effect<{
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly algorithm: {
|
|
222
10
|
readonly algorithm_uri: string;
|
|
223
11
|
readonly algorithm_manifest_id: number | null;
|
|
224
12
|
readonly draft_algorithm_manifest_id: number;
|
|
@@ -239,13 +27,171 @@ declare const GrazeClient_base: Effect.Service.Class<GrazeClient, "GrazeClient",
|
|
|
239
27
|
readonly created_at: Date;
|
|
240
28
|
readonly updated_at: Date;
|
|
241
29
|
readonly deleted_at: Date | null;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
30
|
+
};
|
|
31
|
+
}, import("effect/unstable/http/HttpClientError").HttpClientError | Schema.SchemaError, never>;
|
|
32
|
+
getFeeds: () => HttpApiClient.Client.MethodReturn<HttpApiEndpoint.HttpApiEndpoint<"getFeeds", "GET", "/app/my_feeds", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
33
|
+
readonly user_id: Schema.NumberFromString;
|
|
34
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
35
|
+
readonly page: Schema.Number;
|
|
36
|
+
readonly page_size: Schema.Number;
|
|
37
|
+
readonly total_items: Schema.Number;
|
|
38
|
+
readonly total_pages: Schema.Number;
|
|
39
|
+
readonly user_algos: Schema.$Array<Schema.Struct<{
|
|
40
|
+
readonly stats: Schema.Struct<{
|
|
41
|
+
readonly page_renders: Schema.Number;
|
|
42
|
+
readonly unique_users: Schema.Number;
|
|
43
|
+
readonly post_renders: Schema.Number;
|
|
44
|
+
}>;
|
|
45
|
+
readonly algorithm_uri: Schema.String;
|
|
46
|
+
readonly algorithm_manifest_id: Schema.Union<readonly [Schema.Null, Schema.Number]>;
|
|
47
|
+
readonly draft_algorithm_manifest_id: Schema.Number;
|
|
48
|
+
readonly record_name: Schema.String;
|
|
49
|
+
readonly display_name: Schema.String;
|
|
50
|
+
readonly description: Schema.String;
|
|
51
|
+
readonly feed_did: Schema.String;
|
|
52
|
+
readonly avatar_url: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
53
|
+
readonly cpm_cents: Schema.Union<readonly [Schema.Number, Schema.Null]>;
|
|
54
|
+
readonly deleted: Schema.Boolean;
|
|
55
|
+
readonly active: Schema.Boolean;
|
|
56
|
+
readonly public: Schema.Boolean;
|
|
57
|
+
readonly monetization_available: Schema.Boolean;
|
|
58
|
+
readonly status: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
59
|
+
readonly unique_operator_ids: Schema.$Array<Schema.Number>;
|
|
60
|
+
readonly user_id: Schema.Number;
|
|
61
|
+
readonly id: Schema.Number;
|
|
62
|
+
readonly created_at: Schema.DateFromString;
|
|
63
|
+
readonly updated_at: Schema.DateFromString;
|
|
64
|
+
readonly deleted_at: Schema.Union<readonly [Schema.DateFromString, Schema.Null]>;
|
|
65
|
+
}>>;
|
|
66
|
+
}>>, never, never, never>, never, never, HttpApiEndpoint.ClientResponseMode>;
|
|
67
|
+
stickyposts: {
|
|
68
|
+
readonly create: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/app/api/v1/feed-management/sticky-posts", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
69
|
+
readonly is_active: Schema.Boolean;
|
|
70
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
71
|
+
readonly algo_id: Schema.Number;
|
|
72
|
+
readonly post_url: Schema.String;
|
|
73
|
+
readonly stopping_criteria: Schema.optional<Schema.Struct<{
|
|
74
|
+
readonly expiration_time: Schema.optional<Schema.Number>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
77
|
+
readonly message: Schema.String;
|
|
78
|
+
}>>, never, never, never>, never, never>;
|
|
79
|
+
readonly get: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/app/api/v1/feed-management/sticky-posts/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
80
|
+
feedId: Schema.NumberFromString;
|
|
81
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
82
|
+
readonly sticky_posts: Schema.$Array<Schema.Struct<{
|
|
83
|
+
readonly stopping_criteria: Schema.optional<Schema.Struct<{
|
|
84
|
+
readonly expiration_time: Schema.optional<Schema.Number>;
|
|
85
|
+
}>>;
|
|
86
|
+
readonly hidden: Schema.Boolean;
|
|
87
|
+
readonly uri: Schema.String;
|
|
88
|
+
readonly post: Schema.Struct<{
|
|
89
|
+
readonly cid: Schema.String;
|
|
90
|
+
readonly uri: Schema.String;
|
|
91
|
+
readonly $type: Schema.String;
|
|
92
|
+
readonly embed: Schema.Any;
|
|
93
|
+
readonly author: Schema.Struct<{
|
|
94
|
+
readonly did: Schema.String;
|
|
95
|
+
readonly $type: Schema.String;
|
|
96
|
+
readonly avatar: Schema.String;
|
|
97
|
+
readonly handle: Schema.String;
|
|
98
|
+
readonly labels: Schema.$Array<Schema.Any>;
|
|
99
|
+
readonly viewer: Schema.Any;
|
|
100
|
+
readonly createdAt: Schema.String;
|
|
101
|
+
readonly associated: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
102
|
+
readonly displayName: Schema.String;
|
|
103
|
+
}>;
|
|
104
|
+
readonly labels: Schema.Any;
|
|
105
|
+
readonly record: Schema.Struct<{
|
|
106
|
+
readonly tags: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
107
|
+
readonly text: Schema.String;
|
|
108
|
+
readonly $type: Schema.String;
|
|
109
|
+
readonly embed: Schema.Any;
|
|
110
|
+
readonly langs: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
111
|
+
readonly reply: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
112
|
+
readonly facets: Schema.NullOr<Schema.$Array<Schema.Any>>;
|
|
113
|
+
readonly labels: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
114
|
+
readonly entities: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
115
|
+
readonly createdAt: Schema.String;
|
|
116
|
+
}>;
|
|
117
|
+
readonly viewer: Schema.Any;
|
|
118
|
+
readonly indexedAt: Schema.String;
|
|
119
|
+
readonly likeCount: Schema.Number;
|
|
120
|
+
readonly quoteCount: Schema.Number;
|
|
121
|
+
readonly replyCount: Schema.Number;
|
|
122
|
+
readonly threadgate: Schema.Union<readonly [Schema.Null, Schema.Unknown]>;
|
|
123
|
+
readonly repostCount: Schema.Number;
|
|
124
|
+
}>;
|
|
125
|
+
readonly author: Schema.String;
|
|
126
|
+
readonly created_at: Schema.String;
|
|
127
|
+
readonly updated_at: Schema.String;
|
|
128
|
+
readonly is_active: Schema.Boolean;
|
|
129
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
130
|
+
readonly id: Schema.Number;
|
|
131
|
+
}>>;
|
|
132
|
+
}>>, never, never, never>, never, never>;
|
|
133
|
+
readonly update: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"update", "PUT", "/app/api/v1/feed-management/sticky-posts/:feedId/:stickyPostId", Schema.toCodecStringTree<Schema.Struct<{
|
|
134
|
+
feedId: Schema.NumberFromString;
|
|
135
|
+
stickyPostId: Schema.NumberFromString;
|
|
136
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
137
|
+
readonly is_active: Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>;
|
|
138
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
139
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
140
|
+
readonly message: Schema.String;
|
|
141
|
+
}>>, never, never, never>, never, never>;
|
|
142
|
+
readonly delete: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/app/api/v1/feed-management/sticky-posts/:feedId/:stickyPostId", Schema.toCodecStringTree<Schema.Struct<{
|
|
143
|
+
feedId: Schema.NumberFromString;
|
|
144
|
+
stickyPostId: Schema.NumberFromString;
|
|
145
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
146
|
+
readonly message: Schema.String;
|
|
147
|
+
}>>, never, never, never>, never, never>;
|
|
148
|
+
};
|
|
149
|
+
getFeed: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"getFeed", "GET", "/app/my_feeds/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
150
|
+
feedId: Schema.NumberFromString;
|
|
151
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.fromJsonString<Schema.Struct<{
|
|
152
|
+
readonly draft_algorithm_manifest: Schema.Unknown;
|
|
153
|
+
readonly algorithm_manifest: Schema.Unknown;
|
|
154
|
+
readonly stats: Schema.Unknown;
|
|
155
|
+
readonly latest_error: Schema.Unknown;
|
|
156
|
+
readonly latest_compute_cycle: Schema.Unknown;
|
|
157
|
+
readonly subscriber_lists: Schema.Unknown;
|
|
158
|
+
readonly algorithm_uri: Schema.String;
|
|
159
|
+
readonly algorithm_manifest_id: Schema.Union<readonly [Schema.Null, Schema.Number]>;
|
|
160
|
+
readonly draft_algorithm_manifest_id: Schema.Number;
|
|
161
|
+
readonly record_name: Schema.String;
|
|
162
|
+
readonly display_name: Schema.String;
|
|
163
|
+
readonly description: Schema.String;
|
|
164
|
+
readonly feed_did: Schema.String;
|
|
165
|
+
readonly avatar_url: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
166
|
+
readonly cpm_cents: Schema.Union<readonly [Schema.Number, Schema.Null]>;
|
|
167
|
+
readonly deleted: Schema.Boolean;
|
|
168
|
+
readonly active: Schema.Boolean;
|
|
169
|
+
readonly public: Schema.Boolean;
|
|
170
|
+
readonly monetization_available: Schema.Boolean;
|
|
171
|
+
readonly status: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
172
|
+
readonly unique_operator_ids: Schema.$Array<Schema.Number>;
|
|
173
|
+
readonly user_id: Schema.Number;
|
|
174
|
+
readonly id: Schema.Number;
|
|
175
|
+
readonly created_at: Schema.DateFromString;
|
|
176
|
+
readonly updated_at: Schema.DateFromString;
|
|
177
|
+
readonly deleted_at: Schema.Union<readonly [Schema.DateFromString, Schema.Null]>;
|
|
178
|
+
}>>>, never, never, never>, never, never>;
|
|
179
|
+
publishAlgorithm: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"publishAlgorithm", "GET", "/app/publish_algo/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
180
|
+
feedId: Schema.NumberFromString;
|
|
181
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
182
|
+
hidePost: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"hidePost", "POST", "/app/hide_post", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
183
|
+
readonly algo_id: Schema.Number;
|
|
184
|
+
readonly at_uri: Schema.String;
|
|
185
|
+
}>>, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
186
|
+
unhidePost: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"unhidePost", "POST", "/app/unhide_post", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
187
|
+
readonly algo_id: Schema.Number;
|
|
188
|
+
readonly at_uri: Schema.String;
|
|
189
|
+
}>>, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
190
|
+
}, Config.ConfigError, HttpClient.HttpClient>;
|
|
191
|
+
declare const GrazeClient_base: Context.ServiceClass<GrazeClient, "GrazeClient", {
|
|
192
|
+
updateAlgorithm: (data: Form.FullForm) => Effect.Effect<{
|
|
193
|
+
readonly message: string;
|
|
194
|
+
readonly algorithm: {
|
|
249
195
|
readonly algorithm_uri: string;
|
|
250
196
|
readonly algorithm_manifest_id: number | null;
|
|
251
197
|
readonly draft_algorithm_manifest_id: number;
|
|
@@ -266,39 +212,173 @@ declare const GrazeClient_base: Effect.Service.Class<GrazeClient, "GrazeClient",
|
|
|
266
212
|
readonly created_at: Date;
|
|
267
213
|
readonly updated_at: Date;
|
|
268
214
|
readonly deleted_at: Date | null;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
readonly
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
readonly
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
readonly
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
215
|
+
};
|
|
216
|
+
}, import("effect/unstable/http/HttpClientError").HttpClientError | Schema.SchemaError, never>;
|
|
217
|
+
getFeeds: () => HttpApiClient.Client.MethodReturn<HttpApiEndpoint.HttpApiEndpoint<"getFeeds", "GET", "/app/my_feeds", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
218
|
+
readonly user_id: Schema.NumberFromString;
|
|
219
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
220
|
+
readonly page: Schema.Number;
|
|
221
|
+
readonly page_size: Schema.Number;
|
|
222
|
+
readonly total_items: Schema.Number;
|
|
223
|
+
readonly total_pages: Schema.Number;
|
|
224
|
+
readonly user_algos: Schema.$Array<Schema.Struct<{
|
|
225
|
+
readonly stats: Schema.Struct<{
|
|
226
|
+
readonly page_renders: Schema.Number;
|
|
227
|
+
readonly unique_users: Schema.Number;
|
|
228
|
+
readonly post_renders: Schema.Number;
|
|
229
|
+
}>;
|
|
230
|
+
readonly algorithm_uri: Schema.String;
|
|
231
|
+
readonly algorithm_manifest_id: Schema.Union<readonly [Schema.Null, Schema.Number]>;
|
|
232
|
+
readonly draft_algorithm_manifest_id: Schema.Number;
|
|
233
|
+
readonly record_name: Schema.String;
|
|
234
|
+
readonly display_name: Schema.String;
|
|
235
|
+
readonly description: Schema.String;
|
|
236
|
+
readonly feed_did: Schema.String;
|
|
237
|
+
readonly avatar_url: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
238
|
+
readonly cpm_cents: Schema.Union<readonly [Schema.Number, Schema.Null]>;
|
|
239
|
+
readonly deleted: Schema.Boolean;
|
|
240
|
+
readonly active: Schema.Boolean;
|
|
241
|
+
readonly public: Schema.Boolean;
|
|
242
|
+
readonly monetization_available: Schema.Boolean;
|
|
243
|
+
readonly status: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
244
|
+
readonly unique_operator_ids: Schema.$Array<Schema.Number>;
|
|
245
|
+
readonly user_id: Schema.Number;
|
|
246
|
+
readonly id: Schema.Number;
|
|
247
|
+
readonly created_at: Schema.DateFromString;
|
|
248
|
+
readonly updated_at: Schema.DateFromString;
|
|
249
|
+
readonly deleted_at: Schema.Union<readonly [Schema.DateFromString, Schema.Null]>;
|
|
250
|
+
}>>;
|
|
251
|
+
}>>, never, never, never>, never, never, HttpApiEndpoint.ClientResponseMode>;
|
|
252
|
+
stickyposts: {
|
|
253
|
+
readonly create: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/app/api/v1/feed-management/sticky-posts", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
254
|
+
readonly is_active: Schema.Boolean;
|
|
255
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
256
|
+
readonly algo_id: Schema.Number;
|
|
257
|
+
readonly post_url: Schema.String;
|
|
258
|
+
readonly stopping_criteria: Schema.optional<Schema.Struct<{
|
|
259
|
+
readonly expiration_time: Schema.optional<Schema.Number>;
|
|
260
|
+
}>>;
|
|
261
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
262
|
+
readonly message: Schema.String;
|
|
263
|
+
}>>, never, never, never>, never, never>;
|
|
264
|
+
readonly get: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/app/api/v1/feed-management/sticky-posts/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
265
|
+
feedId: Schema.NumberFromString;
|
|
266
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
267
|
+
readonly sticky_posts: Schema.$Array<Schema.Struct<{
|
|
268
|
+
readonly stopping_criteria: Schema.optional<Schema.Struct<{
|
|
269
|
+
readonly expiration_time: Schema.optional<Schema.Number>;
|
|
270
|
+
}>>;
|
|
271
|
+
readonly hidden: Schema.Boolean;
|
|
272
|
+
readonly uri: Schema.String;
|
|
273
|
+
readonly post: Schema.Struct<{
|
|
274
|
+
readonly cid: Schema.String;
|
|
275
|
+
readonly uri: Schema.String;
|
|
276
|
+
readonly $type: Schema.String;
|
|
277
|
+
readonly embed: Schema.Any;
|
|
278
|
+
readonly author: Schema.Struct<{
|
|
279
|
+
readonly did: Schema.String;
|
|
280
|
+
readonly $type: Schema.String;
|
|
281
|
+
readonly avatar: Schema.String;
|
|
282
|
+
readonly handle: Schema.String;
|
|
283
|
+
readonly labels: Schema.$Array<Schema.Any>;
|
|
284
|
+
readonly viewer: Schema.Any;
|
|
285
|
+
readonly createdAt: Schema.String;
|
|
286
|
+
readonly associated: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
287
|
+
readonly displayName: Schema.String;
|
|
288
|
+
}>;
|
|
289
|
+
readonly labels: Schema.Any;
|
|
290
|
+
readonly record: Schema.Struct<{
|
|
291
|
+
readonly tags: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
292
|
+
readonly text: Schema.String;
|
|
293
|
+
readonly $type: Schema.String;
|
|
294
|
+
readonly embed: Schema.Any;
|
|
295
|
+
readonly langs: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
296
|
+
readonly reply: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
297
|
+
readonly facets: Schema.NullOr<Schema.$Array<Schema.Any>>;
|
|
298
|
+
readonly labels: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
299
|
+
readonly entities: Schema.Union<readonly [Schema.Null, Schema.Any]>;
|
|
300
|
+
readonly createdAt: Schema.String;
|
|
301
|
+
}>;
|
|
302
|
+
readonly viewer: Schema.Any;
|
|
303
|
+
readonly indexedAt: Schema.String;
|
|
304
|
+
readonly likeCount: Schema.Number;
|
|
305
|
+
readonly quoteCount: Schema.Number;
|
|
306
|
+
readonly replyCount: Schema.Number;
|
|
307
|
+
readonly threadgate: Schema.Union<readonly [Schema.Null, Schema.Unknown]>;
|
|
308
|
+
readonly repostCount: Schema.Number;
|
|
309
|
+
}>;
|
|
310
|
+
readonly author: Schema.String;
|
|
311
|
+
readonly created_at: Schema.String;
|
|
312
|
+
readonly updated_at: Schema.String;
|
|
313
|
+
readonly is_active: Schema.Boolean;
|
|
314
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
315
|
+
readonly id: Schema.Number;
|
|
316
|
+
}>>;
|
|
317
|
+
}>>, never, never, never>, never, never>;
|
|
318
|
+
readonly update: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"update", "PUT", "/app/api/v1/feed-management/sticky-posts/:feedId/:stickyPostId", Schema.toCodecStringTree<Schema.Struct<{
|
|
319
|
+
feedId: Schema.NumberFromString;
|
|
320
|
+
stickyPostId: Schema.NumberFromString;
|
|
321
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
322
|
+
readonly is_active: Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>;
|
|
323
|
+
readonly sticky_type: Schema.Literals<readonly ["pinned", "rotating"]>;
|
|
324
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
325
|
+
readonly message: Schema.String;
|
|
326
|
+
}>>, never, never, never>, never, never>;
|
|
327
|
+
readonly delete: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/app/api/v1/feed-management/sticky-posts/:feedId/:stickyPostId", Schema.toCodecStringTree<Schema.Struct<{
|
|
328
|
+
feedId: Schema.NumberFromString;
|
|
329
|
+
stickyPostId: Schema.NumberFromString;
|
|
330
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
331
|
+
readonly message: Schema.String;
|
|
332
|
+
}>>, never, never, never>, never, never>;
|
|
333
|
+
};
|
|
334
|
+
getFeed: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"getFeed", "GET", "/app/my_feeds/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
335
|
+
feedId: Schema.NumberFromString;
|
|
336
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.fromJsonString<Schema.Struct<{
|
|
337
|
+
readonly draft_algorithm_manifest: Schema.Unknown;
|
|
338
|
+
readonly algorithm_manifest: Schema.Unknown;
|
|
339
|
+
readonly stats: Schema.Unknown;
|
|
340
|
+
readonly latest_error: Schema.Unknown;
|
|
341
|
+
readonly latest_compute_cycle: Schema.Unknown;
|
|
342
|
+
readonly subscriber_lists: Schema.Unknown;
|
|
343
|
+
readonly algorithm_uri: Schema.String;
|
|
344
|
+
readonly algorithm_manifest_id: Schema.Union<readonly [Schema.Null, Schema.Number]>;
|
|
345
|
+
readonly draft_algorithm_manifest_id: Schema.Number;
|
|
346
|
+
readonly record_name: Schema.String;
|
|
347
|
+
readonly display_name: Schema.String;
|
|
348
|
+
readonly description: Schema.String;
|
|
349
|
+
readonly feed_did: Schema.String;
|
|
350
|
+
readonly avatar_url: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
351
|
+
readonly cpm_cents: Schema.Union<readonly [Schema.Number, Schema.Null]>;
|
|
352
|
+
readonly deleted: Schema.Boolean;
|
|
353
|
+
readonly active: Schema.Boolean;
|
|
354
|
+
readonly public: Schema.Boolean;
|
|
355
|
+
readonly monetization_available: Schema.Boolean;
|
|
356
|
+
readonly status: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
357
|
+
readonly unique_operator_ids: Schema.$Array<Schema.Number>;
|
|
358
|
+
readonly user_id: Schema.Number;
|
|
359
|
+
readonly id: Schema.Number;
|
|
360
|
+
readonly created_at: Schema.DateFromString;
|
|
361
|
+
readonly updated_at: Schema.DateFromString;
|
|
362
|
+
readonly deleted_at: Schema.Union<readonly [Schema.DateFromString, Schema.Null]>;
|
|
363
|
+
}>>>, never, never, never>, never, never>;
|
|
364
|
+
publishAlgorithm: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"publishAlgorithm", "GET", "/app/publish_algo/:feedId", Schema.toCodecStringTree<Schema.Struct<{
|
|
365
|
+
feedId: Schema.NumberFromString;
|
|
366
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
367
|
+
hidePost: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"hidePost", "POST", "/app/hide_post", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
368
|
+
readonly algo_id: Schema.Number;
|
|
369
|
+
readonly at_uri: Schema.String;
|
|
370
|
+
}>>, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
371
|
+
unhidePost: HttpApiClient.Client.Method<HttpApiEndpoint.HttpApiEndpoint<"unhidePost", "POST", "/app/unhide_post", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
372
|
+
readonly algo_id: Schema.Number;
|
|
373
|
+
readonly at_uri: Schema.String;
|
|
374
|
+
}>>, never, Schema.toCodecJson<Schema.Unknown>, never, never, never>, never, never>;
|
|
298
375
|
}>;
|
|
299
376
|
export declare class GrazeClient extends GrazeClient_base {
|
|
377
|
+
static readonly layer: Layer.Layer<GrazeClient, Config.ConfigError, never>;
|
|
300
378
|
}
|
|
301
|
-
|
|
379
|
+
/** The resolved service shape (v4 has no `.Service` namespace on the tag). */
|
|
380
|
+
export type GrazeClientService = Effect.Success<typeof grazeLive>;
|
|
381
|
+
declare const GrazeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
302
382
|
readonly _tag: "GrazeError";
|
|
303
383
|
} & Readonly<A>;
|
|
304
384
|
export declare class GrazeError extends GrazeError_base<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrazeClient.d.ts","sourceRoot":"","sources":["../../src/GrazeClient.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"GrazeClient.d.ts","sourceRoot":"","sources":["../../src/GrazeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAQ,MAAM,EAAE,KAAK,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAC;AAUhF,OAAO,KAAK,IAAI,MAAM,oCAAoC,CAAC;AAI3D,OAAO,KAAK,aAAa,MAAM,uCAAuC,CAAC;AACvE,OAAO,KAAK,eAAe,MAAM,yCAAyC,CAAC;AAG3E,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAoE9D,QAAA,MAAM,SAAS;4BAiBkB,IAAI,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAc5C,CAAC;;4BAd8B,IAAI,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB9C,qBAAa,WAAY,SAAQ,gBAGf;IAChB,MAAM,CAAC,QAAQ,CAAC,KAAK,sDAEnB;CACH;AAED,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,SAAS,CAAC,CAAC;;;;AAElE,qBAAa,UAAW,SAAQ,gBAA+B;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;CAAG"}
|
package/build/dts/builder.d.ts
CHANGED
|
@@ -9,13 +9,13 @@ export declare const F: {
|
|
|
9
9
|
or: (...filters: Array<Filter | null>) => Filter;
|
|
10
10
|
regexMatches: (attribute: RegexMatches["regex_matches"][0], regex: string) => RegexMatches;
|
|
11
11
|
regexNegationMatches: (attribute: RegexNegationMatches["regex_negation_matches"][0], regex: string) => RegexNegationMatches;
|
|
12
|
-
textMatchesAny: ({ attribute, caseInsensitive, patterns, useRegex }: {
|
|
12
|
+
textMatchesAny: ({ attribute, caseInsensitive, patterns, useRegex, }: {
|
|
13
13
|
attribute: AttributeName;
|
|
14
14
|
patterns: Array<string>;
|
|
15
15
|
caseInsensitive?: boolean;
|
|
16
16
|
useRegex?: boolean;
|
|
17
17
|
}) => TextMatchesAny;
|
|
18
|
-
textMatchesNone: ({ attribute, caseInsensitive, patterns, useRegex }: {
|
|
18
|
+
textMatchesNone: ({ attribute, caseInsensitive, patterns, useRegex, }: {
|
|
19
19
|
attribute: AttributeName;
|
|
20
20
|
patterns: Array<string>;
|
|
21
21
|
caseInsensitive?: boolean;
|