@cipherstash/stack 0.10.0 → 0.12.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/CHANGELOG.md +18 -0
- package/README.md +38 -18
- package/dist/bin/stash.js +160 -117
- package/dist/bin/stash.js.map +1 -1
- package/dist/{chunk-HCL75LXQ.js → chunk-46PDK2Z6.js} +1 -1
- package/dist/chunk-46PDK2Z6.js.map +1 -0
- package/dist/{chunk-3BOJHROP.js → chunk-EHDOOLWU.js} +3 -3
- package/dist/{chunk-Y3KSTOVR.js → chunk-GNLU3I27.js} +14 -3
- package/dist/chunk-GNLU3I27.js.map +1 -0
- package/dist/{chunk-4C52Q5R6.js → chunk-O4MBO4DJ.js} +8 -22
- package/dist/chunk-O4MBO4DJ.js.map +1 -0
- package/dist/{client-_63nbmO7.d.ts → client-CZLBiToT.d.ts} +1 -7
- package/dist/{client-CV7X5Hrt.d.cts → client-bW-5wG9Y.d.cts} +1 -7
- package/dist/client.cjs +13 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/drizzle/index.cjs +13 -2
- package/dist/drizzle/index.cjs.map +1 -1
- package/dist/drizzle/index.d.cts +2 -2
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +2 -2
- package/dist/dynamodb/index.d.cts +2 -2
- package/dist/dynamodb/index.d.ts +2 -2
- package/dist/encryption/index.cjs +22 -96
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +2 -2
- package/dist/encryption/index.d.ts +2 -2
- package/dist/encryption/index.js +3 -4
- package/dist/index.cjs +29 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/schema/index.cjs +13 -2
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/secrets/index.cjs +29 -81
- package/dist/secrets/index.cjs.map +1 -1
- package/dist/secrets/index.d.cts +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +4 -4
- package/dist/supabase/index.cjs +12 -2
- package/dist/supabase/index.cjs.map +1 -1
- package/dist/supabase/index.d.cts +2 -2
- package/dist/supabase/index.d.ts +2 -2
- package/dist/supabase/index.js +1 -1
- package/dist/{types-public-B5YxQhR6.d.cts → types-public-WADaA-TW.d.cts} +119 -1
- package/dist/{types-public-B5YxQhR6.d.ts → types-public-WADaA-TW.d.ts} +119 -1
- package/dist/types-public.cjs.map +1 -1
- package/dist/types-public.d.cts +1 -1
- package/dist/types-public.d.ts +1 -1
- package/dist/types-public.js +1 -1
- package/package.json +6 -5
- package/dist/chunk-4C52Q5R6.js.map +0 -1
- package/dist/chunk-HCL75LXQ.js.map +0 -1
- package/dist/chunk-Y3KSTOVR.js.map +0 -1
- /package/dist/{chunk-3BOJHROP.js.map → chunk-EHDOOLWU.js.map} +0 -0
|
@@ -22,7 +22,6 @@ type ClientConfig = {
|
|
|
22
22
|
* The CipherStash workspace CRN (Cloud Resource Name).
|
|
23
23
|
* Format: `crn:<region>.aws:<workspace-id>`.
|
|
24
24
|
* Can also be set via the `CS_WORKSPACE_CRN` environment variable.
|
|
25
|
-
* If omitted, the SDK reads from the environment or TOML config files.
|
|
26
25
|
*/
|
|
27
26
|
workspaceCrn?: string;
|
|
28
27
|
/**
|
|
@@ -288,10 +287,33 @@ declare const matchIndexOptsSchema: z.ZodObject<{
|
|
|
288
287
|
}>;
|
|
289
288
|
declare const steVecIndexOptsSchema: z.ZodObject<{
|
|
290
289
|
prefix: z.ZodString;
|
|
290
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
291
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
293
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
item?: boolean | undefined;
|
|
296
|
+
wildcard?: boolean | undefined;
|
|
297
|
+
position?: boolean | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
item?: boolean | undefined;
|
|
300
|
+
wildcard?: boolean | undefined;
|
|
301
|
+
position?: boolean | undefined;
|
|
302
|
+
}>]>>;
|
|
291
303
|
}, "strip", z.ZodTypeAny, {
|
|
292
304
|
prefix: string;
|
|
305
|
+
array_index_mode?: "all" | "none" | {
|
|
306
|
+
item?: boolean | undefined;
|
|
307
|
+
wildcard?: boolean | undefined;
|
|
308
|
+
position?: boolean | undefined;
|
|
309
|
+
} | undefined;
|
|
293
310
|
}, {
|
|
294
311
|
prefix: string;
|
|
312
|
+
array_index_mode?: "all" | "none" | {
|
|
313
|
+
item?: boolean | undefined;
|
|
314
|
+
wildcard?: boolean | undefined;
|
|
315
|
+
position?: boolean | undefined;
|
|
316
|
+
} | undefined;
|
|
295
317
|
}>;
|
|
296
318
|
declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
297
319
|
cast_as: z.ZodDefault<z.ZodEnum<["bigint", "boolean", "date", "number", "string", "json", "text"]>>;
|
|
@@ -370,10 +392,33 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
370
392
|
}>>;
|
|
371
393
|
ste_vec: z.ZodOptional<z.ZodObject<{
|
|
372
394
|
prefix: z.ZodString;
|
|
395
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
396
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
item?: boolean | undefined;
|
|
401
|
+
wildcard?: boolean | undefined;
|
|
402
|
+
position?: boolean | undefined;
|
|
403
|
+
}, {
|
|
404
|
+
item?: boolean | undefined;
|
|
405
|
+
wildcard?: boolean | undefined;
|
|
406
|
+
position?: boolean | undefined;
|
|
407
|
+
}>]>>;
|
|
373
408
|
}, "strip", z.ZodTypeAny, {
|
|
374
409
|
prefix: string;
|
|
410
|
+
array_index_mode?: "all" | "none" | {
|
|
411
|
+
item?: boolean | undefined;
|
|
412
|
+
wildcard?: boolean | undefined;
|
|
413
|
+
position?: boolean | undefined;
|
|
414
|
+
} | undefined;
|
|
375
415
|
}, {
|
|
376
416
|
prefix: string;
|
|
417
|
+
array_index_mode?: "all" | "none" | {
|
|
418
|
+
item?: boolean | undefined;
|
|
419
|
+
wildcard?: boolean | undefined;
|
|
420
|
+
position?: boolean | undefined;
|
|
421
|
+
} | undefined;
|
|
377
422
|
}>>;
|
|
378
423
|
}, "strip", z.ZodTypeAny, {
|
|
379
424
|
match?: {
|
|
@@ -398,6 +443,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
398
443
|
} | undefined;
|
|
399
444
|
ste_vec?: {
|
|
400
445
|
prefix: string;
|
|
446
|
+
array_index_mode?: "all" | "none" | {
|
|
447
|
+
item?: boolean | undefined;
|
|
448
|
+
wildcard?: boolean | undefined;
|
|
449
|
+
position?: boolean | undefined;
|
|
450
|
+
} | undefined;
|
|
401
451
|
} | undefined;
|
|
402
452
|
}, {
|
|
403
453
|
match?: {
|
|
@@ -422,6 +472,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
422
472
|
} | undefined;
|
|
423
473
|
ste_vec?: {
|
|
424
474
|
prefix: string;
|
|
475
|
+
array_index_mode?: "all" | "none" | {
|
|
476
|
+
item?: boolean | undefined;
|
|
477
|
+
wildcard?: boolean | undefined;
|
|
478
|
+
position?: boolean | undefined;
|
|
479
|
+
} | undefined;
|
|
425
480
|
} | undefined;
|
|
426
481
|
}>>;
|
|
427
482
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -449,6 +504,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
449
504
|
} | undefined;
|
|
450
505
|
ste_vec?: {
|
|
451
506
|
prefix: string;
|
|
507
|
+
array_index_mode?: "all" | "none" | {
|
|
508
|
+
item?: boolean | undefined;
|
|
509
|
+
wildcard?: boolean | undefined;
|
|
510
|
+
position?: boolean | undefined;
|
|
511
|
+
} | undefined;
|
|
452
512
|
} | undefined;
|
|
453
513
|
};
|
|
454
514
|
}, {
|
|
@@ -476,6 +536,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
476
536
|
} | undefined;
|
|
477
537
|
ste_vec?: {
|
|
478
538
|
prefix: string;
|
|
539
|
+
array_index_mode?: "all" | "none" | {
|
|
540
|
+
item?: boolean | undefined;
|
|
541
|
+
wildcard?: boolean | undefined;
|
|
542
|
+
position?: boolean | undefined;
|
|
543
|
+
} | undefined;
|
|
479
544
|
} | undefined;
|
|
480
545
|
} | undefined;
|
|
481
546
|
}>>;
|
|
@@ -559,10 +624,33 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
559
624
|
}>>;
|
|
560
625
|
ste_vec: z.ZodOptional<z.ZodObject<{
|
|
561
626
|
prefix: z.ZodString;
|
|
627
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
628
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
629
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
630
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
631
|
+
}, "strip", z.ZodTypeAny, {
|
|
632
|
+
item?: boolean | undefined;
|
|
633
|
+
wildcard?: boolean | undefined;
|
|
634
|
+
position?: boolean | undefined;
|
|
635
|
+
}, {
|
|
636
|
+
item?: boolean | undefined;
|
|
637
|
+
wildcard?: boolean | undefined;
|
|
638
|
+
position?: boolean | undefined;
|
|
639
|
+
}>]>>;
|
|
562
640
|
}, "strip", z.ZodTypeAny, {
|
|
563
641
|
prefix: string;
|
|
642
|
+
array_index_mode?: "all" | "none" | {
|
|
643
|
+
item?: boolean | undefined;
|
|
644
|
+
wildcard?: boolean | undefined;
|
|
645
|
+
position?: boolean | undefined;
|
|
646
|
+
} | undefined;
|
|
564
647
|
}, {
|
|
565
648
|
prefix: string;
|
|
649
|
+
array_index_mode?: "all" | "none" | {
|
|
650
|
+
item?: boolean | undefined;
|
|
651
|
+
wildcard?: boolean | undefined;
|
|
652
|
+
position?: boolean | undefined;
|
|
653
|
+
} | undefined;
|
|
566
654
|
}>>;
|
|
567
655
|
}, "strip", z.ZodTypeAny, {
|
|
568
656
|
match?: {
|
|
@@ -587,6 +675,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
587
675
|
} | undefined;
|
|
588
676
|
ste_vec?: {
|
|
589
677
|
prefix: string;
|
|
678
|
+
array_index_mode?: "all" | "none" | {
|
|
679
|
+
item?: boolean | undefined;
|
|
680
|
+
wildcard?: boolean | undefined;
|
|
681
|
+
position?: boolean | undefined;
|
|
682
|
+
} | undefined;
|
|
590
683
|
} | undefined;
|
|
591
684
|
}, {
|
|
592
685
|
match?: {
|
|
@@ -611,6 +704,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
611
704
|
} | undefined;
|
|
612
705
|
ste_vec?: {
|
|
613
706
|
prefix: string;
|
|
707
|
+
array_index_mode?: "all" | "none" | {
|
|
708
|
+
item?: boolean | undefined;
|
|
709
|
+
wildcard?: boolean | undefined;
|
|
710
|
+
position?: boolean | undefined;
|
|
711
|
+
} | undefined;
|
|
614
712
|
} | undefined;
|
|
615
713
|
}>>;
|
|
616
714
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -638,6 +736,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
638
736
|
} | undefined;
|
|
639
737
|
ste_vec?: {
|
|
640
738
|
prefix: string;
|
|
739
|
+
array_index_mode?: "all" | "none" | {
|
|
740
|
+
item?: boolean | undefined;
|
|
741
|
+
wildcard?: boolean | undefined;
|
|
742
|
+
position?: boolean | undefined;
|
|
743
|
+
} | undefined;
|
|
641
744
|
} | undefined;
|
|
642
745
|
};
|
|
643
746
|
}, {
|
|
@@ -665,6 +768,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
665
768
|
} | undefined;
|
|
666
769
|
ste_vec?: {
|
|
667
770
|
prefix: string;
|
|
771
|
+
array_index_mode?: "all" | "none" | {
|
|
772
|
+
item?: boolean | undefined;
|
|
773
|
+
wildcard?: boolean | undefined;
|
|
774
|
+
position?: boolean | undefined;
|
|
775
|
+
} | undefined;
|
|
668
776
|
} | undefined;
|
|
669
777
|
} | undefined;
|
|
670
778
|
}>>>>>>;
|
|
@@ -695,6 +803,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
695
803
|
} | undefined;
|
|
696
804
|
ste_vec?: {
|
|
697
805
|
prefix: string;
|
|
806
|
+
array_index_mode?: "all" | "none" | {
|
|
807
|
+
item?: boolean | undefined;
|
|
808
|
+
wildcard?: boolean | undefined;
|
|
809
|
+
position?: boolean | undefined;
|
|
810
|
+
} | undefined;
|
|
698
811
|
} | undefined;
|
|
699
812
|
};
|
|
700
813
|
}>>;
|
|
@@ -725,6 +838,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
725
838
|
} | undefined;
|
|
726
839
|
ste_vec?: {
|
|
727
840
|
prefix: string;
|
|
841
|
+
array_index_mode?: "all" | "none" | {
|
|
842
|
+
item?: boolean | undefined;
|
|
843
|
+
wildcard?: boolean | undefined;
|
|
844
|
+
position?: boolean | undefined;
|
|
845
|
+
} | undefined;
|
|
728
846
|
} | undefined;
|
|
729
847
|
} | undefined;
|
|
730
848
|
} | undefined> | undefined> | undefined;
|
|
@@ -22,7 +22,6 @@ type ClientConfig = {
|
|
|
22
22
|
* The CipherStash workspace CRN (Cloud Resource Name).
|
|
23
23
|
* Format: `crn:<region>.aws:<workspace-id>`.
|
|
24
24
|
* Can also be set via the `CS_WORKSPACE_CRN` environment variable.
|
|
25
|
-
* If omitted, the SDK reads from the environment or TOML config files.
|
|
26
25
|
*/
|
|
27
26
|
workspaceCrn?: string;
|
|
28
27
|
/**
|
|
@@ -288,10 +287,33 @@ declare const matchIndexOptsSchema: z.ZodObject<{
|
|
|
288
287
|
}>;
|
|
289
288
|
declare const steVecIndexOptsSchema: z.ZodObject<{
|
|
290
289
|
prefix: z.ZodString;
|
|
290
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
291
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
293
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
item?: boolean | undefined;
|
|
296
|
+
wildcard?: boolean | undefined;
|
|
297
|
+
position?: boolean | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
item?: boolean | undefined;
|
|
300
|
+
wildcard?: boolean | undefined;
|
|
301
|
+
position?: boolean | undefined;
|
|
302
|
+
}>]>>;
|
|
291
303
|
}, "strip", z.ZodTypeAny, {
|
|
292
304
|
prefix: string;
|
|
305
|
+
array_index_mode?: "all" | "none" | {
|
|
306
|
+
item?: boolean | undefined;
|
|
307
|
+
wildcard?: boolean | undefined;
|
|
308
|
+
position?: boolean | undefined;
|
|
309
|
+
} | undefined;
|
|
293
310
|
}, {
|
|
294
311
|
prefix: string;
|
|
312
|
+
array_index_mode?: "all" | "none" | {
|
|
313
|
+
item?: boolean | undefined;
|
|
314
|
+
wildcard?: boolean | undefined;
|
|
315
|
+
position?: boolean | undefined;
|
|
316
|
+
} | undefined;
|
|
295
317
|
}>;
|
|
296
318
|
declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
297
319
|
cast_as: z.ZodDefault<z.ZodEnum<["bigint", "boolean", "date", "number", "string", "json", "text"]>>;
|
|
@@ -370,10 +392,33 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
370
392
|
}>>;
|
|
371
393
|
ste_vec: z.ZodOptional<z.ZodObject<{
|
|
372
394
|
prefix: z.ZodString;
|
|
395
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
396
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
item?: boolean | undefined;
|
|
401
|
+
wildcard?: boolean | undefined;
|
|
402
|
+
position?: boolean | undefined;
|
|
403
|
+
}, {
|
|
404
|
+
item?: boolean | undefined;
|
|
405
|
+
wildcard?: boolean | undefined;
|
|
406
|
+
position?: boolean | undefined;
|
|
407
|
+
}>]>>;
|
|
373
408
|
}, "strip", z.ZodTypeAny, {
|
|
374
409
|
prefix: string;
|
|
410
|
+
array_index_mode?: "all" | "none" | {
|
|
411
|
+
item?: boolean | undefined;
|
|
412
|
+
wildcard?: boolean | undefined;
|
|
413
|
+
position?: boolean | undefined;
|
|
414
|
+
} | undefined;
|
|
375
415
|
}, {
|
|
376
416
|
prefix: string;
|
|
417
|
+
array_index_mode?: "all" | "none" | {
|
|
418
|
+
item?: boolean | undefined;
|
|
419
|
+
wildcard?: boolean | undefined;
|
|
420
|
+
position?: boolean | undefined;
|
|
421
|
+
} | undefined;
|
|
377
422
|
}>>;
|
|
378
423
|
}, "strip", z.ZodTypeAny, {
|
|
379
424
|
match?: {
|
|
@@ -398,6 +443,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
398
443
|
} | undefined;
|
|
399
444
|
ste_vec?: {
|
|
400
445
|
prefix: string;
|
|
446
|
+
array_index_mode?: "all" | "none" | {
|
|
447
|
+
item?: boolean | undefined;
|
|
448
|
+
wildcard?: boolean | undefined;
|
|
449
|
+
position?: boolean | undefined;
|
|
450
|
+
} | undefined;
|
|
401
451
|
} | undefined;
|
|
402
452
|
}, {
|
|
403
453
|
match?: {
|
|
@@ -422,6 +472,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
422
472
|
} | undefined;
|
|
423
473
|
ste_vec?: {
|
|
424
474
|
prefix: string;
|
|
475
|
+
array_index_mode?: "all" | "none" | {
|
|
476
|
+
item?: boolean | undefined;
|
|
477
|
+
wildcard?: boolean | undefined;
|
|
478
|
+
position?: boolean | undefined;
|
|
479
|
+
} | undefined;
|
|
425
480
|
} | undefined;
|
|
426
481
|
}>>;
|
|
427
482
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -449,6 +504,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
449
504
|
} | undefined;
|
|
450
505
|
ste_vec?: {
|
|
451
506
|
prefix: string;
|
|
507
|
+
array_index_mode?: "all" | "none" | {
|
|
508
|
+
item?: boolean | undefined;
|
|
509
|
+
wildcard?: boolean | undefined;
|
|
510
|
+
position?: boolean | undefined;
|
|
511
|
+
} | undefined;
|
|
452
512
|
} | undefined;
|
|
453
513
|
};
|
|
454
514
|
}, {
|
|
@@ -476,6 +536,11 @@ declare const columnSchema: z.ZodDefault<z.ZodObject<{
|
|
|
476
536
|
} | undefined;
|
|
477
537
|
ste_vec?: {
|
|
478
538
|
prefix: string;
|
|
539
|
+
array_index_mode?: "all" | "none" | {
|
|
540
|
+
item?: boolean | undefined;
|
|
541
|
+
wildcard?: boolean | undefined;
|
|
542
|
+
position?: boolean | undefined;
|
|
543
|
+
} | undefined;
|
|
479
544
|
} | undefined;
|
|
480
545
|
} | undefined;
|
|
481
546
|
}>>;
|
|
@@ -559,10 +624,33 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
559
624
|
}>>;
|
|
560
625
|
ste_vec: z.ZodOptional<z.ZodObject<{
|
|
561
626
|
prefix: z.ZodString;
|
|
627
|
+
array_index_mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
628
|
+
item: z.ZodOptional<z.ZodBoolean>;
|
|
629
|
+
wildcard: z.ZodOptional<z.ZodBoolean>;
|
|
630
|
+
position: z.ZodOptional<z.ZodBoolean>;
|
|
631
|
+
}, "strip", z.ZodTypeAny, {
|
|
632
|
+
item?: boolean | undefined;
|
|
633
|
+
wildcard?: boolean | undefined;
|
|
634
|
+
position?: boolean | undefined;
|
|
635
|
+
}, {
|
|
636
|
+
item?: boolean | undefined;
|
|
637
|
+
wildcard?: boolean | undefined;
|
|
638
|
+
position?: boolean | undefined;
|
|
639
|
+
}>]>>;
|
|
562
640
|
}, "strip", z.ZodTypeAny, {
|
|
563
641
|
prefix: string;
|
|
642
|
+
array_index_mode?: "all" | "none" | {
|
|
643
|
+
item?: boolean | undefined;
|
|
644
|
+
wildcard?: boolean | undefined;
|
|
645
|
+
position?: boolean | undefined;
|
|
646
|
+
} | undefined;
|
|
564
647
|
}, {
|
|
565
648
|
prefix: string;
|
|
649
|
+
array_index_mode?: "all" | "none" | {
|
|
650
|
+
item?: boolean | undefined;
|
|
651
|
+
wildcard?: boolean | undefined;
|
|
652
|
+
position?: boolean | undefined;
|
|
653
|
+
} | undefined;
|
|
566
654
|
}>>;
|
|
567
655
|
}, "strip", z.ZodTypeAny, {
|
|
568
656
|
match?: {
|
|
@@ -587,6 +675,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
587
675
|
} | undefined;
|
|
588
676
|
ste_vec?: {
|
|
589
677
|
prefix: string;
|
|
678
|
+
array_index_mode?: "all" | "none" | {
|
|
679
|
+
item?: boolean | undefined;
|
|
680
|
+
wildcard?: boolean | undefined;
|
|
681
|
+
position?: boolean | undefined;
|
|
682
|
+
} | undefined;
|
|
590
683
|
} | undefined;
|
|
591
684
|
}, {
|
|
592
685
|
match?: {
|
|
@@ -611,6 +704,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
611
704
|
} | undefined;
|
|
612
705
|
ste_vec?: {
|
|
613
706
|
prefix: string;
|
|
707
|
+
array_index_mode?: "all" | "none" | {
|
|
708
|
+
item?: boolean | undefined;
|
|
709
|
+
wildcard?: boolean | undefined;
|
|
710
|
+
position?: boolean | undefined;
|
|
711
|
+
} | undefined;
|
|
614
712
|
} | undefined;
|
|
615
713
|
}>>;
|
|
616
714
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -638,6 +736,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
638
736
|
} | undefined;
|
|
639
737
|
ste_vec?: {
|
|
640
738
|
prefix: string;
|
|
739
|
+
array_index_mode?: "all" | "none" | {
|
|
740
|
+
item?: boolean | undefined;
|
|
741
|
+
wildcard?: boolean | undefined;
|
|
742
|
+
position?: boolean | undefined;
|
|
743
|
+
} | undefined;
|
|
641
744
|
} | undefined;
|
|
642
745
|
};
|
|
643
746
|
}, {
|
|
@@ -665,6 +768,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
665
768
|
} | undefined;
|
|
666
769
|
ste_vec?: {
|
|
667
770
|
prefix: string;
|
|
771
|
+
array_index_mode?: "all" | "none" | {
|
|
772
|
+
item?: boolean | undefined;
|
|
773
|
+
wildcard?: boolean | undefined;
|
|
774
|
+
position?: boolean | undefined;
|
|
775
|
+
} | undefined;
|
|
668
776
|
} | undefined;
|
|
669
777
|
} | undefined;
|
|
670
778
|
}>>>>>>;
|
|
@@ -695,6 +803,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
695
803
|
} | undefined;
|
|
696
804
|
ste_vec?: {
|
|
697
805
|
prefix: string;
|
|
806
|
+
array_index_mode?: "all" | "none" | {
|
|
807
|
+
item?: boolean | undefined;
|
|
808
|
+
wildcard?: boolean | undefined;
|
|
809
|
+
position?: boolean | undefined;
|
|
810
|
+
} | undefined;
|
|
698
811
|
} | undefined;
|
|
699
812
|
};
|
|
700
813
|
}>>;
|
|
@@ -725,6 +838,11 @@ declare const encryptConfigSchema: z.ZodObject<{
|
|
|
725
838
|
} | undefined;
|
|
726
839
|
ste_vec?: {
|
|
727
840
|
prefix: string;
|
|
841
|
+
array_index_mode?: "all" | "none" | {
|
|
842
|
+
item?: boolean | undefined;
|
|
843
|
+
wildcard?: boolean | undefined;
|
|
844
|
+
position?: boolean | undefined;
|
|
845
|
+
} | undefined;
|
|
728
846
|
} | undefined;
|
|
729
847
|
} | undefined;
|
|
730
848
|
} | undefined> | undefined> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types-public.ts","../src/types.ts"],"sourcesContent":["/**\n * Public type re-exports for `@cipherstash/stack/types`.\n *\n * This module exposes only the public types from the internal types module.\n * Internal helpers (`queryTypeToFfi`, `queryTypeToQueryOp`, `FfiIndexTypeName`,\n * `QueryTermBase`) are excluded.\n */\n\n// Core types\nexport type {\n Client,\n EncryptedValue,\n Encrypted,\n} from '@/types'\n\n// Client configuration\nexport type {\n KeysetIdentifier,\n ClientConfig,\n EncryptionClientConfig,\n} from '@/types'\n\n// Encrypt / decrypt operation options and results\nexport type {\n EncryptOptions,\n EncryptedReturnType,\n SearchTerm,\n EncryptedSearchTerm,\n EncryptedQueryResult,\n} from '@/types'\n\n// Model field types\nexport type {\n EncryptedFields,\n OtherFields,\n DecryptedFields,\n Decrypted,\n} from '@/types'\n\n// Bulk operations\nexport type {\n BulkEncryptPayload,\n BulkEncryptedData,\n BulkDecryptPayload,\n BulkDecryptedData,\n DecryptionResult,\n} from '@/types'\n\n// Query types (public only)\nexport type {\n QueryTypeName,\n EncryptQueryOptions,\n ScalarQueryTerm,\n} from '@/types'\n\n// Runtime values\nexport { queryTypes } from '@/types'\n","import type {\n EncryptedColumn,\n EncryptedField,\n EncryptedTable,\n EncryptedTableColumn,\n} from '@/schema'\nimport type {\n Encrypted as CipherStashEncrypted,\n JsPlaintext,\n QueryOpName,\n newClient,\n} from '@cipherstash/protect-ffi'\n\n// ---------------------------------------------------------------------------\n// Branded type utilities\n// ---------------------------------------------------------------------------\n\n/** Brand symbol for nominal typing */\ndeclare const __brand: unique symbol\n\n/** Creates a branded type that is structurally incompatible with the base type */\ntype Brand<T, B extends string> = T & { readonly [__brand]: B }\n\n// ---------------------------------------------------------------------------\n// Core types\n// ---------------------------------------------------------------------------\n\nexport type Client = Awaited<ReturnType<typeof newClient>> | undefined\n\n/** A branded type representing encrypted data. Cannot be accidentally used as plaintext. */\nexport type EncryptedValue = Brand<CipherStashEncrypted, 'encrypted'>\n\n/** Structural type representing encrypted data. See also `EncryptedValue` for branded nominal typing. */\nexport type Encrypted = CipherStashEncrypted\n\n// ---------------------------------------------------------------------------\n// Client configuration\n// ---------------------------------------------------------------------------\n\nexport type KeysetIdentifier = { name: string } | { id: string }\n\nexport type ClientConfig = {\n /**\n * The CipherStash workspace CRN (Cloud Resource Name).\n * Format: `crn:<region>.aws:<workspace-id>`.\n * Can also be set via the `CS_WORKSPACE_CRN` environment variable.\n * If omitted, the SDK reads from the environment or TOML config files.\n */\n workspaceCrn?: string\n\n /**\n * The API access key used for authenticating with the CipherStash API.\n * Can also be set via the `CS_CLIENT_ACCESS_KEY` environment variable.\n * Obtain this from the CipherStash dashboard after creating a workspace.\n */\n accessKey?: string\n\n /**\n * The client identifier used to authenticate with CipherStash services.\n * Can also be set via the `CS_CLIENT_ID` environment variable.\n * Generated during workspace onboarding in the CipherStash dashboard.\n */\n clientId?: string\n\n /**\n * The client key material used in combination with ZeroKMS for encryption operations.\n * Can also be set via the `CS_CLIENT_KEY` environment variable.\n * Generated during workspace onboarding in the CipherStash dashboard.\n */\n clientKey?: string\n\n /**\n * An optional keyset identifier for multi-tenant encryption.\n * Each keyset provides cryptographic isolation, giving each tenant its own keyspace.\n * Specify by name (`{ name: \"tenant-a\" }`) or UUID (`{ id: \"...\" }`).\n * Keysets are created and managed in the CipherStash dashboard.\n */\n keyset?: KeysetIdentifier\n}\n\ntype AtLeastOneCsTable<T> = [T, ...T[]]\n\nexport type EncryptionClientConfig = {\n schemas: AtLeastOneCsTable<EncryptedTable<EncryptedTableColumn>>\n config?: ClientConfig\n}\n\n// ---------------------------------------------------------------------------\n// Encrypt / decrypt operation options and results\n// ---------------------------------------------------------------------------\n\n/**\n * Options for single-value encrypt operations.\n * Use a column from your table schema (from {@link encryptedColumn}) or a nested\n * field (from {@link encryptedField}) as the target for encryption.\n */\nexport type EncryptOptions = {\n /** The column or nested field to encrypt into. From {@link EncryptedColumn} or {@link EncryptedField}. */\n column: EncryptedColumn | EncryptedField\n table: EncryptedTable<EncryptedTableColumn>\n}\n\n/** Format for encrypted query/search term return values */\nexport type EncryptedReturnType =\n | 'eql'\n | 'composite-literal'\n | 'escaped-composite-literal'\n\nexport type SearchTerm = {\n value: JsPlaintext\n column: EncryptedColumn\n table: EncryptedTable<EncryptedTableColumn>\n returnType?: EncryptedReturnType\n}\n\n/** Encrypted search term result: EQL object or composite literal string */\nexport type EncryptedSearchTerm = Encrypted | string\n\n/** Result of encryptQuery (single or batch): EQL or composite literal string */\nexport type EncryptedQueryResult = Encrypted | string\n\n// ---------------------------------------------------------------------------\n// Model field types (encrypted vs decrypted views)\n// ---------------------------------------------------------------------------\n\nexport type EncryptedFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted ? K : never]: T[K]\n}\n\nexport type OtherFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted ? never : K]: T[K]\n}\n\nexport type DecryptedFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted\n ? K\n : never]: null extends T[K] ? string | null : string\n}\n\n/** Model with encrypted fields replaced by plaintext (decrypted) values */\nexport type Decrypted<T> = OtherFields<T> & DecryptedFields<T>\n\n/**\n * Maps a plaintext model type to its encrypted form using the table schema.\n *\n * Fields whose keys match columns defined in `S` become `Encrypted`;\n * all other fields retain their original types from `T`.\n *\n * When `S` is the widened `EncryptedTableColumn` (e.g. when a user passes an\n * explicit `<User>` type argument without specifying `S`), the type degrades\n * gracefully to `T` — preserving backward compatibility.\n *\n * @typeParam T - The plaintext model type (e.g. `{ id: string; email: string }`)\n * @typeParam S - The table schema column definition, inferred from the `table` argument\n *\n * @example\n * ```typescript\n * type User = { id: string; email: string }\n * // With a schema that defines `email`:\n * type Encrypted = EncryptedFromSchema<User, { email: EncryptedColumn }>\n * // => { id: string; email: Encrypted }\n * ```\n */\nexport type EncryptedFromSchema<T, S extends EncryptedTableColumn> = {\n [K in keyof T]: [K] extends [keyof S]\n ? [S[K & keyof S]] extends [EncryptedColumn | EncryptedField]\n ? null extends T[K]\n ? Encrypted | null\n : Encrypted\n : T[K]\n : T[K]\n}\n\n// ---------------------------------------------------------------------------\n// Bulk operations\n// ---------------------------------------------------------------------------\n\nexport type BulkEncryptPayload = Array<{\n id?: string\n plaintext: JsPlaintext\n}>\n\nexport type BulkEncryptedData = Array<{ id?: string; data: Encrypted }>\nexport type BulkDecryptPayload = Array<{ id?: string; data: Encrypted }>\nexport type BulkDecryptedData = Array<DecryptionResult<JsPlaintext>>\n\ntype DecryptionSuccess<T> = { error?: never; data: T; id?: string }\ntype DecryptionError<T> = { error: T; id?: string; data?: never }\n\n/**\n * Result type for individual items in bulk decrypt operations.\n * Uses `error`/`data` fields (not `failure`/`data`) since bulk operations\n * can have per-item failures.\n */\nexport type DecryptionResult<T> = DecryptionSuccess<T> | DecryptionError<T>\n\n// ---------------------------------------------------------------------------\n// Query types (for searchable encryption / encryptQuery)\n// ---------------------------------------------------------------------------\n\n/**\n * User-facing query type names for encrypting query values.\n *\n * - `'equality'`: Exact match. [Exact Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/exact)\n * - `'freeTextSearch'`: Text search. [Match Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/match)\n * - `'orderAndRange'`: Comparison and range. [Range Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/range)\n * - `'steVecSelector'`: JSONPath selector (e.g. `'$.user.email'`)\n * - `'steVecTerm'`: Containment (e.g. `{ role: 'admin' }`)\n * - `'searchableJson'`: Auto-infers selector or term from plaintext type (recommended)\n */\nexport type QueryTypeName =\n | 'orderAndRange'\n | 'freeTextSearch'\n | 'equality'\n | 'steVecSelector'\n | 'steVecTerm'\n | 'searchableJson'\n\n/** @internal */\nexport type FfiIndexTypeName = 'ore' | 'match' | 'unique' | 'ste_vec'\n\nexport const queryTypes = {\n orderAndRange: 'orderAndRange',\n freeTextSearch: 'freeTextSearch',\n equality: 'equality',\n steVecSelector: 'steVecSelector',\n steVecTerm: 'steVecTerm',\n searchableJson: 'searchableJson',\n} as const satisfies Record<string, QueryTypeName>\n\n/** @internal */\nexport const queryTypeToFfi: Record<QueryTypeName, FfiIndexTypeName> = {\n orderAndRange: 'ore',\n freeTextSearch: 'match',\n equality: 'unique',\n steVecSelector: 'ste_vec',\n steVecTerm: 'ste_vec',\n searchableJson: 'ste_vec',\n}\n\n/** @internal */\nexport const queryTypeToQueryOp: Partial<Record<QueryTypeName, QueryOpName>> = {\n steVecSelector: 'ste_vec_selector',\n steVecTerm: 'ste_vec_term',\n}\n\n/** @internal */\nexport type QueryTermBase = {\n column: EncryptedColumn\n table: EncryptedTable<EncryptedTableColumn>\n queryType?: QueryTypeName\n returnType?: EncryptedReturnType\n}\n\nexport type EncryptQueryOptions = QueryTermBase\n\nexport type ScalarQueryTerm = QueryTermBase & {\n value: JsPlaintext\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC6NO,IAAM,aAAa;AAAA,EACxB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,gBAAgB;AAClB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/types-public.ts","../src/types.ts"],"sourcesContent":["/**\n * Public type re-exports for `@cipherstash/stack/types`.\n *\n * This module exposes only the public types from the internal types module.\n * Internal helpers (`queryTypeToFfi`, `queryTypeToQueryOp`, `FfiIndexTypeName`,\n * `QueryTermBase`) are excluded.\n */\n\n// Core types\nexport type {\n Client,\n EncryptedValue,\n Encrypted,\n} from '@/types'\n\n// Client configuration\nexport type {\n KeysetIdentifier,\n ClientConfig,\n EncryptionClientConfig,\n} from '@/types'\n\n// Encrypt / decrypt operation options and results\nexport type {\n EncryptOptions,\n EncryptedReturnType,\n SearchTerm,\n EncryptedSearchTerm,\n EncryptedQueryResult,\n} from '@/types'\n\n// Model field types\nexport type {\n EncryptedFields,\n OtherFields,\n DecryptedFields,\n Decrypted,\n} from '@/types'\n\n// Bulk operations\nexport type {\n BulkEncryptPayload,\n BulkEncryptedData,\n BulkDecryptPayload,\n BulkDecryptedData,\n DecryptionResult,\n} from '@/types'\n\n// Query types (public only)\nexport type {\n QueryTypeName,\n EncryptQueryOptions,\n ScalarQueryTerm,\n} from '@/types'\n\n// Runtime values\nexport { queryTypes } from '@/types'\n","import type {\n EncryptedColumn,\n EncryptedField,\n EncryptedTable,\n EncryptedTableColumn,\n} from '@/schema'\nimport type {\n Encrypted as CipherStashEncrypted,\n JsPlaintext,\n QueryOpName,\n newClient,\n} from '@cipherstash/protect-ffi'\n\n// ---------------------------------------------------------------------------\n// Branded type utilities\n// ---------------------------------------------------------------------------\n\n/** Brand symbol for nominal typing */\ndeclare const __brand: unique symbol\n\n/** Creates a branded type that is structurally incompatible with the base type */\ntype Brand<T, B extends string> = T & { readonly [__brand]: B }\n\n// ---------------------------------------------------------------------------\n// Core types\n// ---------------------------------------------------------------------------\n\nexport type Client = Awaited<ReturnType<typeof newClient>> | undefined\n\n/** A branded type representing encrypted data. Cannot be accidentally used as plaintext. */\nexport type EncryptedValue = Brand<CipherStashEncrypted, 'encrypted'>\n\n/** Structural type representing encrypted data. See also `EncryptedValue` for branded nominal typing. */\nexport type Encrypted = CipherStashEncrypted\n\n// ---------------------------------------------------------------------------\n// Client configuration\n// ---------------------------------------------------------------------------\n\nexport type KeysetIdentifier = { name: string } | { id: string }\n\nexport type ClientConfig = {\n /**\n * The CipherStash workspace CRN (Cloud Resource Name).\n * Format: `crn:<region>.aws:<workspace-id>`.\n * Can also be set via the `CS_WORKSPACE_CRN` environment variable.\n */\n workspaceCrn?: string\n\n /**\n * The API access key used for authenticating with the CipherStash API.\n * Can also be set via the `CS_CLIENT_ACCESS_KEY` environment variable.\n * Obtain this from the CipherStash dashboard after creating a workspace.\n */\n accessKey?: string\n\n /**\n * The client identifier used to authenticate with CipherStash services.\n * Can also be set via the `CS_CLIENT_ID` environment variable.\n * Generated during workspace onboarding in the CipherStash dashboard.\n */\n clientId?: string\n\n /**\n * The client key material used in combination with ZeroKMS for encryption operations.\n * Can also be set via the `CS_CLIENT_KEY` environment variable.\n * Generated during workspace onboarding in the CipherStash dashboard.\n */\n clientKey?: string\n\n /**\n * An optional keyset identifier for multi-tenant encryption.\n * Each keyset provides cryptographic isolation, giving each tenant its own keyspace.\n * Specify by name (`{ name: \"tenant-a\" }`) or UUID (`{ id: \"...\" }`).\n * Keysets are created and managed in the CipherStash dashboard.\n */\n keyset?: KeysetIdentifier\n}\n\ntype AtLeastOneCsTable<T> = [T, ...T[]]\n\nexport type EncryptionClientConfig = {\n schemas: AtLeastOneCsTable<EncryptedTable<EncryptedTableColumn>>\n config?: ClientConfig\n}\n\n// ---------------------------------------------------------------------------\n// Encrypt / decrypt operation options and results\n// ---------------------------------------------------------------------------\n\n/**\n * Options for single-value encrypt operations.\n * Use a column from your table schema (from {@link encryptedColumn}) or a nested\n * field (from {@link encryptedField}) as the target for encryption.\n */\nexport type EncryptOptions = {\n /** The column or nested field to encrypt into. From {@link EncryptedColumn} or {@link EncryptedField}. */\n column: EncryptedColumn | EncryptedField\n table: EncryptedTable<EncryptedTableColumn>\n}\n\n/** Format for encrypted query/search term return values */\nexport type EncryptedReturnType =\n | 'eql'\n | 'composite-literal'\n | 'escaped-composite-literal'\n\nexport type SearchTerm = {\n value: JsPlaintext\n column: EncryptedColumn\n table: EncryptedTable<EncryptedTableColumn>\n returnType?: EncryptedReturnType\n}\n\n/** Encrypted search term result: EQL object or composite literal string */\nexport type EncryptedSearchTerm = Encrypted | string\n\n/** Result of encryptQuery (single or batch): EQL or composite literal string */\nexport type EncryptedQueryResult = Encrypted | string\n\n// ---------------------------------------------------------------------------\n// Model field types (encrypted vs decrypted views)\n// ---------------------------------------------------------------------------\n\nexport type EncryptedFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted ? K : never]: T[K]\n}\n\nexport type OtherFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted ? never : K]: T[K]\n}\n\nexport type DecryptedFields<T> = {\n [K in keyof T as NonNullable<T[K]> extends Encrypted\n ? K\n : never]: null extends T[K] ? string | null : string\n}\n\n/** Model with encrypted fields replaced by plaintext (decrypted) values */\nexport type Decrypted<T> = OtherFields<T> & DecryptedFields<T>\n\n/**\n * Maps a plaintext model type to its encrypted form using the table schema.\n *\n * Fields whose keys match columns defined in `S` become `Encrypted`;\n * all other fields retain their original types from `T`.\n *\n * When `S` is the widened `EncryptedTableColumn` (e.g. when a user passes an\n * explicit `<User>` type argument without specifying `S`), the type degrades\n * gracefully to `T` — preserving backward compatibility.\n *\n * @typeParam T - The plaintext model type (e.g. `{ id: string; email: string }`)\n * @typeParam S - The table schema column definition, inferred from the `table` argument\n *\n * @example\n * ```typescript\n * type User = { id: string; email: string }\n * // With a schema that defines `email`:\n * type Encrypted = EncryptedFromSchema<User, { email: EncryptedColumn }>\n * // => { id: string; email: Encrypted }\n * ```\n */\nexport type EncryptedFromSchema<T, S extends EncryptedTableColumn> = {\n [K in keyof T]: [K] extends [keyof S]\n ? [S[K & keyof S]] extends [EncryptedColumn | EncryptedField]\n ? null extends T[K]\n ? Encrypted | null\n : Encrypted\n : T[K]\n : T[K]\n}\n\n// ---------------------------------------------------------------------------\n// Bulk operations\n// ---------------------------------------------------------------------------\n\nexport type BulkEncryptPayload = Array<{\n id?: string\n plaintext: JsPlaintext\n}>\n\nexport type BulkEncryptedData = Array<{ id?: string; data: Encrypted }>\nexport type BulkDecryptPayload = Array<{ id?: string; data: Encrypted }>\nexport type BulkDecryptedData = Array<DecryptionResult<JsPlaintext>>\n\ntype DecryptionSuccess<T> = { error?: never; data: T; id?: string }\ntype DecryptionError<T> = { error: T; id?: string; data?: never }\n\n/**\n * Result type for individual items in bulk decrypt operations.\n * Uses `error`/`data` fields (not `failure`/`data`) since bulk operations\n * can have per-item failures.\n */\nexport type DecryptionResult<T> = DecryptionSuccess<T> | DecryptionError<T>\n\n// ---------------------------------------------------------------------------\n// Query types (for searchable encryption / encryptQuery)\n// ---------------------------------------------------------------------------\n\n/**\n * User-facing query type names for encrypting query values.\n *\n * - `'equality'`: Exact match. [Exact Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/exact)\n * - `'freeTextSearch'`: Text search. [Match Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/match)\n * - `'orderAndRange'`: Comparison and range. [Range Queries](https://cipherstash.com/docs/platform/searchable-encryption/supported-queries/range)\n * - `'steVecSelector'`: JSONPath selector (e.g. `'$.user.email'`)\n * - `'steVecTerm'`: Containment (e.g. `{ role: 'admin' }`)\n * - `'searchableJson'`: Auto-infers selector or term from plaintext type (recommended)\n */\nexport type QueryTypeName =\n | 'orderAndRange'\n | 'freeTextSearch'\n | 'equality'\n | 'steVecSelector'\n | 'steVecTerm'\n | 'searchableJson'\n\n/** @internal */\nexport type FfiIndexTypeName = 'ore' | 'match' | 'unique' | 'ste_vec'\n\nexport const queryTypes = {\n orderAndRange: 'orderAndRange',\n freeTextSearch: 'freeTextSearch',\n equality: 'equality',\n steVecSelector: 'steVecSelector',\n steVecTerm: 'steVecTerm',\n searchableJson: 'searchableJson',\n} as const satisfies Record<string, QueryTypeName>\n\n/** @internal */\nexport const queryTypeToFfi: Record<QueryTypeName, FfiIndexTypeName> = {\n orderAndRange: 'ore',\n freeTextSearch: 'match',\n equality: 'unique',\n steVecSelector: 'ste_vec',\n steVecTerm: 'ste_vec',\n searchableJson: 'ste_vec',\n}\n\n/** @internal */\nexport const queryTypeToQueryOp: Partial<Record<QueryTypeName, QueryOpName>> = {\n steVecSelector: 'ste_vec_selector',\n steVecTerm: 'ste_vec_term',\n}\n\n/** @internal */\nexport type QueryTermBase = {\n column: EncryptedColumn\n table: EncryptedTable<EncryptedTableColumn>\n queryType?: QueryTypeName\n returnType?: EncryptedReturnType\n}\n\nexport type EncryptQueryOptions = QueryTermBase\n\nexport type ScalarQueryTerm = QueryTermBase & {\n value: JsPlaintext\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4NO,IAAM,aAAa;AAAA,EACxB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,gBAAgB;AAClB;","names":[]}
|
package/dist/types-public.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as BulkDecryptPayload, B as BulkDecryptedData, l as BulkEncryptPayload, k as BulkEncryptedData, i as Client, G as ClientConfig, D as Decrypted, H as DecryptedFields, J as DecryptionResult, m as EncryptOptions, o as EncryptQueryOptions, E as Encrypted, L as EncryptedFields, h as EncryptedQueryResult, p as EncryptedReturnType, N as EncryptedSearchTerm, g as EncryptedValue, s as EncryptionClientConfig, K as KeysetIdentifier, P as OtherFields, Q as QueryTypeName, S as ScalarQueryTerm, R as SearchTerm, V as queryTypes } from './types-public-
|
|
1
|
+
export { j as BulkDecryptPayload, B as BulkDecryptedData, l as BulkEncryptPayload, k as BulkEncryptedData, i as Client, G as ClientConfig, D as Decrypted, H as DecryptedFields, J as DecryptionResult, m as EncryptOptions, o as EncryptQueryOptions, E as Encrypted, L as EncryptedFields, h as EncryptedQueryResult, p as EncryptedReturnType, N as EncryptedSearchTerm, g as EncryptedValue, s as EncryptionClientConfig, K as KeysetIdentifier, P as OtherFields, Q as QueryTypeName, S as ScalarQueryTerm, R as SearchTerm, V as queryTypes } from './types-public-WADaA-TW.cjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@cipherstash/protect-ffi';
|
package/dist/types-public.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { j as BulkDecryptPayload, B as BulkDecryptedData, l as BulkEncryptPayload, k as BulkEncryptedData, i as Client, G as ClientConfig, D as Decrypted, H as DecryptedFields, J as DecryptionResult, m as EncryptOptions, o as EncryptQueryOptions, E as Encrypted, L as EncryptedFields, h as EncryptedQueryResult, p as EncryptedReturnType, N as EncryptedSearchTerm, g as EncryptedValue, s as EncryptionClientConfig, K as KeysetIdentifier, P as OtherFields, Q as QueryTypeName, S as ScalarQueryTerm, R as SearchTerm, V as queryTypes } from './types-public-
|
|
1
|
+
export { j as BulkDecryptPayload, B as BulkDecryptedData, l as BulkEncryptPayload, k as BulkEncryptedData, i as Client, G as ClientConfig, D as Decrypted, H as DecryptedFields, J as DecryptionResult, m as EncryptOptions, o as EncryptQueryOptions, E as Encrypted, L as EncryptedFields, h as EncryptedQueryResult, p as EncryptedReturnType, N as EncryptedSearchTerm, g as EncryptedValue, s as EncryptionClientConfig, K as KeysetIdentifier, P as OtherFields, Q as QueryTypeName, S as ScalarQueryTerm, R as SearchTerm, V as queryTypes } from './types-public-WADaA-TW.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@cipherstash/protect-ffi';
|
package/dist/types-public.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cipherstash/stack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "CipherStash Stack for TypeScript and JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"encrypted",
|
|
@@ -199,10 +199,11 @@
|
|
|
199
199
|
"access": "public"
|
|
200
200
|
},
|
|
201
201
|
"dependencies": {
|
|
202
|
-
"@byteslice/result": "
|
|
203
|
-
"@cipherstash/
|
|
204
|
-
"
|
|
205
|
-
"
|
|
202
|
+
"@byteslice/result": "0.2.0",
|
|
203
|
+
"@cipherstash/auth": "0.34.2",
|
|
204
|
+
"@cipherstash/protect-ffi": "0.21.0",
|
|
205
|
+
"evlog": "1.9.0",
|
|
206
|
+
"uuid": "13.0.0",
|
|
206
207
|
"zod": "3.24.2"
|
|
207
208
|
},
|
|
208
209
|
"peerDependencies": {
|