@stacksjs/types 0.75.85 → 0.75.87

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.
@@ -3,9 +3,10 @@ import type Stripe from 'stripe';
3
3
  // Configuration Types
4
4
  // =============================================================================
5
5
  export declare interface PaymentOptions {
6
- driver: 'stripe' | 'adyen' | (string & {})
6
+ driver: 'stripe' | 'adyen' | 'paddle' | (string & {})
7
7
  stripe: StripeConfig
8
8
  adyen?: AdyenConfig
9
+ paddle?: PaddleConfig
9
10
  currency?: string
10
11
  webhook?: WebhookConfig
11
12
  connect?: ConnectConfig
@@ -29,6 +30,14 @@ export declare interface AdyenConfig {
29
30
  hmacKey?: string
30
31
  shopperReferencePrefix?: string
31
32
  }
33
+ export declare interface PaddleConfig {
34
+ apiKey?: string
35
+ environment?: 'sandbox' | 'live'
36
+ webhookSecret?: string
37
+ clientToken?: string
38
+ taxCategory?: string
39
+ webhookTolerance?: number
40
+ }
32
41
  export declare interface WebhookConfig {
33
42
  secret: string
34
43
  tolerance?: number
@@ -12,6 +12,7 @@ export declare interface FirewallOptions {
12
12
  }
13
13
  export declare interface ApiSecurityOptions {
14
14
  rowScoping: ApiRowScopingPolicy
15
+ models: ModelApiSelection
15
16
  }
16
17
  export declare interface SecurityOptions {
17
18
  driver: 'aws'
@@ -45,4 +46,18 @@ export type FirewallConfig = Partial<FirewallOptions>;
45
46
  * the accident visible instead of shipping it.
46
47
  */
47
48
  export type ApiRowScopingPolicy = 'warn' | 'deny';
49
+ /**
50
+ * Which models publish the REST API their `useApi` trait describes.
51
+ *
52
+ * - `'all'` (the default) - every `useApi` model, the framework's own included.
53
+ * - `'own'` - only the app's models in `app/Models`, overrides included.
54
+ * - `'none'` - no generated model APIs.
55
+ * - a list of model names - exactly those; `'own'` may be one of them, to mean
56
+ * the app's models plus the named framework ones.
57
+ *
58
+ * `STACKS_MODEL_APIS` overrides it (`own`, `none`, `all`, or `own,Product`).
59
+ * It narrows the set and never adds one: a listed model still needs its own
60
+ * `useApi` trait. stacksjs/stacks#2866.
61
+ */
62
+ export type ModelApiSelection = 'all' | 'own' | 'none' | readonly string[];
48
63
  export type SecurityConfig = DeepPartial<SecurityOptions>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.75.85",
4
+ "version": "0.75.87",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -58,9 +58,9 @@
58
58
  "dependencies": {
59
59
  "@stacksjs/bunpress": "^0.2.15",
60
60
  "@stacksjs/clapp": "^0.2.12",
61
- "@stacksjs/events": "0.75.85",
62
- "@stacksjs/strings": "0.75.85",
63
- "@stacksjs/stx": "^0.2.378",
61
+ "@stacksjs/events": "0.75.87",
62
+ "@stacksjs/strings": "0.75.87",
63
+ "@stacksjs/stx": "^0.2.384",
64
64
  "@stacksjs/ts-validation": "^0.5.6",
65
65
  "bun-query-builder": "^0.3.5"
66
66
  },
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@stacksjs/validation": "0.75.85",
76
+ "@stacksjs/validation": "0.75.87",
77
77
  "better-dx": "^0.2.24",
78
78
  "meilisearch": "^0.62.0"
79
79
  },