@reactionary/core 0.6.5 → 0.6.7

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 (71) hide show
  1. package/capabilities/analytics.capability.js +5 -5
  2. package/capabilities/company-registration.capability.js +9 -0
  3. package/capabilities/company.capability.js +59 -0
  4. package/capabilities/employee-invitation.capability.js +9 -0
  5. package/capabilities/employee.capability.js +9 -0
  6. package/capabilities/index.js +4 -0
  7. package/capabilities/product-recommendations.capability.js +8 -8
  8. package/factories/company-registration.factory.js +0 -0
  9. package/factories/company.factory.js +0 -0
  10. package/factories/employee-invitation.factory.js +0 -0
  11. package/factories/employee.factory.js +0 -0
  12. package/factories/index.js +4 -0
  13. package/package.json +1 -1
  14. package/schemas/models/base.model.js +5 -0
  15. package/schemas/models/checkout.model.js +2 -1
  16. package/schemas/models/company-registration.model.js +14 -0
  17. package/schemas/models/company.model.js +60 -0
  18. package/schemas/models/employee-invitation.model.js +22 -0
  19. package/schemas/models/employee.model.js +20 -0
  20. package/schemas/models/identifiers.model.js +45 -0
  21. package/schemas/models/index.js +4 -0
  22. package/schemas/mutations/company-registration.mutation.js +14 -0
  23. package/schemas/mutations/company.mutation.js +30 -0
  24. package/schemas/mutations/employee-invitation.mutation.js +20 -0
  25. package/schemas/mutations/employee.mutation.js +29 -0
  26. package/schemas/mutations/index.js +4 -0
  27. package/schemas/queries/checkout.query.js +1 -1
  28. package/schemas/queries/company-registration.query.js +8 -0
  29. package/schemas/queries/company.query.js +12 -0
  30. package/schemas/queries/employee-invitation.query.js +8 -0
  31. package/schemas/queries/employee.query.js +19 -0
  32. package/schemas/queries/index.js +4 -0
  33. package/schemas/queries/product-associations.query.js +1 -2
  34. package/schemas/queries/product-reviews.query.js +1 -2
  35. package/schemas/queries/profile.query.js +1 -1
  36. package/schemas/session.schema.js +1 -0
  37. package/src/capabilities/analytics.capability.d.ts +5 -5
  38. package/src/capabilities/company-registration.capability.d.ts +21 -0
  39. package/src/capabilities/company.capability.d.ts +85 -0
  40. package/src/capabilities/employee-invitation.capability.d.ts +34 -0
  41. package/src/capabilities/employee.capability.d.ts +14 -0
  42. package/src/capabilities/index.d.ts +4 -0
  43. package/src/capabilities/product-recommendations.capability.d.ts +8 -8
  44. package/src/client/client.d.ts +6 -1
  45. package/src/factories/company-registration.factory.d.ts +12 -0
  46. package/src/factories/company.factory.d.ts +18 -0
  47. package/src/factories/employee-invitation.factory.d.ts +26 -0
  48. package/src/factories/employee.factory.d.ts +20 -0
  49. package/src/factories/index.d.ts +4 -0
  50. package/src/schemas/models/base.model.d.ts +8 -0
  51. package/src/schemas/models/checkout.model.d.ts +4 -0
  52. package/src/schemas/models/company-registration.model.d.ts +22 -0
  53. package/src/schemas/models/company.model.d.ts +213 -0
  54. package/src/schemas/models/employee-invitation.model.d.ts +88 -0
  55. package/src/schemas/models/employee.model.d.ts +435 -0
  56. package/src/schemas/models/identifiers.model.d.ts +98 -1
  57. package/src/schemas/models/index.d.ts +4 -0
  58. package/src/schemas/mutations/company-registration.mutation.d.ts +26 -0
  59. package/src/schemas/mutations/company.mutation.d.ts +76 -0
  60. package/src/schemas/mutations/employee-invitation.mutation.d.ts +28 -0
  61. package/src/schemas/mutations/employee.mutation.d.ts +39 -0
  62. package/src/schemas/mutations/index.d.ts +4 -0
  63. package/src/schemas/queries/checkout.query.d.ts +15 -16
  64. package/src/schemas/queries/company-registration.query.d.ts +7 -0
  65. package/src/schemas/queries/company.query.d.ts +16 -0
  66. package/src/schemas/queries/employee-invitation.query.d.ts +14 -0
  67. package/src/schemas/queries/employee.query.d.ts +29 -0
  68. package/src/schemas/queries/index.d.ts +4 -0
  69. package/src/schemas/queries/product-reviews.query.d.ts +14 -15
  70. package/src/schemas/queries/profile.query.d.ts +5 -6
  71. package/src/schemas/session.schema.d.ts +1 -0
@@ -0,0 +1,76 @@
1
+ import type { InferType } from "../../zod-utils.js";
2
+ export declare const CompanyMutationAddShippingAddressSchema: import("zod").ZodObject<{
3
+ company: import("zod").ZodObject<{
4
+ taxIdentifier: import("zod").ZodString;
5
+ }, import("zod/v4/core").$loose>;
6
+ address: import("zod").ZodObject<{
7
+ identifier: import("zod").ZodDefault<import("zod").ZodObject<{
8
+ nickName: import("zod").ZodString;
9
+ }, import("zod/v4/core").$loose>>;
10
+ firstName: import("zod").ZodString;
11
+ lastName: import("zod").ZodString;
12
+ streetAddress: import("zod").ZodString;
13
+ streetNumber: import("zod").ZodString;
14
+ city: import("zod").ZodString;
15
+ region: import("zod").ZodString;
16
+ postalCode: import("zod").ZodString;
17
+ countryCode: import("zod").ZodString;
18
+ }, import("zod/v4/core").$loose>;
19
+ }, import("zod/v4/core").$loose>;
20
+ export declare const CompanyMutationRemoveShippingAddressSchema: import("zod").ZodObject<{
21
+ company: import("zod").ZodObject<{
22
+ taxIdentifier: import("zod").ZodString;
23
+ }, import("zod/v4/core").$loose>;
24
+ addressIdentifier: import("zod").ZodObject<{
25
+ nickName: import("zod").ZodString;
26
+ }, import("zod/v4/core").$loose>;
27
+ }, import("zod/v4/core").$loose>;
28
+ export declare const CompanyMutationUpdateShippingAddressSchema: import("zod").ZodObject<{
29
+ company: import("zod").ZodObject<{
30
+ taxIdentifier: import("zod").ZodString;
31
+ }, import("zod/v4/core").$loose>;
32
+ address: import("zod").ZodObject<{
33
+ identifier: import("zod").ZodDefault<import("zod").ZodObject<{
34
+ nickName: import("zod").ZodString;
35
+ }, import("zod/v4/core").$loose>>;
36
+ firstName: import("zod").ZodString;
37
+ lastName: import("zod").ZodString;
38
+ streetAddress: import("zod").ZodString;
39
+ streetNumber: import("zod").ZodString;
40
+ city: import("zod").ZodString;
41
+ region: import("zod").ZodString;
42
+ postalCode: import("zod").ZodString;
43
+ countryCode: import("zod").ZodString;
44
+ }, import("zod/v4/core").$loose>;
45
+ }, import("zod/v4/core").$loose>;
46
+ export declare const CompanyMutationMakeShippingAddressDefaultSchema: import("zod").ZodObject<{
47
+ company: import("zod").ZodObject<{
48
+ taxIdentifier: import("zod").ZodString;
49
+ }, import("zod/v4/core").$loose>;
50
+ addressIdentifier: import("zod").ZodObject<{
51
+ nickName: import("zod").ZodString;
52
+ }, import("zod/v4/core").$loose>;
53
+ }, import("zod/v4/core").$loose>;
54
+ export declare const CompanyMutationSetBillingAddressSchema: import("zod").ZodObject<{
55
+ company: import("zod").ZodObject<{
56
+ taxIdentifier: import("zod").ZodString;
57
+ }, import("zod/v4/core").$loose>;
58
+ address: import("zod").ZodObject<{
59
+ identifier: import("zod").ZodDefault<import("zod").ZodObject<{
60
+ nickName: import("zod").ZodString;
61
+ }, import("zod/v4/core").$loose>>;
62
+ firstName: import("zod").ZodString;
63
+ lastName: import("zod").ZodString;
64
+ streetAddress: import("zod").ZodString;
65
+ streetNumber: import("zod").ZodString;
66
+ city: import("zod").ZodString;
67
+ region: import("zod").ZodString;
68
+ postalCode: import("zod").ZodString;
69
+ countryCode: import("zod").ZodString;
70
+ }, import("zod/v4/core").$loose>;
71
+ }, import("zod/v4/core").$loose>;
72
+ export type CompanyMutationAddShippingAddress = InferType<typeof CompanyMutationAddShippingAddressSchema>;
73
+ export type CompanyMutationRemoveShippingAddress = InferType<typeof CompanyMutationRemoveShippingAddressSchema>;
74
+ export type CompanyMutationUpdateShippingAddress = InferType<typeof CompanyMutationUpdateShippingAddressSchema>;
75
+ export type CompanyMutationMakeShippingAddressDefault = InferType<typeof CompanyMutationMakeShippingAddressDefaultSchema>;
76
+ export type CompanyMutationSetBillingAddress = InferType<typeof CompanyMutationSetBillingAddressSchema>;
@@ -0,0 +1,28 @@
1
+ import * as z from "zod";
2
+ import type { InferType } from "../../zod-utils.js";
3
+ export declare const EmployeeInvitationMutationInviteEmployeeSchema: z.ZodObject<{
4
+ company: z.ZodObject<{
5
+ taxIdentifier: z.ZodString;
6
+ }, z.core.$loose>;
7
+ email: z.ZodEmail;
8
+ role: z.ZodEnum<{
9
+ admin: "admin";
10
+ manager: "manager";
11
+ employee: "employee";
12
+ }>;
13
+ }, z.core.$strip>;
14
+ export declare const EmployeeInvitationMutationAcceptInvitationSchema: z.ZodObject<{
15
+ invitationIdentifier: z.ZodObject<{
16
+ key: z.ZodString;
17
+ }, z.core.$loose>;
18
+ securityToken: z.ZodString;
19
+ currentUserEmail: z.ZodEmail;
20
+ }, z.core.$strip>;
21
+ export declare const EmployeeInvitationMutationRevokeInvitationSchema: z.ZodObject<{
22
+ invitationIdentifier: z.ZodObject<{
23
+ key: z.ZodString;
24
+ }, z.core.$loose>;
25
+ }, z.core.$strip>;
26
+ export type EmployeeInvitationMutationInviteEmployee = InferType<typeof EmployeeInvitationMutationInviteEmployeeSchema>;
27
+ export type EmployeeInvitationMutationAcceptInvitation = InferType<typeof EmployeeInvitationMutationAcceptInvitationSchema>;
28
+ export type EmployeeInvitationMutationRevokeInvitation = InferType<typeof EmployeeInvitationMutationRevokeInvitationSchema>;
@@ -0,0 +1,39 @@
1
+ import * as z from 'zod';
2
+ import type { InferType } from '../../zod-utils.js';
3
+ export declare const EmployeeMutationAssignRoleSchema: z.ZodObject<{
4
+ company: z.ZodObject<{
5
+ taxIdentifier: z.ZodString;
6
+ }, z.core.$loose>;
7
+ employeeIdentifier: z.ZodObject<{
8
+ userId: z.ZodString;
9
+ }, z.core.$loose>;
10
+ role: z.ZodEnum<{
11
+ admin: "admin";
12
+ manager: "manager";
13
+ employee: "employee";
14
+ }>;
15
+ }, z.core.$strip>;
16
+ export declare const EmployeeMutationUnassignRoleSchema: z.ZodObject<{
17
+ company: z.ZodObject<{
18
+ taxIdentifier: z.ZodString;
19
+ }, z.core.$loose>;
20
+ employeeIdentifier: z.ZodObject<{
21
+ userId: z.ZodString;
22
+ }, z.core.$loose>;
23
+ role: z.ZodEnum<{
24
+ admin: "admin";
25
+ manager: "manager";
26
+ employee: "employee";
27
+ }>;
28
+ }, z.core.$strip>;
29
+ export declare const EmployeeMutationRemoveEmployeeSchema: z.ZodObject<{
30
+ company: z.ZodObject<{
31
+ taxIdentifier: z.ZodString;
32
+ }, z.core.$loose>;
33
+ employeeIdentifier: z.ZodObject<{
34
+ userId: z.ZodString;
35
+ }, z.core.$loose>;
36
+ }, z.core.$strip>;
37
+ export type EmployeeMutationAssignRole = InferType<typeof EmployeeMutationAssignRoleSchema>;
38
+ export type EmployeeMutationUnassignRole = InferType<typeof EmployeeMutationUnassignRoleSchema>;
39
+ export type EmployeeMutationRemoveEmployee = InferType<typeof EmployeeMutationRemoveEmployeeSchema>;
@@ -9,3 +9,7 @@ export * from './product-reviews.mutation.js';
9
9
  export * from './profile.mutation.js';
10
10
  export * from './search.mutation.js';
11
11
  export * from './checkout.mutation.js';
12
+ export * from './company-registration.mutation.js';
13
+ export * from './employee.mutation.js';
14
+ export * from './employee-invitation.mutation.js';
15
+ export * from './company.mutation.js';
@@ -1,20 +1,19 @@
1
- import type * as z from 'zod';
2
1
  import type { InferType } from '../../zod-utils.js';
3
- export declare const CheckoutQueryByIdSchema: z.ZodObject<{
4
- identifier: z.ZodObject<{
5
- key: z.ZodString;
6
- }, z.core.$loose>;
7
- }, z.core.$loose>;
8
- export declare const CheckoutQueryForAvailableShippingMethodsSchema: z.ZodObject<{
9
- checkout: z.ZodObject<{
10
- key: z.ZodString;
11
- }, z.core.$loose>;
12
- }, z.core.$loose>;
13
- export declare const CheckoutQueryForAvailablePaymentMethodsSchema: z.ZodObject<{
14
- checkout: z.ZodObject<{
15
- key: z.ZodString;
16
- }, z.core.$loose>;
17
- }, z.core.$loose>;
2
+ export declare const CheckoutQueryByIdSchema: import("zod").ZodObject<{
3
+ identifier: import("zod").ZodObject<{
4
+ key: import("zod").ZodString;
5
+ }, import("zod/v4/core").$loose>;
6
+ }, import("zod/v4/core").$loose>;
7
+ export declare const CheckoutQueryForAvailableShippingMethodsSchema: import("zod").ZodObject<{
8
+ checkout: import("zod").ZodObject<{
9
+ key: import("zod").ZodString;
10
+ }, import("zod/v4/core").$loose>;
11
+ }, import("zod/v4/core").$loose>;
12
+ export declare const CheckoutQueryForAvailablePaymentMethodsSchema: import("zod").ZodObject<{
13
+ checkout: import("zod").ZodObject<{
14
+ key: import("zod").ZodString;
15
+ }, import("zod/v4/core").$loose>;
16
+ }, import("zod/v4/core").$loose>;
18
17
  export type CheckoutQueryForAvailableShippingMethods = InferType<typeof CheckoutQueryForAvailableShippingMethodsSchema>;
19
18
  export type CheckoutQueryForAvailablePaymentMethods = InferType<typeof CheckoutQueryForAvailablePaymentMethodsSchema>;
20
19
  export type CheckoutQueryById = InferType<typeof CheckoutQueryByIdSchema>;
@@ -0,0 +1,7 @@
1
+ import * as z from "zod";
2
+ export declare const CompanyRegistrationQueryCheckRegistrationStatusSchema: z.ZodObject<{
3
+ requestIdentifier: z.ZodObject<{
4
+ key: z.ZodString;
5
+ }, z.core.$loose>;
6
+ }, z.core.$strip>;
7
+ export type CompanyRegistrationQueryCheckRegistrationStatus = z.infer<typeof CompanyRegistrationQueryCheckRegistrationStatusSchema>;
@@ -0,0 +1,16 @@
1
+ import type { InferType } from '../../index.js';
2
+ export declare const CompanyQueryByIdSchema: import("zod").ZodObject<{
3
+ identifier: import("zod").ZodObject<{
4
+ taxIdentifier: import("zod").ZodString;
5
+ }, import("zod/v4/core").$loose>;
6
+ }, import("zod/v4/core").$loose>;
7
+ export declare const CompanyQueryListSchema: import("zod").ZodObject<{
8
+ search: import("zod").ZodObject<{
9
+ paginationOptions: import("zod").ZodObject<{
10
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
11
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
12
+ }, import("zod/v4/core").$loose>;
13
+ }, import("zod/v4/core").$loose>;
14
+ }, import("zod/v4/core").$loose>;
15
+ export type CompanyQueryById = InferType<typeof CompanyQueryByIdSchema>;
16
+ export type CompanyQueryList = InferType<typeof CompanyQueryListSchema>;
@@ -0,0 +1,14 @@
1
+ import type { InferType } from "../../zod-utils.js";
2
+ export declare const EmployeeInvitationQueryListSchema: import("zod").ZodObject<{
3
+ search: import("zod").ZodObject<{
4
+ company: import("zod").ZodOptional<import("zod").ZodObject<{
5
+ taxIdentifier: import("zod").ZodString;
6
+ }, import("zod/v4/core").$loose>>;
7
+ email: import("zod").ZodOptional<import("zod").ZodEmail>;
8
+ paginationOptions: import("zod").ZodObject<{
9
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
10
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
11
+ }, import("zod/v4/core").$loose>;
12
+ }, import("zod/v4/core").$loose>;
13
+ }, import("zod/v4/core").$loose>;
14
+ export type EmployeeInvitationQueryList = InferType<typeof EmployeeInvitationQueryListSchema>;
@@ -0,0 +1,29 @@
1
+ import * as z from 'zod';
2
+ import type { InferType } from '../../zod-utils.js';
3
+ export declare const EmployeeQueryListSchema: z.ZodObject<{
4
+ search: z.ZodObject<{
5
+ company: z.ZodObject<{
6
+ taxIdentifier: z.ZodString;
7
+ }, z.core.$loose>;
8
+ email: z.ZodOptional<z.ZodEmail>;
9
+ firstName: z.ZodOptional<z.ZodString>;
10
+ lastName: z.ZodOptional<z.ZodString>;
11
+ role: z.ZodOptional<z.ZodEnum<{
12
+ admin: "admin";
13
+ manager: "manager";
14
+ employee: "employee";
15
+ }>>;
16
+ paginationOptions: z.ZodObject<{
17
+ pageNumber: z.ZodDefault<z.ZodNumber>;
18
+ pageSize: z.ZodDefault<z.ZodNumber>;
19
+ }, z.core.$loose>;
20
+ }, z.core.$loose>;
21
+ }, z.core.$loose>;
22
+ export declare const EmployeeQueryByEmailSchema: z.ZodObject<{
23
+ company: z.ZodObject<{
24
+ taxIdentifier: z.ZodString;
25
+ }, z.core.$loose>;
26
+ email: z.ZodEmail;
27
+ }, z.core.$loose>;
28
+ export type EmployeeQueryList = InferType<typeof EmployeeQueryListSchema>;
29
+ export type EmployeeQueryByEmail = InferType<typeof EmployeeQueryByEmailSchema>;
@@ -16,3 +16,7 @@ export * from './order-search.query.js';
16
16
  export * from './product-recommendations.query.js';
17
17
  export * from './product-associations.query.js';
18
18
  export * from './product-list.query.js';
19
+ export * from './company-registration.query.js';
20
+ export * from './employee.query.js';
21
+ export * from './employee-invitation.query.js';
22
+ export * from './company.query.js';
@@ -1,18 +1,17 @@
1
- import * as z from 'zod';
2
1
  import type { InferType } from '../../zod-utils.js';
3
- export declare const ProductReviewsListQuerySchema: z.ZodObject<{
4
- product: z.ZodObject<{
5
- key: z.ZodString;
6
- }, z.core.$loose>;
7
- paginationOptions: z.ZodOptional<z.ZodObject<{
8
- pageNumber: z.ZodDefault<z.ZodNumber>;
9
- pageSize: z.ZodDefault<z.ZodNumber>;
10
- }, z.core.$loose>>;
11
- }, z.core.$loose>;
12
- export declare const ProductReviewsGetRatingSummaryQuerySchema: z.ZodObject<{
13
- product: z.ZodObject<{
14
- key: z.ZodString;
15
- }, z.core.$loose>;
16
- }, z.core.$loose>;
2
+ export declare const ProductReviewsListQuerySchema: import("zod").ZodObject<{
3
+ product: import("zod").ZodObject<{
4
+ key: import("zod").ZodString;
5
+ }, import("zod/v4/core").$loose>;
6
+ paginationOptions: import("zod").ZodOptional<import("zod").ZodObject<{
7
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
8
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
9
+ }, import("zod/v4/core").$loose>>;
10
+ }, import("zod/v4/core").$loose>;
11
+ export declare const ProductReviewsGetRatingSummaryQuerySchema: import("zod").ZodObject<{
12
+ product: import("zod").ZodObject<{
13
+ key: import("zod").ZodString;
14
+ }, import("zod/v4/core").$loose>;
15
+ }, import("zod/v4/core").$loose>;
17
16
  export type ProductReviewsListQuery = InferType<typeof ProductReviewsListQuerySchema>;
18
17
  export type ProductReviewsGetRatingSummaryQuery = InferType<typeof ProductReviewsGetRatingSummaryQuerySchema>;
@@ -1,8 +1,7 @@
1
- import type * as z from 'zod';
2
1
  import type { InferType } from '../../zod-utils.js';
3
- export declare const ProfileQueryByIdSchema: z.ZodObject<{
4
- identifier: z.ZodObject<{
5
- userId: z.ZodString;
6
- }, z.core.$loose>;
7
- }, z.core.$loose>;
2
+ export declare const ProfileQueryByIdSchema: import("zod").ZodObject<{
3
+ identifier: import("zod").ZodObject<{
4
+ userId: import("zod").ZodString;
5
+ }, import("zod/v4/core").$loose>;
6
+ }, import("zod/v4/core").$loose>;
8
7
  export type ProfileQuerySelf = InferType<typeof ProfileQueryByIdSchema>;
@@ -445,6 +445,7 @@ export declare const RequestContextSchema: z.ZodObject<{
445
445
  countyCode: z.ZodDefault<z.ZodString>;
446
446
  cityCode: z.ZodDefault<z.ZodString>;
447
447
  }, z.core.$strip>>;
448
+ companyIdentifier: z.ZodOptional<z.ZodString>;
448
449
  correlationId: z.ZodDefault<z.ZodString>;
449
450
  isBot: z.ZodDefault<z.ZodBoolean>;
450
451
  clientIp: z.ZodDefault<z.ZodString>;