@functional-systems/lambdadb 0.5.0-rc.2 → 0.5.0-rc.3

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 (45) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/README.md +4 -2
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/models/operations/bulkupsertdocs.d.ts +3 -3
  6. package/dist/commonjs/models/operations/bulkupsertdocs.d.ts.map +1 -1
  7. package/dist/commonjs/models/operations/bulkupsertdocs.js +1 -1
  8. package/dist/commonjs/models/operations/bulkupsertdocs.js.map +1 -1
  9. package/dist/commonjs/models/versioning.d.ts +24 -4
  10. package/dist/commonjs/models/versioning.d.ts.map +1 -1
  11. package/dist/commonjs/models/versioning.js +16 -3
  12. package/dist/commonjs/models/versioning.js.map +1 -1
  13. package/dist/commonjs/types/public.d.ts +20 -7
  14. package/dist/commonjs/types/public.d.ts.map +1 -1
  15. package/dist/commonjs/types/public.js +22 -3
  16. package/dist/commonjs/types/public.js.map +1 -1
  17. package/dist/commonjs/versioning.d.ts +1 -1
  18. package/dist/commonjs/versioning.d.ts.map +1 -1
  19. package/dist/commonjs/versioning.js +9 -9
  20. package/dist/commonjs/versioning.js.map +1 -1
  21. package/dist/esm/lib/config.d.ts +2 -2
  22. package/dist/esm/lib/config.js +2 -2
  23. package/dist/esm/models/operations/bulkupsertdocs.d.ts +3 -3
  24. package/dist/esm/models/operations/bulkupsertdocs.d.ts.map +1 -1
  25. package/dist/esm/models/operations/bulkupsertdocs.js +1 -1
  26. package/dist/esm/models/operations/bulkupsertdocs.js.map +1 -1
  27. package/dist/esm/models/versioning.d.ts +24 -4
  28. package/dist/esm/models/versioning.d.ts.map +1 -1
  29. package/dist/esm/models/versioning.js +15 -2
  30. package/dist/esm/models/versioning.js.map +1 -1
  31. package/dist/esm/types/public.d.ts +20 -7
  32. package/dist/esm/types/public.d.ts.map +1 -1
  33. package/dist/esm/types/public.js +19 -2
  34. package/dist/esm/types/public.js.map +1 -1
  35. package/dist/esm/versioning.d.ts +1 -1
  36. package/dist/esm/versioning.d.ts.map +1 -1
  37. package/dist/esm/versioning.js +11 -11
  38. package/dist/esm/versioning.js.map +1 -1
  39. package/jsr.json +1 -1
  40. package/package.json +1 -1
  41. package/src/lib/config.ts +2 -2
  42. package/src/models/operations/bulkupsertdocs.ts +4 -4
  43. package/src/models/versioning.ts +38 -5
  44. package/src/types/public.ts +40 -8
  45. package/src/versioning.ts +13 -11
package/src/versioning.ts CHANGED
@@ -13,7 +13,8 @@ import type { SDKValidationError } from "./models/errors/sdkvalidationerror.js";
13
13
  import {
14
14
  AliasDetails$inboundSchema,
15
15
  AliasTarget$schema,
16
- RefDetails$inboundSchema,
16
+ BranchDetails$inboundSchema,
17
+ TagDetails$inboundSchema,
17
18
  RefSource$schema,
18
19
  type AliasRef,
19
20
  type BranchRef,
@@ -30,7 +31,8 @@ import type {
30
31
  } from "./models/errors/httpclienterrors.js";
31
32
  import {
32
33
  aliasDetailsWithDate,
33
- refDetailsWithDate,
34
+ branchDetailsWithDates,
35
+ tagDetailsWithDates,
34
36
  type AliasResponse,
35
37
  type CreateAliasInput,
36
38
  type CreateBranchInput,
@@ -47,7 +49,7 @@ import type { Result } from "./types/fp.js";
47
49
 
48
50
  /** Exact public contract revision implemented by this SDK. */
49
51
  export const DATA_VERSIONING_CONTRACT_REVISION =
50
- "b171ff0a408bbeb024535941b83b861d205a829f" as const;
52
+ "c8495bf47cd8918cfd546b4742823fd4cf3d0814" as const;
51
53
 
52
54
  const refNamePattern = /^[a-zA-Z0-9_-]{3,52}$/;
53
55
  const refNameSchema = z.string().regex(refNamePattern);
@@ -237,15 +239,15 @@ const createBranchSchema: z.ZodType<CreateBranchInput> = z.object({
237
239
  branchName: z.string().regex(refNamePattern),
238
240
  source: RefSource$schema.optional(),
239
241
  }).strict();
240
- const createBranchResponseSchema = z.object({ branch: RefDetails$inboundSchema });
241
- const listBranchesResponseSchema = z.object({ branches: z.array(RefDetails$inboundSchema) });
242
+ const createBranchResponseSchema = z.object({ branch: BranchDetails$inboundSchema });
243
+ const listBranchesResponseSchema = z.object({ branches: z.array(BranchDetails$inboundSchema) });
242
244
 
243
245
  const createTagSchema: z.ZodType<CreateTagInput> = z.object({
244
246
  tagName: z.string().regex(refNamePattern),
245
247
  source: RefSource$schema.optional(),
246
248
  }).strict();
247
- const createTagResponseSchema = z.object({ tag: RefDetails$inboundSchema });
248
- const listTagsResponseSchema = z.object({ tags: z.array(RefDetails$inboundSchema) });
249
+ const createTagResponseSchema = z.object({ tag: TagDetails$inboundSchema });
250
+ const listTagsResponseSchema = z.object({ tags: z.array(TagDetails$inboundSchema) });
249
251
 
250
252
  const createAliasSchema: z.ZodType<CreateAliasInput> = z.object({
251
253
  aliasName: z.string().regex(refNamePattern),
@@ -284,7 +286,7 @@ export class CollectionBranches {
284
286
  conflict: "already-exists",
285
287
  }, options);
286
288
  if (!result.ok) return result;
287
- return { ok: true, value: { branch: refDetailsWithDate(result.value.branch) } };
289
+ return { ok: true, value: { branch: branchDetailsWithDates(result.value.branch) } };
288
290
  }
289
291
 
290
292
  async list(options?: RequestOptions): Promise<ListBranchesResponse> {
@@ -301,7 +303,7 @@ export class CollectionBranches {
301
303
  successStatus: 200,
302
304
  }, options);
303
305
  if (!result.ok) return result;
304
- return { ok: true, value: { branches: result.value.branches.map(refDetailsWithDate) } };
306
+ return { ok: true, value: { branches: result.value.branches.map(branchDetailsWithDates) } };
305
307
  }
306
308
 
307
309
  async delete(branchName: string, options?: RequestOptions): Promise<MessageResponse> {
@@ -356,7 +358,7 @@ export class CollectionTags {
356
358
  conflict: "already-exists",
357
359
  }, options);
358
360
  if (!result.ok) return result;
359
- return { ok: true, value: { tag: refDetailsWithDate(result.value.tag) } };
361
+ return { ok: true, value: { tag: tagDetailsWithDates(result.value.tag) } };
360
362
  }
361
363
 
362
364
  async list(options?: RequestOptions): Promise<ListTagsResponse> {
@@ -373,7 +375,7 @@ export class CollectionTags {
373
375
  successStatus: 200,
374
376
  }, options);
375
377
  if (!result.ok) return result;
376
- return { ok: true, value: { tags: result.value.tags.map(refDetailsWithDate) } };
378
+ return { ok: true, value: { tags: result.value.tags.map(tagDetailsWithDates) } };
377
379
  }
378
380
 
379
381
  async delete(tagName: string, options?: RequestOptions): Promise<MessageResponse> {