@intrig/plugin-next 0.0.15-25 → 0.0.15-26

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/dist/index.cjs CHANGED
@@ -3718,13 +3718,20 @@ export async function serverAction(formData: FormData) {
3718
3718
  }
3719
3719
  ${"```"}
3720
3720
 
3721
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3721
+ ### Type Imports
3722
+
3723
+ These types are generated and available for import:
3724
+
3722
3725
  ${"```ts"}
3723
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3724
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3725
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3726
+ ${requestBodyType ? `// Request body type
3727
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
3728
+ ` : ''}${paramsType ? `// Path/query parameters type
3729
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3730
+ ` : ''}// Response type
3731
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3726
3732
  ${"```"}
3727
- ` : ''}
3733
+
3734
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
3728
3735
 
3729
3736
  ---
3730
3737
 
@@ -4063,11 +4070,20 @@ export default function Example() {
4063
4070
  }
4064
4071
  \`\`\`
4065
4072
 
4066
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4073
+ ### Type Imports
4074
+
4075
+ These types are generated and available for import:
4076
+
4067
4077
  \`\`\`ts
4068
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';\n` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';\n` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4078
+ ${requestBodyType ? `// Request body type
4079
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4080
+ ` : ''}${paramsType ? `// Path/query parameters type
4081
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
4082
+ ` : ''}// Response/event type
4083
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4069
4084
  \`\`\`
4070
- ` : ''}
4085
+
4086
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4071
4087
 
4072
4088
  ---
4073
4089
 
@@ -4276,14 +4292,20 @@ export default function Example() {
4276
4292
  }
4277
4293
  ${"```"}
4278
4294
 
4279
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4295
+ ### Type Imports
4296
+
4297
+ These types are generated and available for import:
4298
+
4280
4299
  ${"```ts"}
4281
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
4282
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
4283
- ` : ''}// Prefer the concrete response type:
4284
- import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4300
+ ${requestBodyType ? `// Request body type
4301
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4302
+ ` : ''}${paramsType ? `// Path/query parameters type
4303
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
4304
+ ` : ''}// Response type
4305
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4285
4306
  ${"```"}
4286
- ` : ''}
4307
+
4308
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4287
4309
 
4288
4310
  ---
4289
4311
 
@@ -4622,13 +4644,20 @@ export default function Example() {
4622
4644
  }
4623
4645
  ${"```"}
4624
4646
 
4625
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4647
+ ### Type Imports
4648
+
4649
+ These types are generated and available for import:
4650
+
4626
4651
  ${"```ts"}
4627
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
4628
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
4629
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4652
+ ${requestBodyType ? `// Request body type
4653
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4654
+ ` : ''}${paramsType ? `// Path/query parameters type
4655
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
4656
+ ` : ''}// Response type
4657
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
4630
4658
  ${"```"}
4631
- ` : ''}
4659
+
4660
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4632
4661
 
4633
4662
  ---
4634
4663
 
@@ -4841,12 +4870,18 @@ export default function Example() {
4841
4870
  }
4842
4871
  ${"```"}
4843
4872
 
4844
- ${paramsType ? `### Optional types (if generated by your build)
4873
+ ### Type Imports
4874
+
4875
+ These types are generated and available for import:
4876
+
4845
4877
  ${"```ts"}
4846
- import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascal}.params';
4847
- import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascal}.response';
4878
+ ${paramsType ? `// Path/query parameters type
4879
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascal}.params';
4880
+ ` : ''}// Response type (Blob for downloads)
4881
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascal}.response';
4848
4882
  ${"```"}
4849
- ` : ''}
4883
+
4884
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4850
4885
 
4851
4886
  ---
4852
4887
 
package/dist/index.js CHANGED
@@ -3692,13 +3692,20 @@ export async function serverAction(formData: FormData) {
3692
3692
  }
3693
3693
  ${"```"}
3694
3694
 
3695
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3695
+ ### Type Imports
3696
+
3697
+ These types are generated and available for import:
3698
+
3696
3699
  ${"```ts"}
3697
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3698
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3699
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3700
+ ${requestBodyType ? `// Request body type
3701
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
3702
+ ` : ''}${paramsType ? `// Path/query parameters type
3703
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3704
+ ` : ''}// Response type
3705
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3700
3706
  ${"```"}
3701
- ` : ''}
3707
+
3708
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
3702
3709
 
3703
3710
  ---
3704
3711
 
@@ -4037,11 +4044,20 @@ export default function Example() {
4037
4044
  }
4038
4045
  \`\`\`
4039
4046
 
4040
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4047
+ ### Type Imports
4048
+
4049
+ These types are generated and available for import:
4050
+
4041
4051
  \`\`\`ts
4042
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';\n` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';\n` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4052
+ ${requestBodyType ? `// Request body type
4053
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4054
+ ` : ''}${paramsType ? `// Path/query parameters type
4055
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.params';
4056
+ ` : ''}// Response/event type
4057
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4043
4058
  \`\`\`
4044
- ` : ''}
4059
+
4060
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4045
4061
 
4046
4062
  ---
4047
4063
 
@@ -4250,14 +4266,20 @@ export default function Example() {
4250
4266
  }
4251
4267
  ${"```"}
4252
4268
 
4253
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4269
+ ### Type Imports
4270
+
4271
+ These types are generated and available for import:
4272
+
4254
4273
  ${"```ts"}
4255
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
4256
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
4257
- ` : ''}// Prefer the concrete response type:
4258
- import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4274
+ ${requestBodyType ? `// Request body type
4275
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4276
+ ` : ''}${paramsType ? `// Path/query parameters type
4277
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.params';
4278
+ ` : ''}// Response type
4279
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4259
4280
  ${"```"}
4260
- ` : ''}
4281
+
4282
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4261
4283
 
4262
4284
  ---
4263
4285
 
@@ -4596,13 +4618,20 @@ export default function Example() {
4596
4618
  }
4597
4619
  ${"```"}
4598
4620
 
4599
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
4621
+ ### Type Imports
4622
+
4623
+ These types are generated and available for import:
4624
+
4600
4625
  ${"```ts"}
4601
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
4602
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
4603
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4626
+ ${requestBodyType ? `// Request body type
4627
+ import type { ${requestBodyType} } from '@intrig/next/${descriptor.source}/components/schemas/${requestBodyType}';
4628
+ ` : ''}${paramsType ? `// Path/query parameters type
4629
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.params';
4630
+ ` : ''}// Response type
4631
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascalCase(descriptor.name)}.response';
4604
4632
  ${"```"}
4605
- ` : ''}
4633
+
4634
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4606
4635
 
4607
4636
  ---
4608
4637
 
@@ -4815,12 +4844,18 @@ export default function Example() {
4815
4844
  }
4816
4845
  ${"```"}
4817
4846
 
4818
- ${paramsType ? `### Optional types (if generated by your build)
4847
+ ### Type Imports
4848
+
4849
+ These types are generated and available for import:
4850
+
4819
4851
  ${"```ts"}
4820
- import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascal}.params';
4821
- import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascal}.response';
4852
+ ${paramsType ? `// Path/query parameters type
4853
+ import type { ${paramsType} } from '@intrig/next/${descriptor.path}/${pascal}.params';
4854
+ ` : ''}// Response type (Blob for downloads)
4855
+ import type { ${responseTypeName} } from '@intrig/next/${descriptor.path}/${pascal}.response';
4822
4856
  ${"```"}
4823
- ` : ''}
4857
+
4858
+ > **Tip:** Always import types from the SDK rather than defining them inline. This ensures type safety and keeps your code in sync with the API.
4824
4859
 
4825
4860
  ---
4826
4861
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intrig/plugin-next",
3
- "version": "0.0.15-25",
3
+ "version": "0.0.15-26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@intrig/plugin-sdk": "^0.0.15-25",
18
+ "@intrig/plugin-sdk": "^0.0.15-26",
19
19
  "@swc/helpers": "~0.5.11",
20
20
  "fs-extra": "^11.2.0"
21
21
  },