@stackframe/stack-shared 2.8.46 → 2.8.48

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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/apps/apps-config.d.mts +8 -8
  3. package/dist/apps/apps-config.d.ts +8 -8
  4. package/dist/apps/apps-config.js +8 -8
  5. package/dist/apps/apps-config.js.map +1 -1
  6. package/dist/config/schema-fuzzer.test.js +0 -9
  7. package/dist/config/schema-fuzzer.test.js.map +1 -1
  8. package/dist/config/schema.d.mts +21 -91
  9. package/dist/config/schema.d.ts +21 -91
  10. package/dist/config/schema.js +1 -19
  11. package/dist/config/schema.js.map +1 -1
  12. package/dist/esm/apps/apps-config.js +8 -8
  13. package/dist/esm/apps/apps-config.js.map +1 -1
  14. package/dist/esm/config/schema-fuzzer.test.js +0 -9
  15. package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
  16. package/dist/esm/config/schema.js +1 -19
  17. package/dist/esm/config/schema.js.map +1 -1
  18. package/dist/esm/interface/client-interface.js.map +1 -1
  19. package/dist/esm/known-errors.js +1 -21
  20. package/dist/esm/known-errors.js.map +1 -1
  21. package/dist/esm/schema-fields.js +17 -1
  22. package/dist/esm/schema-fields.js.map +1 -1
  23. package/dist/interface/client-interface.d.mts +1 -1
  24. package/dist/interface/client-interface.d.ts +1 -1
  25. package/dist/interface/client-interface.js.map +1 -1
  26. package/dist/interface/crud/products.d.mts +9 -0
  27. package/dist/interface/crud/products.d.ts +9 -0
  28. package/dist/known-errors.d.mts +0 -6
  29. package/dist/known-errors.d.ts +0 -6
  30. package/dist/known-errors.js +1 -21
  31. package/dist/known-errors.js.map +1 -1
  32. package/dist/schema-fields.d.mts +53 -1
  33. package/dist/schema-fields.d.ts +53 -1
  34. package/dist/schema-fields.js +21 -1
  35. package/dist/schema-fields.js.map +1 -1
  36. package/package.json +1 -1
@@ -86,7 +86,7 @@ declare const branchConfigSchema: yup.Schema<Omit<Omit<{
86
86
  type: "postgres";
87
87
  connectionString: string;
88
88
  };
89
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
89
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
90
90
  domains: {
91
91
  allowLocalhost?: boolean | undefined;
92
92
  };
@@ -177,13 +177,6 @@ declare const branchConfigSchema: yup.Schema<Omit<Omit<{
177
177
  tsxSource: string;
178
178
  }>;
179
179
  };
180
- workflows: {
181
- availableWorkflows: Record<string, {
182
- displayName?: string | undefined;
183
- enabled?: boolean | undefined;
184
- tsSource?: string | undefined;
185
- }>;
186
- };
187
180
  apiKeys: {
188
181
  enabled: {
189
182
  team?: boolean | undefined;
@@ -191,7 +184,7 @@ declare const branchConfigSchema: yup.Schema<Omit<Omit<{
191
184
  };
192
185
  };
193
186
  apps: {
194
- installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "workflows" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex", {
187
+ installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex" | "vercel", {
195
188
  enabled?: boolean | undefined;
196
189
  }>;
197
190
  };
@@ -205,7 +198,7 @@ declare const branchConfigSchema: yup.Schema<Omit<Omit<{
205
198
  };
206
199
  }, yup.AnyObject, Omit<Omit<{
207
200
  sourceOfTruth: undefined;
208
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
201
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
209
202
  rbac: {
210
203
  permissions: undefined;
211
204
  defaultPermissions: {
@@ -266,9 +259,6 @@ declare const branchConfigSchema: yup.Schema<Omit<Omit<{
266
259
  dataVault: {
267
260
  stores: undefined;
268
261
  };
269
- workflows: {
270
- availableWorkflows: undefined;
271
- };
272
262
  }, "">;
273
263
  declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
274
264
  sourceOfTruth: {
@@ -280,7 +270,7 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
280
270
  type: "postgres";
281
271
  connectionString: string;
282
272
  };
283
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
273
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
284
274
  domains: {
285
275
  allowLocalhost?: boolean | undefined;
286
276
  };
@@ -371,13 +361,6 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
371
361
  tsxSource: string;
372
362
  }>;
373
363
  };
374
- workflows: {
375
- availableWorkflows: Record<string, {
376
- displayName?: string | undefined;
377
- enabled?: boolean | undefined;
378
- tsSource?: string | undefined;
379
- }>;
380
- };
381
364
  apiKeys: {
382
365
  enabled: {
383
366
  team?: boolean | undefined;
@@ -385,7 +368,7 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
385
368
  };
386
369
  };
387
370
  apps: {
388
- installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "workflows" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex", {
371
+ installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex" | "vercel", {
389
372
  enabled?: boolean | undefined;
390
373
  }>;
391
374
  };
@@ -471,7 +454,7 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
471
454
  };
472
455
  }, yup.AnyObject, Omit<NonNullable<Omit<Omit<{
473
456
  sourceOfTruth: undefined;
474
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
457
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
475
458
  rbac: {
476
459
  permissions: undefined;
477
460
  defaultPermissions: {
@@ -532,13 +515,10 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
532
515
  dataVault: {
533
516
  stores: undefined;
534
517
  };
535
- workflows: {
536
- availableWorkflows: undefined;
537
- };
538
518
  }>, "domains" | "auth" | "emails"> & {
539
519
  auth: Omit<NonNullable<Omit<Omit<{
540
520
  sourceOfTruth: undefined;
541
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
521
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
542
522
  rbac: {
543
523
  permissions: undefined;
544
524
  defaultPermissions: {
@@ -599,13 +579,10 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
599
579
  dataVault: {
600
580
  stores: undefined;
601
581
  };
602
- workflows: {
603
- availableWorkflows: undefined;
604
- };
605
582
  }>, "oauth"> & {
606
583
  oauth: Omit<NonNullable<Omit<Omit<{
607
584
  sourceOfTruth: undefined;
608
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
585
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
609
586
  rbac: {
610
587
  permissions: undefined;
611
588
  defaultPermissions: {
@@ -666,16 +643,13 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
666
643
  dataVault: {
667
644
  stores: undefined;
668
645
  };
669
- workflows: {
670
- availableWorkflows: undefined;
671
- };
672
646
  }>, "providers"> & {
673
647
  providers: undefined;
674
648
  };
675
649
  };
676
650
  emails: Omit<NonNullable<Omit<Omit<{
677
651
  sourceOfTruth: undefined;
678
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
652
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
679
653
  rbac: {
680
654
  permissions: undefined;
681
655
  defaultPermissions: {
@@ -736,9 +710,6 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
736
710
  dataVault: {
737
711
  stores: undefined;
738
712
  };
739
- workflows: {
740
- availableWorkflows: undefined;
741
- };
742
713
  }>, "server"> & {
743
714
  server: {
744
715
  isShared: undefined;
@@ -753,7 +724,7 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
753
724
  };
754
725
  domains: Omit<NonNullable<Omit<Omit<{
755
726
  sourceOfTruth: undefined;
756
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
727
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
757
728
  rbac: {
758
729
  permissions: undefined;
759
730
  defaultPermissions: {
@@ -814,9 +785,6 @@ declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
814
785
  dataVault: {
815
786
  stores: undefined;
816
787
  };
817
- workflows: {
818
- availableWorkflows: undefined;
819
- };
820
788
  }>, "trustedDomains"> & {
821
789
  trustedDomains: undefined;
822
790
  };
@@ -831,7 +799,7 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
831
799
  type: "postgres";
832
800
  connectionString: string;
833
801
  };
834
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
802
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
835
803
  domains: {
836
804
  allowLocalhost?: boolean | undefined;
837
805
  };
@@ -922,13 +890,6 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
922
890
  tsxSource: string;
923
891
  }>;
924
892
  };
925
- workflows: {
926
- availableWorkflows: Record<string, {
927
- displayName?: string | undefined;
928
- enabled?: boolean | undefined;
929
- tsSource?: string | undefined;
930
- }>;
931
- };
932
893
  apiKeys: {
933
894
  enabled: {
934
895
  team?: boolean | undefined;
@@ -936,7 +897,7 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
936
897
  };
937
898
  };
938
899
  apps: {
939
- installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "workflows" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex", {
900
+ installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex" | "vercel", {
940
901
  enabled?: boolean | undefined;
941
902
  }>;
942
903
  };
@@ -1022,7 +983,7 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1022
983
  };
1023
984
  }>, never> & {}, yup.AnyObject, Omit<NonNullable<Omit<NonNullable<Omit<Omit<{
1024
985
  sourceOfTruth: undefined;
1025
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
986
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1026
987
  rbac: {
1027
988
  permissions: undefined;
1028
989
  defaultPermissions: {
@@ -1083,13 +1044,10 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1083
1044
  dataVault: {
1084
1045
  stores: undefined;
1085
1046
  };
1086
- workflows: {
1087
- availableWorkflows: undefined;
1088
- };
1089
1047
  }>, "domains" | "auth" | "emails"> & {
1090
1048
  auth: Omit<NonNullable<Omit<Omit<{
1091
1049
  sourceOfTruth: undefined;
1092
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1050
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1093
1051
  rbac: {
1094
1052
  permissions: undefined;
1095
1053
  defaultPermissions: {
@@ -1150,13 +1108,10 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1150
1108
  dataVault: {
1151
1109
  stores: undefined;
1152
1110
  };
1153
- workflows: {
1154
- availableWorkflows: undefined;
1155
- };
1156
1111
  }>, "oauth"> & {
1157
1112
  oauth: Omit<NonNullable<Omit<Omit<{
1158
1113
  sourceOfTruth: undefined;
1159
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1114
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1160
1115
  rbac: {
1161
1116
  permissions: undefined;
1162
1117
  defaultPermissions: {
@@ -1217,16 +1172,13 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1217
1172
  dataVault: {
1218
1173
  stores: undefined;
1219
1174
  };
1220
- workflows: {
1221
- availableWorkflows: undefined;
1222
- };
1223
1175
  }>, "providers"> & {
1224
1176
  providers: undefined;
1225
1177
  };
1226
1178
  };
1227
1179
  emails: Omit<NonNullable<Omit<Omit<{
1228
1180
  sourceOfTruth: undefined;
1229
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1181
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1230
1182
  rbac: {
1231
1183
  permissions: undefined;
1232
1184
  defaultPermissions: {
@@ -1287,9 +1239,6 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1287
1239
  dataVault: {
1288
1240
  stores: undefined;
1289
1241
  };
1290
- workflows: {
1291
- availableWorkflows: undefined;
1292
- };
1293
1242
  }>, "server"> & {
1294
1243
  server: {
1295
1244
  isShared: undefined;
@@ -1304,7 +1253,7 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1304
1253
  };
1305
1254
  domains: Omit<NonNullable<Omit<Omit<{
1306
1255
  sourceOfTruth: undefined;
1307
- }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "workflows" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1256
+ }, string>, "domains" | "teams" | "auth" | "rbac" | "payments" | "emails" | "apiKeys" | "apps" | "users" | "dataVault"> & {
1308
1257
  rbac: {
1309
1258
  permissions: undefined;
1310
1259
  defaultPermissions: {
@@ -1365,9 +1314,6 @@ declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNull
1365
1314
  dataVault: {
1366
1315
  stores: undefined;
1367
1316
  };
1368
- workflows: {
1369
- availableWorkflows: undefined;
1370
- };
1371
1317
  }>, "trustedDomains"> & {
1372
1318
  trustedDomains: undefined;
1373
1319
  };
@@ -1402,7 +1348,7 @@ declare const organizationConfigDefaults: {
1402
1348
  };
1403
1349
  };
1404
1350
  readonly apps: {
1405
- readonly installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "workflows" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex", {
1351
+ readonly installed: Record<"teams" | "authentication" | "rbac" | "api-keys" | "payments" | "emails" | "email-api" | "data-vault" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex" | "vercel", {
1406
1352
  enabled: false;
1407
1353
  }>;
1408
1354
  };
@@ -1544,13 +1490,6 @@ declare const organizationConfigDefaults: {
1544
1490
  displayName: string;
1545
1491
  };
1546
1492
  };
1547
- readonly workflows: {
1548
- readonly availableWorkflows: (key: string) => {
1549
- displayName: string;
1550
- tsSource: string;
1551
- enabled: false;
1552
- };
1553
- };
1554
1493
  };
1555
1494
  type ReplaceFunctionsWithObjects<T> = T & (T extends (arg: infer K extends string) => infer R ? Record<K, R> & object : unknown);
1556
1495
  type DeepReplaceFunctionsWithObjects<T> = T extends object ? {
@@ -1779,15 +1718,6 @@ declare function sanitizeOrganizationConfig(config: OrganizationRenderedConfigBe
1779
1718
  };
1780
1719
  };
1781
1720
  };
1782
- workflows: {
1783
- availableWorkflows: {
1784
- [x: string]: {
1785
- displayName: string;
1786
- enabled: boolean;
1787
- tsSource: string;
1788
- };
1789
- };
1790
- };
1791
1721
  apiKeys: {
1792
1722
  enabled: {
1793
1723
  team: boolean;
@@ -1820,9 +1750,6 @@ declare function sanitizeOrganizationConfig(config: OrganizationRenderedConfigBe
1820
1750
  "data-vault": {
1821
1751
  enabled: boolean;
1822
1752
  };
1823
- workflows: {
1824
- enabled: boolean;
1825
- };
1826
1753
  webhooks: {
1827
1754
  enabled: boolean;
1828
1755
  };
@@ -1841,6 +1768,9 @@ declare function sanitizeOrganizationConfig(config: OrganizationRenderedConfigBe
1841
1768
  convex: {
1842
1769
  enabled: boolean;
1843
1770
  };
1771
+ vercel: {
1772
+ enabled: boolean;
1773
+ };
1844
1774
  };
1845
1775
  };
1846
1776
  users: {
@@ -189,16 +189,6 @@ var branchPaymentsSchema = (0, import_schema_fields.yupObject)({
189
189
  var branchDomain = (0, import_schema_fields.yupObject)({
190
190
  allowLocalhost: (0, import_schema_fields.yupBoolean)()
191
191
  });
192
- var branchWorkflowsSchema = (0, import_schema_fields.yupObject)({
193
- availableWorkflows: (0, import_schema_fields.yupRecord)(
194
- (0, import_schema_fields.userSpecifiedIdSchema)("workflowId"),
195
- (0, import_schema_fields.yupObject)({
196
- displayName: (0, import_schema_fields.yupString)(),
197
- tsSource: (0, import_schema_fields.yupString)(),
198
- enabled: (0, import_schema_fields.yupBoolean)()
199
- })
200
- )
201
- });
202
192
  var branchConfigSchema = canNoLongerBeOverridden(projectConfigSchema, ["sourceOfTruth"]).concat((0, import_schema_fields.yupObject)({
203
193
  rbac: branchRbacSchema,
204
194
  teams: (0, import_schema_fields.yupObject)({
@@ -225,8 +215,7 @@ var branchConfigSchema = canNoLongerBeOverridden(projectConfigSchema, ["sourceOf
225
215
  displayName: (0, import_schema_fields.yupString)()
226
216
  })
227
217
  )
228
- }),
229
- workflows: branchWorkflowsSchema
218
+ })
230
219
  }));
231
220
  var environmentConfigSchema = branchConfigSchema.concat((0, import_schema_fields.yupObject)({
232
221
  auth: branchConfigSchema.getNested("auth").concat((0, import_schema_fields.yupObject)({
@@ -476,13 +465,6 @@ var organizationConfigDefaults = {
476
465
  stores: (key) => ({
477
466
  displayName: "Unnamed Vault"
478
467
  })
479
- },
480
- workflows: {
481
- availableWorkflows: (key) => ({
482
- displayName: "Unnamed Workflow",
483
- tsSource: "Error: Workflow config is missing TypeScript source code.",
484
- enabled: false
485
- })
486
468
  }
487
469
  };
488
470
  (0, import_types.typeAssertIs)()();