@storyblok/management-api-client 0.3.0 → 0.4.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.
@@ -0,0 +1,10 @@
1
+ const require_utils_gen = require('../shared/client/utils.gen.cjs');
2
+ const require_client_gen = require('../shared/client/client.gen.cjs');
3
+ require('../shared/client/index.cjs');
4
+
5
+ //#region src/generated/experiments/client.gen.ts
6
+ const client = require_client_gen.createClient(require_utils_gen.createConfig({ baseUrl: "https://mapi.storyblok.com" }));
7
+
8
+ //#endregion
9
+ exports.client = client;
10
+ //# sourceMappingURL=client.gen.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.gen.cjs","names":["createClient","createConfig"],"sources":["../../../src/generated/experiments/client.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '../shared/client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://mapi.storyblok.com' }));\n"],"mappings":";;;;;AAeA,MAAa,SAASA,gCAAaC,+BAA6B,EAAE,SAAS,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { createConfig } from "../shared/client/utils.gen.mjs";
2
+ import { createClient } from "../shared/client/client.gen.mjs";
3
+ import "../shared/client/index.mjs";
4
+
5
+ //#region src/generated/experiments/client.gen.ts
6
+ const client = createClient(createConfig({ baseUrl: "https://mapi.storyblok.com" }));
7
+
8
+ //#endregion
9
+ export { client };
10
+ //# sourceMappingURL=client.gen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.gen.mjs","names":[],"sources":["../../../src/generated/experiments/client.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type ClientOptions, type Config, createClient, createConfig } from '../shared/client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://mapi.storyblok.com' }));\n"],"mappings":";;;;;AAeA,MAAa,SAAS,aAAa,aAA6B,EAAE,SAAS,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,298 @@
1
+ const require_client_gen = require('./client.gen.cjs');
2
+
3
+ //#region src/generated/experiments/sdk.gen.ts
4
+ /**
5
+ * Retrieve Multiple Experiments
6
+ *
7
+ * Returns an array of experiment objects for the space.
8
+ */
9
+ const list = (options) => (options.client ?? require_client_gen.client).get({
10
+ security: [{
11
+ name: "Authorization",
12
+ type: "apiKey"
13
+ }, {
14
+ scheme: "bearer",
15
+ type: "http"
16
+ }],
17
+ url: "/v1/spaces/{space_id}/experiments",
18
+ ...options
19
+ });
20
+ /**
21
+ * Create an Experiment
22
+ *
23
+ * Creates a new experiment with its variants.
24
+ */
25
+ const create = (options) => (options.client ?? require_client_gen.client).post({
26
+ security: [{
27
+ name: "Authorization",
28
+ type: "apiKey"
29
+ }, {
30
+ scheme: "bearer",
31
+ type: "http"
32
+ }],
33
+ url: "/v1/spaces/{space_id}/experiments",
34
+ ...options,
35
+ headers: {
36
+ "Content-Type": "application/json",
37
+ ...options.headers
38
+ }
39
+ });
40
+ /**
41
+ * Delete an Experiment
42
+ *
43
+ * Deletes an experiment. Only draft or completed experiments can be deleted.
44
+ */
45
+ const delete_ = (options) => (options.client ?? require_client_gen.client).delete({
46
+ security: [{
47
+ name: "Authorization",
48
+ type: "apiKey"
49
+ }, {
50
+ scheme: "bearer",
51
+ type: "http"
52
+ }],
53
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
54
+ ...options
55
+ });
56
+ /**
57
+ * Retrieve a Single Experiment
58
+ *
59
+ * Returns a single experiment object by its numeric id.
60
+ */
61
+ const get = (options) => (options.client ?? require_client_gen.client).get({
62
+ security: [{
63
+ name: "Authorization",
64
+ type: "apiKey"
65
+ }, {
66
+ scheme: "bearer",
67
+ type: "http"
68
+ }],
69
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
70
+ ...options
71
+ });
72
+ /**
73
+ * Update an Experiment
74
+ *
75
+ * Updates an experiment and its variants. The experiment name cannot be changed after creation.
76
+ */
77
+ const update = (options) => (options.client ?? require_client_gen.client).put({
78
+ security: [{
79
+ name: "Authorization",
80
+ type: "apiKey"
81
+ }, {
82
+ scheme: "bearer",
83
+ type: "http"
84
+ }],
85
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
86
+ ...options,
87
+ headers: {
88
+ "Content-Type": "application/json",
89
+ ...options.headers
90
+ }
91
+ });
92
+ /**
93
+ * Activate an Experiment
94
+ *
95
+ * Activates (starts or resumes) an experiment, moving it to the running status.
96
+ */
97
+ const activate = (options) => (options.client ?? require_client_gen.client).put({
98
+ security: [{
99
+ name: "Authorization",
100
+ type: "apiKey"
101
+ }, {
102
+ scheme: "bearer",
103
+ type: "http"
104
+ }],
105
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/activate",
106
+ ...options
107
+ });
108
+ /**
109
+ * Pause an Experiment
110
+ *
111
+ * Pauses a running experiment.
112
+ */
113
+ const pause = (options) => (options.client ?? require_client_gen.client).put({
114
+ security: [{
115
+ name: "Authorization",
116
+ type: "apiKey"
117
+ }, {
118
+ scheme: "bearer",
119
+ type: "http"
120
+ }],
121
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/pause",
122
+ ...options
123
+ });
124
+ /**
125
+ * Complete an Experiment
126
+ *
127
+ * Completes an experiment without selecting a winner.
128
+ */
129
+ const complete = (options) => (options.client ?? require_client_gen.client).put({
130
+ security: [{
131
+ name: "Authorization",
132
+ type: "apiKey"
133
+ }, {
134
+ scheme: "bearer",
135
+ type: "http"
136
+ }],
137
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/complete",
138
+ ...options
139
+ });
140
+ /**
141
+ * Complete an Experiment with a Winner
142
+ *
143
+ * Selects a winning variant and completes the experiment.
144
+ */
145
+ const completeWithWinner = (options) => (options.client ?? require_client_gen.client).patch({
146
+ security: [{
147
+ name: "Authorization",
148
+ type: "apiKey"
149
+ }, {
150
+ scheme: "bearer",
151
+ type: "http"
152
+ }],
153
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/complete_with_winner",
154
+ ...options
155
+ });
156
+ /**
157
+ * Select a Winning Variant
158
+ *
159
+ * Selects a winning variant without completing the experiment.
160
+ */
161
+ const selectWinner = (options) => (options.client ?? require_client_gen.client).patch({
162
+ security: [{
163
+ name: "Authorization",
164
+ type: "apiKey"
165
+ }, {
166
+ scheme: "bearer",
167
+ type: "http"
168
+ }],
169
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/select_winner",
170
+ ...options
171
+ });
172
+ /**
173
+ * Link a Story to an Experiment
174
+ *
175
+ * Adds an original story to the experiment.
176
+ */
177
+ const createExperimentStory = (options) => (options.client ?? require_client_gen.client).post({
178
+ security: [{
179
+ name: "Authorization",
180
+ type: "apiKey"
181
+ }, {
182
+ scheme: "bearer",
183
+ type: "http"
184
+ }],
185
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/stories",
186
+ ...options,
187
+ headers: {
188
+ "Content-Type": "application/json",
189
+ ...options.headers
190
+ }
191
+ });
192
+ /**
193
+ * Unlink a Story from an Experiment
194
+ *
195
+ * Removes an original story from the experiment.
196
+ */
197
+ const deleteExperimentStory = (options) => (options.client ?? require_client_gen.client).delete({
198
+ security: [{
199
+ name: "Authorization",
200
+ type: "apiKey"
201
+ }, {
202
+ scheme: "bearer",
203
+ type: "http"
204
+ }],
205
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/stories/{story_id}",
206
+ ...options
207
+ });
208
+ /**
209
+ * Create a Variant Story Mapping
210
+ *
211
+ * Maps an original story to a variant, optionally duplicating it into a new variant story.
212
+ */
213
+ const createStoryMapping = (options) => (options.client ?? require_client_gen.client).post({
214
+ security: [{
215
+ name: "Authorization",
216
+ type: "apiKey"
217
+ }, {
218
+ scheme: "bearer",
219
+ type: "http"
220
+ }],
221
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings",
222
+ ...options,
223
+ headers: {
224
+ "Content-Type": "application/json",
225
+ ...options.headers
226
+ }
227
+ });
228
+ /**
229
+ * Delete a Variant Story Mapping
230
+ *
231
+ * Removes the mapping between an original story and a variant.
232
+ */
233
+ const deleteStoryMapping = (options) => (options.client ?? require_client_gen.client).delete({
234
+ security: [{
235
+ name: "Authorization",
236
+ type: "apiKey"
237
+ }, {
238
+ scheme: "bearer",
239
+ type: "http"
240
+ }],
241
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings/{original_story_id}",
242
+ ...options
243
+ });
244
+ /**
245
+ * Retrieve Experiment Results
246
+ *
247
+ * Returns the pre-computed result charts for an experiment. Responds with 204 when no results have been pushed yet.
248
+ */
249
+ const getResults = (options) => (options.client ?? require_client_gen.client).get({
250
+ security: [{
251
+ name: "Authorization",
252
+ type: "apiKey"
253
+ }, {
254
+ scheme: "bearer",
255
+ type: "http"
256
+ }],
257
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/results",
258
+ ...options
259
+ });
260
+ /**
261
+ * Push Experiment Results
262
+ *
263
+ * Stores up to 20 pre-computed result charts for an experiment.
264
+ */
265
+ const pushResults = (options) => (options.client ?? require_client_gen.client).post({
266
+ security: [{
267
+ name: "Authorization",
268
+ type: "apiKey"
269
+ }, {
270
+ scheme: "bearer",
271
+ type: "http"
272
+ }],
273
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/results",
274
+ ...options,
275
+ headers: {
276
+ "Content-Type": "application/json",
277
+ ...options.headers
278
+ }
279
+ });
280
+
281
+ //#endregion
282
+ exports.activate = activate;
283
+ exports.complete = complete;
284
+ exports.completeWithWinner = completeWithWinner;
285
+ exports.create = create;
286
+ exports.createExperimentStory = createExperimentStory;
287
+ exports.createStoryMapping = createStoryMapping;
288
+ exports.deleteExperimentStory = deleteExperimentStory;
289
+ exports.deleteStoryMapping = deleteStoryMapping;
290
+ exports.delete_ = delete_;
291
+ exports.get = get;
292
+ exports.getResults = getResults;
293
+ exports.list = list;
294
+ exports.pause = pause;
295
+ exports.pushResults = pushResults;
296
+ exports.selectWinner = selectWinner;
297
+ exports.update = update;
298
+ //# sourceMappingURL=sdk.gen.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.gen.cjs","names":["client"],"sources":["../../../src/generated/experiments/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, Options as Options2, TDataShape } from '../shared/client';\nimport { client } from './client.gen';\nimport type { ActivateData, ActivateErrors, ActivateResponses, CompleteData, CompleteErrors, CompleteResponses, CompleteWithWinnerData, CompleteWithWinnerErrors, CompleteWithWinnerResponses, CreateData, CreateErrors, CreateExperimentStoryData, CreateExperimentStoryErrors, CreateExperimentStoryResponses, CreateResponses, CreateStoryMappingData, CreateStoryMappingErrors, CreateStoryMappingResponses, DeleteData, DeleteErrors, DeleteExperimentStoryData, DeleteExperimentStoryErrors, DeleteExperimentStoryResponses, DeleteResponses, DeleteStoryMappingData, DeleteStoryMappingErrors, DeleteStoryMappingResponses, GetData, GetErrors, GetResponses, GetResultsData, GetResultsErrors, GetResultsResponses, ListData, ListErrors, ListResponses, PauseData, PauseErrors, PauseResponses, PushResultsData, PushResultsErrors, PushResultsResponses, SelectWinnerData, SelectWinnerErrors, SelectWinnerResponses, UpdateData, UpdateErrors, UpdateResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: Record<string, unknown>;\n};\n\n/**\n * Retrieve Multiple Experiments\n *\n * Returns an array of experiment objects for the space.\n */\nexport const list = <ThrowOnError extends boolean = false>(options: Options<ListData, ThrowOnError>) => (options.client ?? client).get<ListResponses, ListErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments',\n ...options\n});\n\n/**\n * Create an Experiment\n *\n * Creates a new experiment with its variants.\n */\nexport const create = <ThrowOnError extends boolean = false>(options: Options<CreateData, ThrowOnError>) => (options.client ?? client).post<CreateResponses, CreateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete an Experiment\n *\n * Deletes an experiment. Only draft or completed experiments can be deleted.\n */\nexport const delete_ = <ThrowOnError extends boolean = false>(options: Options<DeleteData, ThrowOnError>) => (options.client ?? client).delete<DeleteResponses, DeleteErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options\n});\n\n/**\n * Retrieve a Single Experiment\n *\n * Returns a single experiment object by its numeric id.\n */\nexport const get = <ThrowOnError extends boolean = false>(options: Options<GetData, ThrowOnError>) => (options.client ?? client).get<GetResponses, GetErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options\n});\n\n/**\n * Update an Experiment\n *\n * Updates an experiment and its variants. The experiment name cannot be changed after creation.\n */\nexport const update = <ThrowOnError extends boolean = false>(options: Options<UpdateData, ThrowOnError>) => (options.client ?? client).put<UpdateResponses, UpdateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Activate an Experiment\n *\n * Activates (starts or resumes) an experiment, moving it to the running status.\n */\nexport const activate = <ThrowOnError extends boolean = false>(options: Options<ActivateData, ThrowOnError>) => (options.client ?? client).put<ActivateResponses, ActivateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/activate',\n ...options\n});\n\n/**\n * Pause an Experiment\n *\n * Pauses a running experiment.\n */\nexport const pause = <ThrowOnError extends boolean = false>(options: Options<PauseData, ThrowOnError>) => (options.client ?? client).put<PauseResponses, PauseErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/pause',\n ...options\n});\n\n/**\n * Complete an Experiment\n *\n * Completes an experiment without selecting a winner.\n */\nexport const complete = <ThrowOnError extends boolean = false>(options: Options<CompleteData, ThrowOnError>) => (options.client ?? client).put<CompleteResponses, CompleteErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/complete',\n ...options\n});\n\n/**\n * Complete an Experiment with a Winner\n *\n * Selects a winning variant and completes the experiment.\n */\nexport const completeWithWinner = <ThrowOnError extends boolean = false>(options: Options<CompleteWithWinnerData, ThrowOnError>) => (options.client ?? client).patch<CompleteWithWinnerResponses, CompleteWithWinnerErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/complete_with_winner',\n ...options\n});\n\n/**\n * Select a Winning Variant\n *\n * Selects a winning variant without completing the experiment.\n */\nexport const selectWinner = <ThrowOnError extends boolean = false>(options: Options<SelectWinnerData, ThrowOnError>) => (options.client ?? client).patch<SelectWinnerResponses, SelectWinnerErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/select_winner',\n ...options\n});\n\n/**\n * Link a Story to an Experiment\n *\n * Adds an original story to the experiment.\n */\nexport const createExperimentStory = <ThrowOnError extends boolean = false>(options: Options<CreateExperimentStoryData, ThrowOnError>) => (options.client ?? client).post<CreateExperimentStoryResponses, CreateExperimentStoryErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/stories',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Unlink a Story from an Experiment\n *\n * Removes an original story from the experiment.\n */\nexport const deleteExperimentStory = <ThrowOnError extends boolean = false>(options: Options<DeleteExperimentStoryData, ThrowOnError>) => (options.client ?? client).delete<DeleteExperimentStoryResponses, DeleteExperimentStoryErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/stories/{story_id}',\n ...options\n});\n\n/**\n * Create a Variant Story Mapping\n *\n * Maps an original story to a variant, optionally duplicating it into a new variant story.\n */\nexport const createStoryMapping = <ThrowOnError extends boolean = false>(options: Options<CreateStoryMappingData, ThrowOnError>) => (options.client ?? client).post<CreateStoryMappingResponses, CreateStoryMappingErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a Variant Story Mapping\n *\n * Removes the mapping between an original story and a variant.\n */\nexport const deleteStoryMapping = <ThrowOnError extends boolean = false>(options: Options<DeleteStoryMappingData, ThrowOnError>) => (options.client ?? client).delete<DeleteStoryMappingResponses, DeleteStoryMappingErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings/{original_story_id}',\n ...options\n});\n\n/**\n * Retrieve Experiment Results\n *\n * Returns the pre-computed result charts for an experiment. Responds with 204 when no results have been pushed yet.\n */\nexport const getResults = <ThrowOnError extends boolean = false>(options: Options<GetResultsData, ThrowOnError>) => (options.client ?? client).get<GetResultsResponses, GetResultsErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/results',\n ...options\n});\n\n/**\n * Push Experiment Results\n *\n * Stores up to 20 pre-computed result charts for an experiment.\n */\nexport const pushResults = <ThrowOnError extends boolean = false>(options: Options<PushResultsData, ThrowOnError>) => (options.client ?? client).post<PushResultsResponses, PushResultsErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/results',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n"],"mappings":";;;;;;;;AAyBA,MAAa,QAA8C,aAA8C,QAAQ,UAAUA,2BAA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AAC;EAAE,MAAM;EAAiB,MAAM;EAAU,EAAE;EAAE,QAAQ;EAAU,MAAM;EAAQ,CAAC;CACzF,KAAK;CACL,GAAG;CACH,SAAS;EACL,gBAAgB;EAChB,GAAG,QAAQ;EACd;CACJ,CAAC;;;;;;AAOF,MAAa,sBAA4D,aAA4D,QAAQ,UAAUA,2BAAQ,OAA4E;CACvO,UAAU,CAAC;EAAE,MAAM;EAAiB,MAAM;EAAU,EAAE;EAAE,QAAQ;EAAU,MAAM;EAAQ,CAAC;CACzF,KAAK;CACL,GAAG;CACN,CAAC;;;;;;AAOF,MAAa,cAAoD,aAAoD,QAAQ,UAAUA,2BAAQ,IAAyD;CACpM,UAAU,CAAC;EAAE,MAAM;EAAiB,MAAM;EAAU,EAAE;EAAE,QAAQ;EAAU,MAAM;EAAQ,CAAC;CACzF,KAAK;CACL,GAAG;CACN,CAAC;;;;;;AAOF,MAAa,eAAqD,aAAqD,QAAQ,UAAUA,2BAAQ,KAA4D;CACzM,UAAU,CAAC;EAAE,MAAM;EAAiB,MAAM;EAAU,EAAE;EAAE,QAAQ;EAAU,MAAM;EAAQ,CAAC;CACzF,KAAK;CACL,GAAG;CACH,SAAS;EACL,gBAAgB;EAChB,GAAG,QAAQ;EACd;CACJ,CAAC"}
@@ -0,0 +1,283 @@
1
+ import { client } from "./client.gen.mjs";
2
+
3
+ //#region src/generated/experiments/sdk.gen.ts
4
+ /**
5
+ * Retrieve Multiple Experiments
6
+ *
7
+ * Returns an array of experiment objects for the space.
8
+ */
9
+ const list = (options) => (options.client ?? client).get({
10
+ security: [{
11
+ name: "Authorization",
12
+ type: "apiKey"
13
+ }, {
14
+ scheme: "bearer",
15
+ type: "http"
16
+ }],
17
+ url: "/v1/spaces/{space_id}/experiments",
18
+ ...options
19
+ });
20
+ /**
21
+ * Create an Experiment
22
+ *
23
+ * Creates a new experiment with its variants.
24
+ */
25
+ const create = (options) => (options.client ?? client).post({
26
+ security: [{
27
+ name: "Authorization",
28
+ type: "apiKey"
29
+ }, {
30
+ scheme: "bearer",
31
+ type: "http"
32
+ }],
33
+ url: "/v1/spaces/{space_id}/experiments",
34
+ ...options,
35
+ headers: {
36
+ "Content-Type": "application/json",
37
+ ...options.headers
38
+ }
39
+ });
40
+ /**
41
+ * Delete an Experiment
42
+ *
43
+ * Deletes an experiment. Only draft or completed experiments can be deleted.
44
+ */
45
+ const delete_ = (options) => (options.client ?? client).delete({
46
+ security: [{
47
+ name: "Authorization",
48
+ type: "apiKey"
49
+ }, {
50
+ scheme: "bearer",
51
+ type: "http"
52
+ }],
53
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
54
+ ...options
55
+ });
56
+ /**
57
+ * Retrieve a Single Experiment
58
+ *
59
+ * Returns a single experiment object by its numeric id.
60
+ */
61
+ const get = (options) => (options.client ?? client).get({
62
+ security: [{
63
+ name: "Authorization",
64
+ type: "apiKey"
65
+ }, {
66
+ scheme: "bearer",
67
+ type: "http"
68
+ }],
69
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
70
+ ...options
71
+ });
72
+ /**
73
+ * Update an Experiment
74
+ *
75
+ * Updates an experiment and its variants. The experiment name cannot be changed after creation.
76
+ */
77
+ const update = (options) => (options.client ?? client).put({
78
+ security: [{
79
+ name: "Authorization",
80
+ type: "apiKey"
81
+ }, {
82
+ scheme: "bearer",
83
+ type: "http"
84
+ }],
85
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}",
86
+ ...options,
87
+ headers: {
88
+ "Content-Type": "application/json",
89
+ ...options.headers
90
+ }
91
+ });
92
+ /**
93
+ * Activate an Experiment
94
+ *
95
+ * Activates (starts or resumes) an experiment, moving it to the running status.
96
+ */
97
+ const activate = (options) => (options.client ?? client).put({
98
+ security: [{
99
+ name: "Authorization",
100
+ type: "apiKey"
101
+ }, {
102
+ scheme: "bearer",
103
+ type: "http"
104
+ }],
105
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/activate",
106
+ ...options
107
+ });
108
+ /**
109
+ * Pause an Experiment
110
+ *
111
+ * Pauses a running experiment.
112
+ */
113
+ const pause = (options) => (options.client ?? client).put({
114
+ security: [{
115
+ name: "Authorization",
116
+ type: "apiKey"
117
+ }, {
118
+ scheme: "bearer",
119
+ type: "http"
120
+ }],
121
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/pause",
122
+ ...options
123
+ });
124
+ /**
125
+ * Complete an Experiment
126
+ *
127
+ * Completes an experiment without selecting a winner.
128
+ */
129
+ const complete = (options) => (options.client ?? client).put({
130
+ security: [{
131
+ name: "Authorization",
132
+ type: "apiKey"
133
+ }, {
134
+ scheme: "bearer",
135
+ type: "http"
136
+ }],
137
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/complete",
138
+ ...options
139
+ });
140
+ /**
141
+ * Complete an Experiment with a Winner
142
+ *
143
+ * Selects a winning variant and completes the experiment.
144
+ */
145
+ const completeWithWinner = (options) => (options.client ?? client).patch({
146
+ security: [{
147
+ name: "Authorization",
148
+ type: "apiKey"
149
+ }, {
150
+ scheme: "bearer",
151
+ type: "http"
152
+ }],
153
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/complete_with_winner",
154
+ ...options
155
+ });
156
+ /**
157
+ * Select a Winning Variant
158
+ *
159
+ * Selects a winning variant without completing the experiment.
160
+ */
161
+ const selectWinner = (options) => (options.client ?? client).patch({
162
+ security: [{
163
+ name: "Authorization",
164
+ type: "apiKey"
165
+ }, {
166
+ scheme: "bearer",
167
+ type: "http"
168
+ }],
169
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/select_winner",
170
+ ...options
171
+ });
172
+ /**
173
+ * Link a Story to an Experiment
174
+ *
175
+ * Adds an original story to the experiment.
176
+ */
177
+ const createExperimentStory = (options) => (options.client ?? client).post({
178
+ security: [{
179
+ name: "Authorization",
180
+ type: "apiKey"
181
+ }, {
182
+ scheme: "bearer",
183
+ type: "http"
184
+ }],
185
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/stories",
186
+ ...options,
187
+ headers: {
188
+ "Content-Type": "application/json",
189
+ ...options.headers
190
+ }
191
+ });
192
+ /**
193
+ * Unlink a Story from an Experiment
194
+ *
195
+ * Removes an original story from the experiment.
196
+ */
197
+ const deleteExperimentStory = (options) => (options.client ?? client).delete({
198
+ security: [{
199
+ name: "Authorization",
200
+ type: "apiKey"
201
+ }, {
202
+ scheme: "bearer",
203
+ type: "http"
204
+ }],
205
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/stories/{story_id}",
206
+ ...options
207
+ });
208
+ /**
209
+ * Create a Variant Story Mapping
210
+ *
211
+ * Maps an original story to a variant, optionally duplicating it into a new variant story.
212
+ */
213
+ const createStoryMapping = (options) => (options.client ?? client).post({
214
+ security: [{
215
+ name: "Authorization",
216
+ type: "apiKey"
217
+ }, {
218
+ scheme: "bearer",
219
+ type: "http"
220
+ }],
221
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings",
222
+ ...options,
223
+ headers: {
224
+ "Content-Type": "application/json",
225
+ ...options.headers
226
+ }
227
+ });
228
+ /**
229
+ * Delete a Variant Story Mapping
230
+ *
231
+ * Removes the mapping between an original story and a variant.
232
+ */
233
+ const deleteStoryMapping = (options) => (options.client ?? client).delete({
234
+ security: [{
235
+ name: "Authorization",
236
+ type: "apiKey"
237
+ }, {
238
+ scheme: "bearer",
239
+ type: "http"
240
+ }],
241
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings/{original_story_id}",
242
+ ...options
243
+ });
244
+ /**
245
+ * Retrieve Experiment Results
246
+ *
247
+ * Returns the pre-computed result charts for an experiment. Responds with 204 when no results have been pushed yet.
248
+ */
249
+ const getResults = (options) => (options.client ?? client).get({
250
+ security: [{
251
+ name: "Authorization",
252
+ type: "apiKey"
253
+ }, {
254
+ scheme: "bearer",
255
+ type: "http"
256
+ }],
257
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/results",
258
+ ...options
259
+ });
260
+ /**
261
+ * Push Experiment Results
262
+ *
263
+ * Stores up to 20 pre-computed result charts for an experiment.
264
+ */
265
+ const pushResults = (options) => (options.client ?? client).post({
266
+ security: [{
267
+ name: "Authorization",
268
+ type: "apiKey"
269
+ }, {
270
+ scheme: "bearer",
271
+ type: "http"
272
+ }],
273
+ url: "/v1/spaces/{space_id}/experiments/{experiment_id}/results",
274
+ ...options,
275
+ headers: {
276
+ "Content-Type": "application/json",
277
+ ...options.headers
278
+ }
279
+ });
280
+
281
+ //#endregion
282
+ export { activate, complete, completeWithWinner, create, createExperimentStory, createStoryMapping, deleteExperimentStory, deleteStoryMapping, delete_, get, getResults, list, pause, pushResults, selectWinner, update };
283
+ //# sourceMappingURL=sdk.gen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.gen.mjs","names":[],"sources":["../../../src/generated/experiments/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, Options as Options2, TDataShape } from '../shared/client';\nimport { client } from './client.gen';\nimport type { ActivateData, ActivateErrors, ActivateResponses, CompleteData, CompleteErrors, CompleteResponses, CompleteWithWinnerData, CompleteWithWinnerErrors, CompleteWithWinnerResponses, CreateData, CreateErrors, CreateExperimentStoryData, CreateExperimentStoryErrors, CreateExperimentStoryResponses, CreateResponses, CreateStoryMappingData, CreateStoryMappingErrors, CreateStoryMappingResponses, DeleteData, DeleteErrors, DeleteExperimentStoryData, DeleteExperimentStoryErrors, DeleteExperimentStoryResponses, DeleteResponses, DeleteStoryMappingData, DeleteStoryMappingErrors, DeleteStoryMappingResponses, GetData, GetErrors, GetResponses, GetResultsData, GetResultsErrors, GetResultsResponses, ListData, ListErrors, ListResponses, PauseData, PauseErrors, PauseResponses, PushResultsData, PushResultsErrors, PushResultsResponses, SelectWinnerData, SelectWinnerErrors, SelectWinnerResponses, UpdateData, UpdateErrors, UpdateResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: Record<string, unknown>;\n};\n\n/**\n * Retrieve Multiple Experiments\n *\n * Returns an array of experiment objects for the space.\n */\nexport const list = <ThrowOnError extends boolean = false>(options: Options<ListData, ThrowOnError>) => (options.client ?? client).get<ListResponses, ListErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments',\n ...options\n});\n\n/**\n * Create an Experiment\n *\n * Creates a new experiment with its variants.\n */\nexport const create = <ThrowOnError extends boolean = false>(options: Options<CreateData, ThrowOnError>) => (options.client ?? client).post<CreateResponses, CreateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete an Experiment\n *\n * Deletes an experiment. Only draft or completed experiments can be deleted.\n */\nexport const delete_ = <ThrowOnError extends boolean = false>(options: Options<DeleteData, ThrowOnError>) => (options.client ?? client).delete<DeleteResponses, DeleteErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options\n});\n\n/**\n * Retrieve a Single Experiment\n *\n * Returns a single experiment object by its numeric id.\n */\nexport const get = <ThrowOnError extends boolean = false>(options: Options<GetData, ThrowOnError>) => (options.client ?? client).get<GetResponses, GetErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options\n});\n\n/**\n * Update an Experiment\n *\n * Updates an experiment and its variants. The experiment name cannot be changed after creation.\n */\nexport const update = <ThrowOnError extends boolean = false>(options: Options<UpdateData, ThrowOnError>) => (options.client ?? client).put<UpdateResponses, UpdateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Activate an Experiment\n *\n * Activates (starts or resumes) an experiment, moving it to the running status.\n */\nexport const activate = <ThrowOnError extends boolean = false>(options: Options<ActivateData, ThrowOnError>) => (options.client ?? client).put<ActivateResponses, ActivateErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/activate',\n ...options\n});\n\n/**\n * Pause an Experiment\n *\n * Pauses a running experiment.\n */\nexport const pause = <ThrowOnError extends boolean = false>(options: Options<PauseData, ThrowOnError>) => (options.client ?? client).put<PauseResponses, PauseErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/pause',\n ...options\n});\n\n/**\n * Complete an Experiment\n *\n * Completes an experiment without selecting a winner.\n */\nexport const complete = <ThrowOnError extends boolean = false>(options: Options<CompleteData, ThrowOnError>) => (options.client ?? client).put<CompleteResponses, CompleteErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/complete',\n ...options\n});\n\n/**\n * Complete an Experiment with a Winner\n *\n * Selects a winning variant and completes the experiment.\n */\nexport const completeWithWinner = <ThrowOnError extends boolean = false>(options: Options<CompleteWithWinnerData, ThrowOnError>) => (options.client ?? client).patch<CompleteWithWinnerResponses, CompleteWithWinnerErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/complete_with_winner',\n ...options\n});\n\n/**\n * Select a Winning Variant\n *\n * Selects a winning variant without completing the experiment.\n */\nexport const selectWinner = <ThrowOnError extends boolean = false>(options: Options<SelectWinnerData, ThrowOnError>) => (options.client ?? client).patch<SelectWinnerResponses, SelectWinnerErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/select_winner',\n ...options\n});\n\n/**\n * Link a Story to an Experiment\n *\n * Adds an original story to the experiment.\n */\nexport const createExperimentStory = <ThrowOnError extends boolean = false>(options: Options<CreateExperimentStoryData, ThrowOnError>) => (options.client ?? client).post<CreateExperimentStoryResponses, CreateExperimentStoryErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/stories',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Unlink a Story from an Experiment\n *\n * Removes an original story from the experiment.\n */\nexport const deleteExperimentStory = <ThrowOnError extends boolean = false>(options: Options<DeleteExperimentStoryData, ThrowOnError>) => (options.client ?? client).delete<DeleteExperimentStoryResponses, DeleteExperimentStoryErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/stories/{story_id}',\n ...options\n});\n\n/**\n * Create a Variant Story Mapping\n *\n * Maps an original story to a variant, optionally duplicating it into a new variant story.\n */\nexport const createStoryMapping = <ThrowOnError extends boolean = false>(options: Options<CreateStoryMappingData, ThrowOnError>) => (options.client ?? client).post<CreateStoryMappingResponses, CreateStoryMappingErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a Variant Story Mapping\n *\n * Removes the mapping between an original story and a variant.\n */\nexport const deleteStoryMapping = <ThrowOnError extends boolean = false>(options: Options<DeleteStoryMappingData, ThrowOnError>) => (options.client ?? client).delete<DeleteStoryMappingResponses, DeleteStoryMappingErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/variants/{variant_id}/story_mappings/{original_story_id}',\n ...options\n});\n\n/**\n * Retrieve Experiment Results\n *\n * Returns the pre-computed result charts for an experiment. Responds with 204 when no results have been pushed yet.\n */\nexport const getResults = <ThrowOnError extends boolean = false>(options: Options<GetResultsData, ThrowOnError>) => (options.client ?? client).get<GetResultsResponses, GetResultsErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/results',\n ...options\n});\n\n/**\n * Push Experiment Results\n *\n * Stores up to 20 pre-computed result charts for an experiment.\n */\nexport const pushResults = <ThrowOnError extends boolean = false>(options: Options<PushResultsData, ThrowOnError>) => (options.client ?? client).post<PushResultsResponses, PushResultsErrors, ThrowOnError>({\n security: [{ name: 'Authorization', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n url: '/v1/spaces/{space_id}/experiments/{experiment_id}/results',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n"],"mappings":";;;;;;;;AAyBA,MAAa,QAA8C,aAA8C,QAAQ,UAAU,QAAQ,IAA6C;CAC5K,UAAU,CAAC;EAAE,MAAM;EAAiB,MAAM;EAAU,EAAE;EAAE,QAAQ;EAAU,MAAM;EAAQ,CAAC;CACzF,KAAK;CACL,GAAG;CACN,CAAC;;;;;;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