@intrig/plugin-react 0.0.15-25 → 0.0.15-27

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
@@ -3407,11 +3407,20 @@ export default function Example() {
3407
3407
  }
3408
3408
  \`\`\`
3409
3409
 
3410
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3410
+ ### Type Imports
3411
+
3412
+ These types are generated and available for import:
3413
+
3411
3414
  \`\`\`ts
3412
- ${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';
3415
+ ${requestBodyType ? `// Request body type
3416
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3417
+ ` : ''}${paramsType ? `// Path/query parameters type
3418
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3419
+ ` : ''}// Response/event type
3420
+ import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3413
3421
  \`\`\`
3414
- ` : ''}
3422
+
3423
+ > **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.
3415
3424
 
3416
3425
  ---
3417
3426
 
@@ -3620,14 +3629,20 @@ export default function Example() {
3620
3629
  }
3621
3630
  ${"```"}
3622
3631
 
3623
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3632
+ ### Type Imports
3633
+
3634
+ These types are generated and available for import:
3635
+
3624
3636
  ${"```ts"}
3625
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3626
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3627
- ` : ''}// Prefer the concrete response type:
3637
+ ${requestBodyType ? `// Request body type
3638
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3639
+ ` : ''}${paramsType ? `// Path/query parameters type
3640
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3641
+ ` : ''}// Response type
3628
3642
  import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3629
3643
  ${"```"}
3630
- ` : ''}
3644
+
3645
+ > **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.
3631
3646
 
3632
3647
  ---
3633
3648
 
@@ -3966,13 +3981,20 @@ export default function Example() {
3966
3981
  }
3967
3982
  ${"```"}
3968
3983
 
3969
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3984
+ ### Type Imports
3985
+
3986
+ These types are generated and available for import:
3987
+
3970
3988
  ${"```ts"}
3971
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3972
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3973
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3989
+ ${requestBodyType ? `// Request body type
3990
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3991
+ ` : ''}${paramsType ? `// Path/query parameters type
3992
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.params';
3993
+ ` : ''}// Response type
3994
+ import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pluginSdk.pascalCase(descriptor.name)}.response';
3974
3995
  ${"```"}
3975
- ` : ''}
3996
+
3997
+ > **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.
3976
3998
 
3977
3999
  ---
3978
4000
 
@@ -4185,12 +4207,18 @@ export default function Example() {
4185
4207
  }
4186
4208
  ${"```"}
4187
4209
 
4188
- ${paramsType ? `### Optional types (if generated by your build)
4210
+ ### Type Imports
4211
+
4212
+ These types are generated and available for import:
4213
+
4189
4214
  ${"```ts"}
4215
+ ${paramsType ? `// Path/query parameters type
4190
4216
  import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascal}.params';
4217
+ ` : ''}// Response type (Blob for downloads)
4191
4218
  import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascal}.response';
4192
4219
  ${"```"}
4193
- ` : ''}
4220
+
4221
+ > **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.
4194
4222
 
4195
4223
  ---
4196
4224
 
package/dist/index.js CHANGED
@@ -3383,11 +3383,20 @@ export default function Example() {
3383
3383
  }
3384
3384
  \`\`\`
3385
3385
 
3386
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3386
+ ### Type Imports
3387
+
3388
+ These types are generated and available for import:
3389
+
3387
3390
  \`\`\`ts
3388
- ${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';
3391
+ ${requestBodyType ? `// Request body type
3392
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3393
+ ` : ''}${paramsType ? `// Path/query parameters type
3394
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3395
+ ` : ''}// Response/event type
3396
+ import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3389
3397
  \`\`\`
3390
- ` : ''}
3398
+
3399
+ > **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.
3391
3400
 
3392
3401
  ---
3393
3402
 
@@ -3596,14 +3605,20 @@ export default function Example() {
3596
3605
  }
3597
3606
  ${"```"}
3598
3607
 
3599
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3608
+ ### Type Imports
3609
+
3610
+ These types are generated and available for import:
3611
+
3600
3612
  ${"```ts"}
3601
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3602
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3603
- ` : ''}// Prefer the concrete response type:
3613
+ ${requestBodyType ? `// Request body type
3614
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3615
+ ` : ''}${paramsType ? `// Path/query parameters type
3616
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3617
+ ` : ''}// Response type
3604
3618
  import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3605
3619
  ${"```"}
3606
- ` : ''}
3620
+
3621
+ > **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.
3607
3622
 
3608
3623
  ---
3609
3624
 
@@ -3942,13 +3957,20 @@ export default function Example() {
3942
3957
  }
3943
3958
  ${"```"}
3944
3959
 
3945
- ${requestBodyType || paramsType ? `### Optional types (if generated by your build)
3960
+ ### Type Imports
3961
+
3962
+ These types are generated and available for import:
3963
+
3946
3964
  ${"```ts"}
3947
- ${requestBodyType ? `import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3948
- ` : ''}${paramsType ? `import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3949
- ` : ''}import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3965
+ ${requestBodyType ? `// Request body type
3966
+ import type { ${requestBodyType} } from '@intrig/react/${descriptor.source}/components/schemas/${requestBodyType}';
3967
+ ` : ''}${paramsType ? `// Path/query parameters type
3968
+ import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.params';
3969
+ ` : ''}// Response type
3970
+ import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascalCase(descriptor.name)}.response';
3950
3971
  ${"```"}
3951
- ` : ''}
3972
+
3973
+ > **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.
3952
3974
 
3953
3975
  ---
3954
3976
 
@@ -4161,12 +4183,18 @@ export default function Example() {
4161
4183
  }
4162
4184
  ${"```"}
4163
4185
 
4164
- ${paramsType ? `### Optional types (if generated by your build)
4186
+ ### Type Imports
4187
+
4188
+ These types are generated and available for import:
4189
+
4165
4190
  ${"```ts"}
4191
+ ${paramsType ? `// Path/query parameters type
4166
4192
  import type { ${paramsType} } from '@intrig/react/${descriptor.path}/${pascal}.params';
4193
+ ` : ''}// Response type (Blob for downloads)
4167
4194
  import type { ${responseTypeName} } from '@intrig/react/${descriptor.path}/${pascal}.response';
4168
4195
  ${"```"}
4169
- ` : ''}
4196
+
4197
+ > **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.
4170
4198
 
4171
4199
  ---
4172
4200
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intrig/plugin-react",
3
- "version": "0.0.15-25",
3
+ "version": "0.0.15-27",
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-27",
19
19
  "@swc/helpers": "~0.5.11",
20
20
  "fs-extra": "^11.2.0"
21
21
  },