@h-ai/api-contract 1.0.0-beta.2 → 1.0.0-beta.21

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.d.ts CHANGED
@@ -922,8 +922,8 @@ declare const apiContract: {
922
922
  invite: _orpc_contract.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
923
923
  metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
924
924
  email: zod.ZodOptional<zod.ZodString>;
925
- username: zod.ZodString;
926
925
  phone: zod.ZodOptional<zod.ZodString>;
926
+ username: zod.ZodString;
927
927
  displayName: zod.ZodOptional<zod.ZodString>;
928
928
  accountType: zod.ZodOptional<zod.ZodEnum<{
929
929
  permanent: "permanent";
@@ -1819,9 +1819,9 @@ declare const apiContract: {
1819
1819
  }, zod_v4_core.$strict>>>;
1820
1820
  }, zod_v4_core.$strip>;
1821
1821
  finish_reason: zod.ZodEnum<{
1822
- length: "length";
1823
1822
  tool_calls: "tool_calls";
1824
1823
  stop: "stop";
1824
+ length: "length";
1825
1825
  content_filter: "content_filter";
1826
1826
  }>;
1827
1827
  }, zod_v4_core.$strip>>;
@@ -1983,11 +1983,11 @@ declare const apiContract: {
1983
1983
  query: zod.ZodString;
1984
1984
  topK: zod.ZodOptional<zod.ZodNumber>;
1985
1985
  types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1986
- instruction: "instruction";
1987
1986
  fact: "fact";
1988
1987
  preference: "preference";
1989
1988
  event: "event";
1990
1989
  entity: "entity";
1990
+ instruction: "instruction";
1991
1991
  }>>>;
1992
1992
  minImportance: zod.ZodOptional<zod.ZodNumber>;
1993
1993
  objectId: zod.ZodOptional<zod.ZodString>;
@@ -1998,11 +1998,11 @@ declare const apiContract: {
1998
1998
  id: zod.ZodString;
1999
1999
  content: zod.ZodString;
2000
2000
  type: zod.ZodEnum<{
2001
- instruction: "instruction";
2002
2001
  fact: "fact";
2003
2002
  preference: "preference";
2004
2003
  event: "event";
2005
2004
  entity: "entity";
2005
+ instruction: "instruction";
2006
2006
  }>;
2007
2007
  importance: zod.ZodNumber;
2008
2008
  objectId: zod.ZodOptional<zod.ZodString>;
@@ -2028,11 +2028,11 @@ declare const apiContract: {
2028
2028
  }, zod_v4_core.$strip>], "success">, Record<never, never>, Record<never, never>>;
2029
2029
  list: _orpc_contract.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
2030
2030
  types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
2031
- instruction: "instruction";
2032
2031
  fact: "fact";
2033
2032
  preference: "preference";
2034
2033
  event: "event";
2035
2034
  entity: "entity";
2035
+ instruction: "instruction";
2036
2036
  }>>>;
2037
2037
  objectId: zod.ZodOptional<zod.ZodString>;
2038
2038
  offset: zod.ZodOptional<zod.ZodNumber>;
@@ -2044,11 +2044,11 @@ declare const apiContract: {
2044
2044
  id: zod.ZodString;
2045
2045
  content: zod.ZodString;
2046
2046
  type: zod.ZodEnum<{
2047
- instruction: "instruction";
2048
2047
  fact: "fact";
2049
2048
  preference: "preference";
2050
2049
  event: "event";
2051
2050
  entity: "entity";
2051
+ instruction: "instruction";
2052
2052
  }>;
2053
2053
  importance: zod.ZodNumber;
2054
2054
  objectId: zod.ZodOptional<zod.ZodString>;
@@ -2158,9 +2158,9 @@ declare const apiContract: {
2158
2158
  orderNo: zod.ZodString;
2159
2159
  transactionId: zod.ZodOptional<zod.ZodString>;
2160
2160
  status: zod.ZodEnum<{
2161
- pending: "pending";
2162
- failed: "failed";
2163
2161
  closed: "closed";
2162
+ failed: "failed";
2163
+ pending: "pending";
2164
2164
  paid: "paid";
2165
2165
  refunded: "refunded";
2166
2166
  }>;
@@ -2366,14 +2366,14 @@ declare const apiContract: {
2366
2366
  handled: "handled";
2367
2367
  }>;
2368
2368
  collectionStatus: zod.ZodEnum<{
2369
+ failed: "failed";
2369
2370
  collecting: "collecting";
2370
2371
  complete: "complete";
2371
2372
  partial: "partial";
2372
- failed: "failed";
2373
2373
  }>;
2374
2374
  notificationStatus: zod.ZodEnum<{
2375
- pending: "pending";
2376
2375
  failed: "failed";
2376
+ pending: "pending";
2377
2377
  disabled: "disabled";
2378
2378
  sending: "sending";
2379
2379
  sent: "sent";
@@ -2418,14 +2418,14 @@ declare const apiContract: {
2418
2418
  handled: "handled";
2419
2419
  }>>;
2420
2420
  collectionStatus: zod.ZodOptional<zod.ZodEnum<{
2421
+ failed: "failed";
2421
2422
  collecting: "collecting";
2422
2423
  complete: "complete";
2423
2424
  partial: "partial";
2424
- failed: "failed";
2425
2425
  }>>;
2426
2426
  notificationStatus: zod.ZodOptional<zod.ZodEnum<{
2427
- pending: "pending";
2428
2427
  failed: "failed";
2428
+ pending: "pending";
2429
2429
  disabled: "disabled";
2430
2430
  sending: "sending";
2431
2431
  sent: "sent";
@@ -2450,14 +2450,14 @@ declare const apiContract: {
2450
2450
  handled: "handled";
2451
2451
  }>;
2452
2452
  collectionStatus: zod.ZodEnum<{
2453
+ failed: "failed";
2453
2454
  collecting: "collecting";
2454
2455
  complete: "complete";
2455
2456
  partial: "partial";
2456
- failed: "failed";
2457
2457
  }>;
2458
2458
  notificationStatus: zod.ZodEnum<{
2459
- pending: "pending";
2460
2459
  failed: "failed";
2460
+ pending: "pending";
2461
2461
  disabled: "disabled";
2462
2462
  sending: "sending";
2463
2463
  sent: "sent";
@@ -2510,14 +2510,14 @@ declare const apiContract: {
2510
2510
  handled: "handled";
2511
2511
  }>;
2512
2512
  collectionStatus: zod.ZodEnum<{
2513
+ failed: "failed";
2513
2514
  collecting: "collecting";
2514
2515
  complete: "complete";
2515
2516
  partial: "partial";
2516
- failed: "failed";
2517
2517
  }>;
2518
2518
  notificationStatus: zod.ZodEnum<{
2519
- pending: "pending";
2520
2519
  failed: "failed";
2520
+ pending: "pending";
2521
2521
  disabled: "disabled";
2522
2522
  sending: "sending";
2523
2523
  sent: "sent";
@@ -2544,8 +2544,8 @@ declare const apiContract: {
2544
2544
  checksum: zod.ZodString;
2545
2545
  feedbackId: zod.ZodString;
2546
2546
  status: zod.ZodEnum<{
2547
- pending: "pending";
2548
2547
  failed: "failed";
2548
+ pending: "pending";
2549
2549
  available: "available";
2550
2550
  }>;
2551
2551
  missingReason: zod.ZodOptional<zod.ZodString>;
@@ -2576,8 +2576,8 @@ declare const apiContract: {
2576
2576
  cleanup: "cleanup";
2577
2577
  }>;
2578
2578
  status: zod.ZodEnum<{
2579
- pending: "pending";
2580
2579
  failed: "failed";
2580
+ pending: "pending";
2581
2581
  running: "running";
2582
2582
  succeeded: "succeeded";
2583
2583
  }>;
@@ -2688,14 +2688,14 @@ declare const apiContract: {
2688
2688
  handled: "handled";
2689
2689
  }>;
2690
2690
  collectionStatus: zod.ZodEnum<{
2691
+ failed: "failed";
2691
2692
  collecting: "collecting";
2692
2693
  complete: "complete";
2693
2694
  partial: "partial";
2694
- failed: "failed";
2695
2695
  }>;
2696
2696
  notificationStatus: zod.ZodEnum<{
2697
- pending: "pending";
2698
2697
  failed: "failed";
2698
+ pending: "pending";
2699
2699
  disabled: "disabled";
2700
2700
  sending: "sending";
2701
2701
  sent: "sent";
@@ -2771,8 +2771,8 @@ declare const apiContract: {
2771
2771
  cleanup: "cleanup";
2772
2772
  }>;
2773
2773
  status: zod.ZodEnum<{
2774
- pending: "pending";
2775
2774
  failed: "failed";
2775
+ pending: "pending";
2776
2776
  running: "running";
2777
2777
  succeeded: "succeeded";
2778
2778
  }>;
@@ -2880,14 +2880,14 @@ declare const apiContract: {
2880
2880
  handled: "handled";
2881
2881
  }>;
2882
2882
  collectionStatus: zod.ZodEnum<{
2883
+ failed: "failed";
2883
2884
  collecting: "collecting";
2884
2885
  complete: "complete";
2885
2886
  partial: "partial";
2886
- failed: "failed";
2887
2887
  }>;
2888
2888
  notificationStatus: zod.ZodEnum<{
2889
- pending: "pending";
2890
2889
  failed: "failed";
2890
+ pending: "pending";
2891
2891
  disabled: "disabled";
2892
2892
  sending: "sending";
2893
2893
  sent: "sent";
@@ -2936,8 +2936,8 @@ declare const apiContract: {
2936
2936
  checksum: zod.ZodString;
2937
2937
  feedbackId: zod.ZodString;
2938
2938
  status: zod.ZodEnum<{
2939
- pending: "pending";
2940
2939
  failed: "failed";
2940
+ pending: "pending";
2941
2941
  available: "available";
2942
2942
  }>;
2943
2943
  missingReason: zod.ZodOptional<zod.ZodString>;
@@ -3007,4 +3007,5 @@ declare const IdParamSchema: z.ZodObject<{
3007
3007
  id: z.ZodString;
3008
3008
  }, z.core.$strip>;
3009
3009
 
3010
- export { type CreateApiContractOptions, type CreatedApiContract, HaiErrorSchema, IdParamSchema, PaginationQuerySchema, apiContract, paginatedSchema };
3010
+ export { HaiErrorSchema, IdParamSchema, PaginationQuerySchema, apiContract, paginatedSchema };
3011
+ export type { CreateApiContractOptions, CreatedApiContract };
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { iamContract } from './chunk-CXOK55BY.js';
2
- export { IamAdminCreateUserInputSchema, IamAdminResetPasswordInputSchema, IamAdminUpdateUserInputSchema, IamAgreementDisplaySchema, IamAuthResultSchema, IamCaptchaChallengeSchema, IamChangePasswordInputSchema, IamConfirmPasswordResetInputSchema, IamCreateCaptchaInputSchema, IamCreatePermissionInputSchema, IamCreateRoleInputSchema, IamCurrentUserSchema, IamInviteUserInputSchema, IamLdapLoginInputSchema, IamListPermissionsInputSchema, IamListUsersInputSchema, IamLoginInputSchema, IamLogoutInputSchema, IamOtpLoginInputSchema, IamPermissionSchema, IamPermissionTypeSchema, IamPublicConfigSchema, IamReauthenticateInputSchema, IamReauthenticationProofSchema, IamRefreshTokenDataSchema, IamRefreshTokenInputSchema, IamRegisterInputSchema, IamRenewPasswordInputSchema, IamRequestPasswordResetInputSchema, IamRoleSchema, IamSendOtpDataSchema, IamSendOtpInputSchema, IamSessionErrorCodeSchema, IamTokenPairSchema, IamUpdateCurrentUserInputSchema, IamUpdateRoleInputSchema, IamUserIdInputSchema, IamUserSchema } from './chunk-CXOK55BY.js';
3
- import { storageContract } from './chunk-ZM7KM6V3.js';
4
- export { StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, StorageListFilesInputSchema, StoragePresignDownloadInputSchema, StoragePresignUploadInputSchema, StoragePresignedUrlSchema } from './chunk-ZM7KM6V3.js';
5
- import { aiContract } from './chunk-LD5PSL4C.js';
6
- export { AUDIO_WS_PATH, AiAssistantMessageSchema, AiChatCompletionChoiceSchema, AiChatCompletionDataSchema, AiChatCompletionInputSchema, AiChatHistoryDataSchema, AiChatHistoryInputSchema, AiChatMessageSchema, AiChatRecordSchema, AiImageContentSchema, AiMemoryEntrySchema, AiMemoryListDataSchema, AiMemoryListInputSchema, AiMemoryRecallDataSchema, AiMemoryRecallInputSchema, AiMemoryTypeSchema, AiMessageContentSchema, AiMessageRoleSchema, AiSendMessageDataSchema, AiSendMessageInputSchema, AiSessionInfoSchema, AiSessionListDataSchema, AiSessionListInputSchema, AiTextContentSchema, AiTokenUsageSchema, AiToolCallSchema, AiToolDefinitionSchema, AudioFormatSchema, AudioWsClientMessageSchema, AudioWsDoneMessageSchema, AudioWsStartMessageSchema, AudioWsTextMessageSchema } from './chunk-LD5PSL4C.js';
7
- import { paymentContract } from './chunk-M4DEKGOP.js';
8
- export { PaymentCreateOrderDataSchema, PaymentCreateOrderInputSchema, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema } from './chunk-M4DEKGOP.js';
9
- import { feedbackContract } from './chunk-FGB5O4VA.js';
10
- export { FeedbackAppendEvidenceInputSchema, FeedbackAttachmentDataSchema, FeedbackAttachmentInputSchema, FeedbackAttachmentQuerySchema, FeedbackAttachmentSchema, FeedbackBudgetSchema, FeedbackCollectionStatusSchema, FeedbackCompleteInputSchema, FeedbackDetailSchema, FeedbackEvidenceAckSchema, FeedbackEvidenceInputSchema, FeedbackEvidenceQuerySchema, FeedbackEvidenceSchema, FeedbackExportInputSchema, FeedbackExportQuerySchema, FeedbackHistorySchema, FeedbackIdInputSchema, FeedbackJobSchema, FeedbackListInputSchema, FeedbackNotificationStatusSchema, FeedbackReportSchema, FeedbackRetryInputSchema, FeedbackSetStatusInputSchema, FeedbackStatusSchema, FeedbackSubmitInputSchema, FeedbackUploadInputSchema, resolveFeedbackBudget } from './chunk-FGB5O4VA.js';
1
+ import { iamContract } from './chunk-PS3OHILQ.js';
2
+ export { IamAdminCreateUserInputSchema, IamAdminResetPasswordInputSchema, IamAdminUpdateUserInputSchema, IamAgreementDisplaySchema, IamAuthResultSchema, IamCaptchaChallengeSchema, IamChangePasswordInputSchema, IamConfirmPasswordResetInputSchema, IamCreateCaptchaInputSchema, IamCreatePermissionInputSchema, IamCreateRoleInputSchema, IamCurrentUserSchema, IamInviteUserInputSchema, IamLdapLoginInputSchema, IamListPermissionsInputSchema, IamListUsersInputSchema, IamLoginInputSchema, IamLogoutInputSchema, IamOtpLoginInputSchema, IamPermissionSchema, IamPermissionTypeSchema, IamPublicConfigSchema, IamReauthenticateInputSchema, IamReauthenticationProofSchema, IamRefreshTokenDataSchema, IamRefreshTokenInputSchema, IamRegisterInputSchema, IamRenewPasswordInputSchema, IamRequestPasswordResetInputSchema, IamRoleSchema, IamSendOtpDataSchema, IamSendOtpInputSchema, IamSessionErrorCodeSchema, IamTokenPairSchema, IamUpdateCurrentUserInputSchema, IamUpdateRoleInputSchema, IamUserIdInputSchema, IamUserSchema } from './chunk-PS3OHILQ.js';
3
+ import { storageContract } from './chunk-BAEWPPKY.js';
4
+ export { StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, StorageListFilesInputSchema, StoragePresignDownloadInputSchema, StoragePresignUploadInputSchema, StoragePresignedUrlSchema } from './chunk-BAEWPPKY.js';
5
+ import { aiContract } from './chunk-NMTOSEVA.js';
6
+ export { AUDIO_WS_PATH, AiAssistantMessageSchema, AiChatCompletionChoiceSchema, AiChatCompletionDataSchema, AiChatCompletionInputSchema, AiChatHistoryDataSchema, AiChatHistoryInputSchema, AiChatMessageSchema, AiChatRecordSchema, AiImageContentSchema, AiMemoryEntrySchema, AiMemoryListDataSchema, AiMemoryListInputSchema, AiMemoryRecallDataSchema, AiMemoryRecallInputSchema, AiMemoryTypeSchema, AiMessageContentSchema, AiMessageRoleSchema, AiSendMessageDataSchema, AiSendMessageInputSchema, AiSessionInfoSchema, AiSessionListDataSchema, AiSessionListInputSchema, AiTextContentSchema, AiTokenUsageSchema, AiToolCallSchema, AiToolDefinitionSchema, AudioFormatSchema, AudioWsClientMessageSchema, AudioWsDoneMessageSchema, AudioWsStartMessageSchema, AudioWsTextMessageSchema } from './chunk-NMTOSEVA.js';
7
+ import { paymentContract } from './chunk-XFW626TI.js';
8
+ export { PaymentCreateOrderDataSchema, PaymentCreateOrderInputSchema, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema } from './chunk-XFW626TI.js';
9
+ import { feedbackContract } from './chunk-VEUL2AEK.js';
10
+ export { FeedbackAppendEvidenceInputSchema, FeedbackAttachmentDataSchema, FeedbackAttachmentInputSchema, FeedbackAttachmentQuerySchema, FeedbackAttachmentSchema, FeedbackBudgetSchema, FeedbackCollectionStatusSchema, FeedbackCompleteInputSchema, FeedbackDetailSchema, FeedbackEvidenceAckSchema, FeedbackEvidenceInputSchema, FeedbackEvidenceQuerySchema, FeedbackEvidenceSchema, FeedbackExportInputSchema, FeedbackExportQuerySchema, FeedbackHistorySchema, FeedbackIdInputSchema, FeedbackJobSchema, FeedbackListInputSchema, FeedbackNotificationStatusSchema, FeedbackReportSchema, FeedbackRetryInputSchema, FeedbackSetStatusInputSchema, FeedbackStatusSchema, FeedbackSubmitInputSchema, FeedbackUploadInputSchema, resolveFeedbackBudget } from './chunk-VEUL2AEK.js';
11
11
  import { paginatedSchema } from './chunk-CCCPHO6X.js';
12
12
  export { PaginationQuerySchema, paginatedSchema } from './chunk-CCCPHO6X.js';
13
- import { pathOf, route, HaiVoidResultSchema, haiResultSchema } from './chunk-5UEDYQLG.js';
14
- export { HaiErrorSchema } from './chunk-5UEDYQLG.js';
13
+ import { pathOf, route, HaiVoidResultSchema, haiResultSchema } from './chunk-5LBEMLDK.js';
14
+ export { HaiErrorSchema } from './chunk-5LBEMLDK.js';
15
15
  import { z } from 'zod';
16
16
 
17
17
  // src/composition/create-api-contract.ts
@@ -65,9 +65,9 @@ declare const paymentContract: {
65
65
  orderNo: z.ZodString;
66
66
  transactionId: z.ZodOptional<z.ZodString>;
67
67
  status: z.ZodEnum<{
68
- pending: "pending";
69
- failed: "failed";
70
68
  closed: "closed";
69
+ failed: "failed";
70
+ pending: "pending";
71
71
  paid: "paid";
72
72
  refunded: "refunded";
73
73
  }>;
@@ -327,9 +327,9 @@ declare const PaymentOrderSchema: z.ZodObject<{
327
327
  orderNo: z.ZodString;
328
328
  transactionId: z.ZodOptional<z.ZodString>;
329
329
  status: z.ZodEnum<{
330
- pending: "pending";
331
- failed: "failed";
332
330
  closed: "closed";
331
+ failed: "failed";
332
+ pending: "pending";
333
333
  paid: "paid";
334
334
  refunded: "refunded";
335
335
  }>;
@@ -478,4 +478,5 @@ type PaymentCreateOrderOutput = HaiResult<z.infer<typeof PaymentCreateOrderDataS
478
478
  */
479
479
  type PaymentRefundInput = z.infer<typeof PaymentRefundInputSchema>;
480
480
 
481
- export { type PaymentContract, PaymentCreateOrderDataSchema, type PaymentCreateOrderInput, PaymentCreateOrderInputSchema, type PaymentCreateOrderOutput, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, type PaymentRefundInput, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema, paymentContract };
481
+ export { PaymentCreateOrderDataSchema, PaymentCreateOrderInputSchema, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema, paymentContract };
482
+ export type { PaymentContract, PaymentCreateOrderInput, PaymentCreateOrderOutput, PaymentRefundInput };
@@ -1,4 +1,4 @@
1
- export { PaymentCreateOrderDataSchema, PaymentCreateOrderInputSchema, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema, paymentContract } from '../chunk-M4DEKGOP.js';
2
- import '../chunk-5UEDYQLG.js';
1
+ export { PaymentCreateOrderDataSchema, PaymentCreateOrderInputSchema, PaymentNotifyMessageSchema, PaymentOrderSchema, PaymentProviderSchema, PaymentQueryOrderInputSchema, PaymentRefundDataSchema, PaymentRefundInputSchema, PaymentStripeNotifyDataSchema, PaymentTradeTypeSchema, paymentContract } from '../chunk-XFW626TI.js';
2
+ import '../chunk-5LBEMLDK.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -492,4 +492,5 @@ type StorageFileKeyInput = z.infer<typeof StorageFileKeyInputSchema>;
492
492
  */
493
493
  type StorageDeleteFilesInput = z.infer<typeof StorageDeleteFilesInputSchema>;
494
494
 
495
- export { type StorageContract, type StorageDeleteFilesInput, StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, type StorageFileKeyInput, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, type StorageListFilesInput, StorageListFilesInputSchema, type StoragePresignDownloadInput, StoragePresignDownloadInputSchema, type StoragePresignUploadInput, StoragePresignUploadInputSchema, type StoragePresignedUrlOutput, StoragePresignedUrlSchema, storageContract };
495
+ export { StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, StorageListFilesInputSchema, StoragePresignDownloadInputSchema, StoragePresignUploadInputSchema, StoragePresignedUrlSchema, storageContract };
496
+ export type { StorageContract, StorageDeleteFilesInput, StorageFileKeyInput, StorageListFilesInput, StoragePresignDownloadInput, StoragePresignUploadInput, StoragePresignedUrlOutput };
@@ -1,4 +1,4 @@
1
- export { StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, StorageListFilesInputSchema, StoragePresignDownloadInputSchema, StoragePresignUploadInputSchema, StoragePresignedUrlSchema, storageContract } from '../chunk-ZM7KM6V3.js';
2
- import '../chunk-5UEDYQLG.js';
1
+ export { StorageDeleteFilesInputSchema, StorageDeleteSummarySchema, StorageFileKeyInputSchema, StorageFileMetadataSchema, StorageListFilesDataSchema, StorageListFilesInputSchema, StoragePresignDownloadInputSchema, StoragePresignUploadInputSchema, StoragePresignedUrlSchema, storageContract } from '../chunk-BAEWPPKY.js';
2
+ import '../chunk-5LBEMLDK.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@h-ai/api-contract",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0-beta.21",
5
5
  "description": "Hai Framework public API contracts powered by oRPC and Zod.",
6
6
  "license": "Apache-2.0",
7
7
  "exports": {
@@ -43,17 +43,17 @@
43
43
  "node": "^22.23.4 || ^24.22.1 || ^26.12.1"
44
44
  },
45
45
  "dependencies": {
46
- "@h-ai/core": "1.0.0-beta.2",
47
- "@h-ai/storage": "1.0.0-beta.2",
48
- "@orpc/contract": "^1.15.5",
49
- "zod": "^4.6.5"
46
+ "@h-ai/core": "1.0.0-beta.21",
47
+ "@h-ai/storage": "1.0.0-beta.21",
48
+ "@orpc/contract": "^1.16.2",
49
+ "zod": "^4.6.7"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/node": "^26.6.5",
53
- "rimraf": "^6.1.3",
54
- "tsup": "^8.5.1",
52
+ "@types/node": "^26.6.6",
53
+ "rimraf": "^6.1.4",
54
+ "tsup": "^9.0.0",
55
55
  "typescript": "^6.0.3",
56
- "vitest": "^4.1.11"
56
+ "vitest": "^5.1.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsup",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/common/result-schemas.ts","../src/common/route.ts"],"names":[],"mappings":";;;;AA0BO,IAAM,cAAA,GAAiB,EAAE,MAAA,CAAO;AAAA,EACrC,IAAA,EAAM,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,QAAO,EAAG,CAAA,CAAE,MAAA,EAAQ,CAAC,CAAA;AAAA,EACtC,OAAA,EAAS,EAAE,MAAA,EAAO;AAAA,EAClB,SAAS,CAAA,CAAE,MAAA,GAAS,GAAA,CAAI,GAAG,EAAE,QAAA,EAAS;AAAA,EACtC,UAAA,EAAY,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAChC,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC5B,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC5B,KAAA,EAAO,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS;AAAA,EAC5B,UAAA,EAAY,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAChC,GAAA,EAAK,CAAA,CAAE,MAAA,CAAO,CAAA,CAAE,MAAA,IAAU,CAAA,CAAE,OAAA,EAAS,CAAA,CAAE,QAAA;AACzC,CAAC;AAiBM,SAAS,gBAAqC,UAAA,EAAe;AAClE,EAAA,OAAO,CAAA,CAAE,mBAAmB,SAAA,EAAW;AAAA,IACrC,EAAE,MAAA,CAAO;AAAA,MACP,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,IAAI,CAAA;AAAA,MACvB,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,IACD,EAAE,MAAA,CAAO;AAAA,MACP,OAAA,EAAS,CAAA,CAAE,OAAA,CAAQ,KAAK,CAAA;AAAA,MACxB,KAAA,EAAO;AAAA,KACR;AAAA,GACF,CAAA;AACH;AAYO,IAAM,mBAAA,GAAsB,eAAA,CAAgB,CAAA,CAAE,IAAA,EAAM;ACtDpD,IAAM,QAAyB,CAAA,GAAI,IAAA,KAAS,EAAA,CAAG,KAAA,CAAM,GAAG,IAAI;AAkB5D,SAAS,OAAO,SAAA,EAA+C;AACpE,EAAA,MAAM,IAAA,GAAO,SAAA,CAAU,OAAO,CAAA,CAAE,KAAA,CAAM,IAAA;AACtC,EAAA,IAAI,CAAC,IAAA;AACH,IAAA,MAAM,IAAI,MAAM,6CAA6C,CAAA;AAC/D,EAAA,OAAO,IAAA;AACT","file":"chunk-5UEDYQLG.js","sourcesContent":["/**\n * @h-ai/api-contract — HaiResult Schema\n *\n * 提供与 `@h-ai/core` HaiResult<T> 结构一致的 Zod Schema 工厂,\n * 用于 oRPC contract 的 output 定义和客户端响应校验。\n * @module result-schemas\n */\n\nimport { z } from 'zod'\n\n/**\n * HaiError 的跨端 JSON Schema。\n *\n * 仅描述公共错误字段,不暴露内部异常对象结构。\n * @example\n * ```ts\n * import { HaiErrorSchema } from '@h-ai/api-contract'\n *\n * const value = HaiErrorSchema.parse({\n * code: 'app:orders:001',\n * message: 'Order not found',\n * httpStatus: 404\n * })\n * void value\n * ```\n */\nexport const HaiErrorSchema = z.object({\n code: z.union([z.string(), z.number()]),\n message: z.string(),\n traceId: z.string().max(128).optional(),\n httpStatus: z.number().optional(),\n system: z.string().optional(),\n module: z.string().optional(),\n cause: z.unknown().optional(),\n suggestion: z.string().optional(),\n ext: z.record(z.string(), z.unknown()).optional(),\n})\n\n/**\n * 创建与 @h-ai/core HaiResult<T> 一致的响应 Schema。\n *\n * @param dataSchema - 成功分支 data 字段 Schema\n * @returns HaiResult<T> 的 Zod Schema\n * @example\n * ```ts\n * import { apiContract } from '@h-ai/api-contract'\n * import { z } from 'zod'\n *\n * const result = apiContract.haiResultSchema(z.object({ id: z.string() }))\n * .parse({ success: true, data: { id: 'order_1' } })\n * if (result.success) void result.data.id\n * ```\n */\nexport function haiResultSchema<T extends z.ZodType>(dataSchema: T) {\n return z.discriminatedUnion('success', [\n z.object({\n success: z.literal(true),\n data: dataSchema,\n }),\n z.object({\n success: z.literal(false),\n error: HaiErrorSchema,\n }),\n ])\n}\n\n/**\n * 无内容成功响应 Schema。\n * @example\n * ```ts\n * import { apiContract } from '@h-ai/api-contract'\n *\n * const result = apiContract.voidResultSchema.parse({ success: true, data: undefined })\n * if (!result.success) throw new Error(result.error.message)\n * ```\n */\nexport const HaiVoidResultSchema = haiResultSchema(z.void())\n","/**\n * @h-ai/api-contract — route builder\n *\n * 统一封装 oRPC 的 route builder。应用与契约包通过 `apiContract.route(...)`\n * 定义 HTTP 路由元数据,不需要直接依赖 `@orpc/contract` 或 `@h-ai/serv`。\n */\n\nimport type { AnyContractProcedure } from '@orpc/contract'\nimport { oc } from '@orpc/contract'\n\n/**\n * 创建 oRPC contract 路由节点。\n * @example\n * ```ts\n * import { apiContract } from '@h-ai/api-contract'\n * import { z } from 'zod'\n *\n * const health = apiContract.route({ method: 'GET', path: '/health' })\n * .output(z.object({ healthy: z.boolean() }))\n * void health\n * ```\n */\nexport const route: typeof oc.route = (...args) => oc.route(...args)\n\n/**\n * 读取 contract procedure 中声明的业务路径。\n *\n * 路径只在对应 `*-contract.ts` 的 route 定义中维护;transport、client 与\n * middleware 通过本函数读取,避免再维护一份路由常量。\n *\n * @param procedure - 已声明 HTTP route 的 oRPC contract procedure\n * @returns contract 中的绝对业务路径\n * @example\n * ```ts\n * import { apiContract } from '@h-ai/api-contract'\n *\n * const path = apiContract.pathOf(apiContract.iam.auth.login)\n * void path\n * ```\n */\nexport function pathOf(procedure: AnyContractProcedure): `/${string}` {\n const path = procedure['~orpc'].route.path\n if (!path)\n throw new Error('Contract procedure must define an HTTP path')\n return path\n}\n"]}