@boboddy/sdk 0.0.13-alpha → 0.0.16-alpha

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 (34) hide show
  1. package/dist/boboddy-config-parser.d.ts +34 -0
  2. package/dist/boboddy-config-parser.js +510 -0
  3. package/dist/client.d.ts +3 -1
  4. package/dist/client.js +1402 -45
  5. package/dist/define-step.d.ts +21 -1
  6. package/dist/define-step.js +11065 -69
  7. package/dist/generated/client/client.gen.d.ts +2 -0
  8. package/dist/generated/client/index.d.ts +8 -0
  9. package/dist/generated/client/types.gen.d.ts +117 -0
  10. package/dist/generated/client/utils.gen.d.ts +33 -0
  11. package/dist/generated/client.gen.d.ts +12 -0
  12. package/dist/generated/core/auth.gen.d.ts +18 -0
  13. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/generated/core/params.gen.d.ts +43 -0
  15. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  16. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  17. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  18. package/dist/generated/core/types.gen.d.ts +78 -0
  19. package/dist/generated/core/utils.gen.d.ts +19 -0
  20. package/dist/generated/index.d.ts +2 -0
  21. package/dist/generated/sdk.gen.d.ts +162 -0
  22. package/dist/generated/types.gen.d.ts +9193 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.js +16288 -957
  25. package/dist/jsonc.d.ts +3 -0
  26. package/dist/jsonc.js +133 -0
  27. package/dist/opencode-mcp.d.ts +73 -0
  28. package/dist/opencode-mcp.js +14326 -0
  29. package/dist/step-definitions-client.d.ts +138 -143
  30. package/dist/step-definitions-client.js +1354 -29
  31. package/dist/step-execution-plane-client.d.ts +107 -287
  32. package/package.json +30 -17
  33. package/dist/treaty.d.ts +0 -13
  34. package/dist/treaty.js +0 -34
@@ -1,13 +1,12 @@
1
- import type { App } from "@boboddy/api/app";
2
- import { createBoboddyTreaty } from "./treaty";
3
- type JsonValue = string | number | boolean | null | {
4
- [key: string]: JsonValue;
5
- } | JsonValue[];
1
+ import { StepExecutions } from "./generated/sdk.gen";
6
2
  type RequestOptions = {
7
3
  headers?: Record<string, unknown> | undefined;
8
4
  };
9
- export declare function createStepExecutionPlaneClient(baseUrlOrApp: string | App): ReturnType<typeof buildStepExecutionPlaneClient>;
10
- declare const buildStepExecutionPlaneClient: (apiClient: ReturnType<typeof createBoboddyTreaty>) => {
5
+ type JsonValue = string | number | boolean | null | {
6
+ [key: string]: JsonValue;
7
+ } | JsonValue[];
8
+ export declare function createStepExecutionPlaneClient(baseUrl: string): ReturnType<typeof buildStepExecutionPlaneClient>;
9
+ declare const buildStepExecutionPlaneClient: (stepExecutions: StepExecutions) => {
11
10
  claimStepExecutions: (body: {
12
11
  projectId: string;
13
12
  workerId: string;
@@ -16,54 +15,40 @@ declare const buildStepExecutionPlaneClient: (apiClient: ReturnType<typeof creat
16
15
  workItemId?: string | undefined;
17
16
  }, options?: RequestOptions) => Promise<{
18
17
  stepExecution: {
19
- id: string & {
20
- readonly __brand: "uuidv7";
21
- };
22
- projectId: string & {
23
- readonly __brand: "uuidv7";
24
- };
25
- stepDefinitionId: string & {
26
- readonly __brand: "uuidv7";
27
- };
18
+ id: string;
19
+ projectId: string;
20
+ stepDefinitionId: string;
28
21
  stepDefinitionVersion: number;
29
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
30
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
31
- claimedBy: string | null;
32
- claimedAt: string | null;
33
- lastHeartbeatAt: string | null;
34
- leaseExpiresAt: string | null;
35
- executionTimeoutSeconds: number | null;
36
- executionDeadlineAt: string | null;
37
- startedAt: string | null;
38
- completedAt: string | null;
39
- results: {
40
- id: string & {
41
- readonly __brand: "uuidv7";
42
- };
43
- stepExecutionId: string & {
44
- readonly __brand: "uuidv7";
45
- };
22
+ status: "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped";
23
+ inputJson: unknown;
24
+ claimedBy: string | unknown;
25
+ claimedAt: string | unknown;
26
+ lastHeartbeatAt: string | unknown;
27
+ leaseExpiresAt: string | unknown;
28
+ executionTimeoutSeconds: number | unknown;
29
+ executionDeadlineAt: string | unknown;
30
+ startedAt: string | unknown;
31
+ completedAt: string | unknown;
32
+ results: Array<{
33
+ id: string;
34
+ stepExecutionId: string;
46
35
  attempt: number;
47
36
  status: "succeeded" | "failed";
48
- resultJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
49
- errorJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
50
- signals: {
51
- id: string & {
52
- readonly __brand: "uuidv7";
53
- };
54
- stepExecutionResultId: string & {
55
- readonly __brand: "uuidv7";
56
- };
37
+ resultJson: unknown;
38
+ errorJson: unknown;
39
+ signals: Array<{
40
+ id: string;
41
+ stepExecutionResultId: string;
57
42
  key: string;
58
43
  type: "string" | "number" | "boolean" | "object" | "array";
59
44
  source: "extracted" | "computed";
60
- valueJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
61
- sourcePath: string | null;
62
- computedFromSignalKeys: string[] | null;
45
+ valueJson: unknown;
46
+ sourcePath: string | unknown;
47
+ computedFromSignalKeys: Array<string> | unknown;
63
48
  createdAt: string;
64
- }[];
49
+ }>;
65
50
  createdAt: string;
66
- }[];
51
+ }>;
67
52
  createdAt: string;
68
53
  updatedAt: string;
69
54
  };
@@ -72,181 +57,118 @@ declare const buildStepExecutionPlaneClient: (apiClient: ReturnType<typeof creat
72
57
  heartbeatStepExecution: (stepExecutionId: string, body: {
73
58
  claimToken: string;
74
59
  leaseDurationSeconds: number;
75
- }, options?: RequestOptions) => Promise<{
76
- id: string & {
77
- readonly __brand: "uuidv7";
78
- };
79
- projectId: string & {
80
- readonly __brand: "uuidv7";
81
- };
82
- stepDefinitionId: string & {
83
- readonly __brand: "uuidv7";
84
- };
85
- stepDefinitionVersion: number;
86
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
87
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
88
- claimedBy: string | null;
89
- claimedAt: string | null;
90
- lastHeartbeatAt: string | null;
91
- leaseExpiresAt: string | null;
92
- executionTimeoutSeconds: number | null;
93
- executionDeadlineAt: string | null;
94
- startedAt: string | null;
95
- completedAt: string | null;
96
- results: {
97
- id: string & {
98
- readonly __brand: "uuidv7";
99
- };
100
- stepExecutionId: string & {
101
- readonly __brand: "uuidv7";
102
- };
103
- attempt: number;
104
- status: "succeeded" | "failed";
105
- resultJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
106
- errorJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
107
- signals: {
108
- id: string & {
109
- readonly __brand: "uuidv7";
110
- };
111
- stepExecutionResultId: string & {
112
- readonly __brand: "uuidv7";
113
- };
114
- key: string;
115
- type: "string" | "number" | "boolean" | "object" | "array";
116
- source: "extracted" | "computed";
117
- valueJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
118
- sourcePath: string | null;
119
- computedFromSignalKeys: string[] | null;
120
- createdAt: string;
121
- }[];
122
- createdAt: string;
123
- }[];
124
- createdAt: string;
125
- updatedAt: string;
126
- }>;
60
+ }, options?: RequestOptions) => Promise<void>;
127
61
  getStepExecution: (stepExecutionId: string, options?: RequestOptions) => Promise<{
128
- id: string & {
129
- readonly __brand: "uuidv7";
130
- };
131
- projectId: string & {
132
- readonly __brand: "uuidv7";
133
- };
134
- stepDefinitionId: string & {
135
- readonly __brand: "uuidv7";
136
- };
62
+ id: string;
63
+ projectId: string;
64
+ stepDefinitionId: string;
137
65
  stepDefinitionVersion: number;
138
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
139
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
140
- claimedBy: string | null;
141
- claimedAt: string | null;
142
- lastHeartbeatAt: string | null;
143
- leaseExpiresAt: string | null;
144
- executionTimeoutSeconds: number | null;
145
- executionDeadlineAt: string | null;
146
- startedAt: string | null;
147
- completedAt: string | null;
148
- results: {
149
- id: string & {
150
- readonly __brand: "uuidv7";
151
- };
152
- stepExecutionId: string & {
153
- readonly __brand: "uuidv7";
154
- };
66
+ status: "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped";
67
+ inputJson: unknown;
68
+ claimedBy: string | unknown;
69
+ claimedAt: string | unknown;
70
+ lastHeartbeatAt: string | unknown;
71
+ leaseExpiresAt: string | unknown;
72
+ executionTimeoutSeconds: number | unknown;
73
+ executionDeadlineAt: string | unknown;
74
+ startedAt: string | unknown;
75
+ completedAt: string | unknown;
76
+ results: Array<{
77
+ id: string;
78
+ stepExecutionId: string;
155
79
  attempt: number;
156
80
  status: "succeeded" | "failed";
157
- resultJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
158
- errorJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
159
- signals: {
160
- id: string & {
161
- readonly __brand: "uuidv7";
162
- };
163
- stepExecutionResultId: string & {
164
- readonly __brand: "uuidv7";
165
- };
81
+ resultJson: unknown;
82
+ errorJson: unknown;
83
+ signals: Array<{
84
+ id: string;
85
+ stepExecutionResultId: string;
166
86
  key: string;
167
87
  type: "string" | "number" | "boolean" | "object" | "array";
168
88
  source: "extracted" | "computed";
169
- valueJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
170
- sourcePath: string | null;
171
- computedFromSignalKeys: string[] | null;
89
+ valueJson: unknown;
90
+ sourcePath: string | unknown;
91
+ computedFromSignalKeys: Array<string> | unknown;
172
92
  createdAt: string;
173
- }[];
93
+ }>;
174
94
  createdAt: string;
175
- }[];
95
+ }>;
176
96
  createdAt: string;
177
97
  updatedAt: string;
178
98
  }>;
179
99
  getStepExecutionWorkerContext: (stepExecutionId: string, body: {
180
100
  claimToken: string;
181
101
  }, options?: RequestOptions) => Promise<{
182
- projectId: string & {
183
- readonly __brand: "uuidv7";
184
- };
102
+ projectId: string;
185
103
  gitUrl: string;
186
- requestedBranch: string | null;
104
+ requestedBranch: string | unknown;
187
105
  projectOpencodeConfig: {
188
106
  relativePath: string;
189
107
  present: boolean;
190
- commands: {
108
+ commands: Array<{
191
109
  name: string;
192
110
  description: string;
193
111
  run: string;
194
- cwd: string | null;
195
- }[];
196
- services: {
112
+ cwd: string | unknown;
113
+ }>;
114
+ services: Array<{
197
115
  name: string;
198
116
  description: string;
199
117
  run: string;
200
- cwd: string | null;
201
- dependsOn: string[];
118
+ cwd: string | unknown;
119
+ dependsOn: Array<string>;
202
120
  expose: {
203
121
  targetPort: number;
204
122
  protocol: "tcp" | "http";
205
123
  };
206
124
  healthcheck: {
207
125
  protocol: "tcp" | "http";
208
- path: string | null;
209
- expectedStatus: number | null;
126
+ path: string | unknown;
127
+ expectedStatus: number | unknown;
210
128
  };
211
- }[];
129
+ }>;
212
130
  };
213
131
  stepExecution: {
214
- id: string & {
215
- readonly __brand: "uuidv7";
216
- };
217
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
218
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
219
- executionTimeoutSeconds: number | null;
132
+ id: string;
133
+ status: "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped";
134
+ inputJson: unknown;
135
+ executionTimeoutSeconds: number | unknown;
220
136
  };
221
137
  stepDefinition: {
222
- id: string & {
223
- readonly __brand: "uuidv7";
224
- };
138
+ id: string;
225
139
  key: string;
226
140
  name: string;
227
141
  prompt: string;
228
- resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
229
- opencodeMcpJson: Record<string, {
230
- type: "local";
231
- command: string[];
232
- environment?: Record<string, string> | undefined;
233
- enabled?: boolean | undefined;
234
- timeout?: number | undefined;
235
- } | {
236
- type: "remote";
237
- url: string;
238
- enabled?: boolean | undefined;
239
- headers?: Record<string, string> | undefined;
240
- oauth?: false | {
241
- clientId?: string | undefined;
242
- clientSecret?: string | undefined;
243
- scope?: string | undefined;
244
- redirectUri?: string | undefined;
245
- } | undefined;
246
- timeout?: number | undefined;
247
- } | {
248
- enabled: boolean;
249
- }> | null;
142
+ resultSchemaJson: {
143
+ [key: string]: unknown;
144
+ } | unknown;
145
+ opencodeMcpJson: {
146
+ [key: string]: {
147
+ type: string;
148
+ command: Array<string>;
149
+ environment?: {
150
+ [key: string]: string;
151
+ };
152
+ enabled?: boolean;
153
+ timeout?: number;
154
+ } | {
155
+ type: string;
156
+ url: string;
157
+ enabled?: boolean;
158
+ headers?: {
159
+ [key: string]: string;
160
+ };
161
+ oauth?: {
162
+ clientId?: string;
163
+ clientSecret?: string;
164
+ scope?: string;
165
+ redirectUri?: string;
166
+ } | boolean;
167
+ timeout?: number;
168
+ } | {
169
+ enabled: boolean;
170
+ };
171
+ } | unknown;
250
172
  };
251
173
  agentPrompt: {
252
174
  sessionTitle: string;
@@ -258,113 +180,11 @@ declare const buildStepExecutionPlaneClient: (apiClient: ReturnType<typeof creat
258
180
  status: "succeeded" | "failed";
259
181
  resultJson: JsonValue;
260
182
  errorJson: JsonValue;
261
- }, options?: RequestOptions) => Promise<{
262
- id: string & {
263
- readonly __brand: "uuidv7";
264
- };
265
- projectId: string & {
266
- readonly __brand: "uuidv7";
267
- };
268
- stepDefinitionId: string & {
269
- readonly __brand: "uuidv7";
270
- };
271
- stepDefinitionVersion: number;
272
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
273
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
274
- claimedBy: string | null;
275
- claimedAt: string | null;
276
- lastHeartbeatAt: string | null;
277
- leaseExpiresAt: string | null;
278
- executionTimeoutSeconds: number | null;
279
- executionDeadlineAt: string | null;
280
- startedAt: string | null;
281
- completedAt: string | null;
282
- results: {
283
- id: string & {
284
- readonly __brand: "uuidv7";
285
- };
286
- stepExecutionId: string & {
287
- readonly __brand: "uuidv7";
288
- };
289
- attempt: number;
290
- status: "succeeded" | "failed";
291
- resultJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
292
- errorJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
293
- signals: {
294
- id: string & {
295
- readonly __brand: "uuidv7";
296
- };
297
- stepExecutionResultId: string & {
298
- readonly __brand: "uuidv7";
299
- };
300
- key: string;
301
- type: "string" | "number" | "boolean" | "object" | "array";
302
- source: "extracted" | "computed";
303
- valueJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
304
- sourcePath: string | null;
305
- computedFromSignalKeys: string[] | null;
306
- createdAt: string;
307
- }[];
308
- createdAt: string;
309
- }[];
310
- createdAt: string;
311
- updatedAt: string;
312
- }>;
183
+ }, options?: RequestOptions) => Promise<void>;
313
184
  failStepExecution: (stepExecutionId: string, body: {
314
185
  claimToken: string;
315
186
  resultJson: JsonValue;
316
187
  errorJson: JsonValue;
317
- }, options?: RequestOptions) => Promise<{
318
- id: string & {
319
- readonly __brand: "uuidv7";
320
- };
321
- projectId: string & {
322
- readonly __brand: "uuidv7";
323
- };
324
- stepDefinitionId: string & {
325
- readonly __brand: "uuidv7";
326
- };
327
- stepDefinitionVersion: number;
328
- status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped" | "timeout" | "abandoned";
329
- inputJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
330
- claimedBy: string | null;
331
- claimedAt: string | null;
332
- lastHeartbeatAt: string | null;
333
- leaseExpiresAt: string | null;
334
- executionTimeoutSeconds: number | null;
335
- executionDeadlineAt: string | null;
336
- startedAt: string | null;
337
- completedAt: string | null;
338
- results: {
339
- id: string & {
340
- readonly __brand: "uuidv7";
341
- };
342
- stepExecutionId: string & {
343
- readonly __brand: "uuidv7";
344
- };
345
- attempt: number;
346
- status: "succeeded" | "failed";
347
- resultJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
348
- errorJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
349
- signals: {
350
- id: string & {
351
- readonly __brand: "uuidv7";
352
- };
353
- stepExecutionResultId: string & {
354
- readonly __brand: "uuidv7";
355
- };
356
- key: string;
357
- type: "string" | "number" | "boolean" | "object" | "array";
358
- source: "extracted" | "computed";
359
- valueJson: import("@boboddy/core/common/contracts/json").AnyJsonValue;
360
- sourcePath: string | null;
361
- computedFromSignalKeys: string[] | null;
362
- createdAt: string;
363
- }[];
364
- createdAt: string;
365
- }[];
366
- createdAt: string;
367
- updatedAt: string;
368
- }>;
188
+ }, options?: RequestOptions) => Promise<void>;
369
189
  };
370
190
  export {};
package/package.json CHANGED
@@ -1,29 +1,43 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@boboddy/sdk",
4
- "version": "0.0.13-alpha",
4
+ "version": "0.0.16-alpha",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
- "import": "./dist/index.js",
9
- "types": "./dist/index.d.ts"
8
+ "types": "./src/index.ts",
9
+ "bun": "./src/index.ts",
10
+ "import": "./dist/index.js"
10
11
  },
11
12
  "./client": {
12
- "import": "./dist/client.js",
13
- "types": "./dist/client.d.ts"
14
- },
15
- "./treaty": {
16
- "import": "./dist/treaty.js",
17
- "types": "./dist/treaty.d.ts"
13
+ "types": "./src/client.ts",
14
+ "bun": "./src/client.ts",
15
+ "import": "./dist/client.js"
18
16
  },
19
17
  "./define-step": {
18
+ "types": "./src/define-step.ts",
20
19
  "bun": "./src/define-step.ts",
21
- "import": "./dist/define-step.js",
22
- "types": "./dist/define-step.d.ts"
20
+ "import": "./dist/define-step.js"
23
21
  },
24
22
  "./step-definitions-client": {
25
- "import": "./dist/step-definitions-client.js",
26
- "types": "./dist/step-definitions-client.d.ts"
23
+ "types": "./src/step-definitions-client.ts",
24
+ "bun": "./src/step-definitions-client.ts",
25
+ "import": "./dist/step-definitions-client.js"
26
+ },
27
+ "./opencode-mcp": {
28
+ "types": "./src/opencode-mcp.ts",
29
+ "bun": "./src/opencode-mcp.ts",
30
+ "import": "./dist/opencode-mcp.js"
31
+ },
32
+ "./jsonc": {
33
+ "types": "./src/jsonc.ts",
34
+ "bun": "./src/jsonc.ts",
35
+ "import": "./dist/jsonc.js"
36
+ },
37
+ "./boboddy-config-parser": {
38
+ "types": "./src/boboddy-config-parser.ts",
39
+ "bun": "./src/boboddy-config-parser.ts",
40
+ "import": "./dist/boboddy-config-parser.js"
27
41
  }
28
42
  },
29
43
  "files": [
@@ -34,12 +48,11 @@
34
48
  "access": "public"
35
49
  },
36
50
  "scripts": {
51
+ "generate": "openapi-ts",
37
52
  "build": "bun run script/build.ts",
53
+ "declarations": "bun run script/declarations.ts",
38
54
  "test": "bun test test",
39
- "typecheck": "tsc -p tsconfig.json --noEmit"
40
- },
41
- "dependencies": {
42
- "@elysiajs/eden": "^1.4.9"
55
+ "typecheck": "tsgo -p tsconfig.json --noEmit"
43
56
  },
44
57
  "peerDependencies": {
45
58
  "zod": ">=4.0.0"
package/dist/treaty.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { treaty } from "@elysiajs/eden";
2
- import type { App } from "@boboddy/api/app";
3
- export declare function createBoboddyTreaty(baseUrlOrApp: string | App): ReturnType<typeof treaty<App>>;
4
- export type BoboddyTreaty = ReturnType<typeof createBoboddyTreaty>;
5
- type EdenResult<T> = {
6
- data: T | null | undefined;
7
- error: {
8
- value: unknown;
9
- } | null | undefined;
10
- };
11
- export declare const unwrapTreatyResponse: <T>(promise: Promise<EdenResult<T>>) => Promise<T>;
12
- export declare const createBoboddyApiClient: typeof createBoboddyTreaty;
13
- export {};
package/dist/treaty.js DELETED
@@ -1,34 +0,0 @@
1
- // src/treaty.ts
2
- import { treaty } from "@elysiajs/eden";
3
- var TRAILING_SLASHES_PATTERN = /\/+$/u;
4
- var API_SUFFIX_PATTERN = /\/api$/u;
5
- var normalizeBoboddyBaseUrl = (baseUrl) => {
6
- const trimmedBaseUrl = baseUrl.trim();
7
- if (trimmedBaseUrl.length === 0) {
8
- return "";
9
- }
10
- return trimmedBaseUrl.replace(TRAILING_SLASHES_PATTERN, "").replace(API_SUFFIX_PATTERN, "");
11
- };
12
- function createBoboddyTreaty(baseUrlOrApp) {
13
- if (typeof baseUrlOrApp === "string") {
14
- return treaty(normalizeBoboddyBaseUrl(baseUrlOrApp), {
15
- parseDate: false
16
- });
17
- }
18
- return treaty(baseUrlOrApp, {
19
- parseDate: false
20
- });
21
- }
22
- var unwrapTreatyResponse = async (promise) => {
23
- const { data, error } = await promise;
24
- if (error) {
25
- throw error.value;
26
- }
27
- return data;
28
- };
29
- var createBoboddyApiClient = createBoboddyTreaty;
30
- export {
31
- unwrapTreatyResponse,
32
- createBoboddyTreaty,
33
- createBoboddyApiClient
34
- };