@endora-commerce/contracts 0.109.0 → 0.110.0
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/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-contributions.d.ts +62 -7
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +27 -8
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +77 -4
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +79 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +26 -0
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +6 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +382 -22
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +199 -17
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +394 -36
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +131 -8
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +351 -219
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +209 -157
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +41 -16
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm.d.ts +79 -49
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +6 -0
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +27 -13
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +15 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +186 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +39 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +12 -12
- package/dist/errors.d.ts +119 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +146 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +4 -0
- package/dist/invoices.js.map +1 -1
- package/dist/mfa.d.ts +124 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +46 -0
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +36 -4
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +68 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +105 -12
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +60 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/price-books.d.ts +67 -63
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +8 -8
- package/dist/product-feeds.d.ts +94 -94
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +5 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +182 -64
- package/dist/product-scopes.d.ts.map +1 -1
- package/dist/product-scopes.js +89 -18
- package/dist/product-scopes.js.map +1 -1
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.d.ts.map +1 -1
- package/dist/product-url-keys.js +73 -39
- package/dist/product-url-keys.js.map +1 -1
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +15 -0
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +6 -0
- package/dist/projects.js.map +1 -1
- package/dist/promotions.d.ts +10 -10
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -6
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +75 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +63 -12
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +42 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts.map +1 -1
- package/dist/record-references.js +2 -3
- package/dist/record-references.js.map +1 -1
- package/dist/record-rich-text.d.ts.map +1 -1
- package/dist/record-rich-text.js +2 -1
- package/dist/record-rich-text.js.map +1 -1
- package/dist/returns.d.ts +208 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +14 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +18 -16
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +81 -28
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +8 -1
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +129 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +36 -0
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +12 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +6 -6
- package/dist/transactional-emails.d.ts +9 -9
- package/package.json +2 -2
- package/dist/scoped-translations.d.ts +0 -48
- package/dist/scoped-translations.d.ts.map +0 -1
- package/dist/scoped-translations.js +0 -78
- package/dist/scoped-translations.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-registry-lookup.d.ts","sourceRoot":"","sources":["../src/organization-registry-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,mLA6B5B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,aAA0C,CAAC;AAI9E,eAAO,MAAM,iCAAiC;;;;;;;iBAQ5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAI5F,eAAO,MAAM,2BAA2B;;;iBAQtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB,yFAM3B,CAAC;AACX,eAAO,MAAM,0BAA0B;;;;;;EAAmC,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;;;EAA4D,CAAC;AACjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,4BAA4B;;;;EAA0C,CAAC;AACpF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,oDAAoD;AACpD,eAAO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,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,0BAA0B,8DAA+D,CAAC;AACvG,eAAO,MAAM,wBAAwB;;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;EAAqD,CAAC;AAC9F,eAAO,MAAM,0BAA0B;;;;;EAA4D,CAAC;AAEpG,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAC;AAEH,wFAAwF;AACxF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBlD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { isoDateTimeSchema } from './common.js';
|
|
3
|
+
/**
|
|
4
|
+
* Feature 173 — the company registry lookup at storefront registration
|
|
5
|
+
* (`specs/173-registration-registry-lookup/contracts/public-api.md`,
|
|
6
|
+
* `contracts/admin-surfaces.md` §6, data-model §6). Owner: `organizations`.
|
|
7
|
+
*
|
|
8
|
+
* A buyer registering a business types a Polish NIP or an EU VAT number; the
|
|
9
|
+
* platform answers what the public registry (GUS REGON, the Ministry of Finance
|
|
10
|
+
* VAT White List, VIES) knows about the company, and the registration later
|
|
11
|
+
* carries the `lookupId` back so the snapshot the buyer was shown is persisted
|
|
12
|
+
* from the platform's own store — never from anything the client sends.
|
|
13
|
+
*
|
|
14
|
+
* Every status, VAT status, activity status and source is a **machine token**:
|
|
15
|
+
* the storefront and the admin translate them (research R-18).
|
|
16
|
+
*
|
|
17
|
+
* This file imports nothing from `organizations.ts` at run time: that file
|
|
18
|
+
* imports {@link registryLookupIdSchema} from here for the register body.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* The countries the lookup serves: Poland (GUS / White List) and the VIES
|
|
22
|
+
* member states. VIES spells Greece `EL` and Northern Ireland `XI`; the form's
|
|
23
|
+
* country picker sends ISO `GR`, which the backend normaliser maps to `EL`.
|
|
24
|
+
*/
|
|
25
|
+
export const REGISTRY_LOOKUP_COUNTRIES = [
|
|
26
|
+
'PL',
|
|
27
|
+
'AT',
|
|
28
|
+
'BE',
|
|
29
|
+
'BG',
|
|
30
|
+
'CY',
|
|
31
|
+
'CZ',
|
|
32
|
+
'DE',
|
|
33
|
+
'DK',
|
|
34
|
+
'EE',
|
|
35
|
+
'EL',
|
|
36
|
+
'ES',
|
|
37
|
+
'FI',
|
|
38
|
+
'FR',
|
|
39
|
+
'HR',
|
|
40
|
+
'HU',
|
|
41
|
+
'IE',
|
|
42
|
+
'IT',
|
|
43
|
+
'LT',
|
|
44
|
+
'LU',
|
|
45
|
+
'LV',
|
|
46
|
+
'MT',
|
|
47
|
+
'NL',
|
|
48
|
+
'PT',
|
|
49
|
+
'RO',
|
|
50
|
+
'SE',
|
|
51
|
+
'SI',
|
|
52
|
+
'SK',
|
|
53
|
+
'XI',
|
|
54
|
+
];
|
|
55
|
+
/**
|
|
56
|
+
* The picker form of a lookup country: `GR` for Greece, every other code as it
|
|
57
|
+
* is. What `registration-options` lists and what a lookup answer's `country`
|
|
58
|
+
* carries, so a client can select it in an ISO country picker.
|
|
59
|
+
*/
|
|
60
|
+
export function registryLookupCountryForPicker(country) {
|
|
61
|
+
return country === 'EL' ? 'GR' : country;
|
|
62
|
+
}
|
|
63
|
+
/** The lookup reference: 32 random bytes, base64url, no padding. */
|
|
64
|
+
export const registryLookupIdSchema = z.string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
65
|
+
// --- GET /api/v1/organizations/registration-options --------------------------
|
|
66
|
+
export const registrationOptionsResponseSchema = z.object({
|
|
67
|
+
data: z.object({
|
|
68
|
+
registryLookup: z.object({
|
|
69
|
+
enabled: z.boolean(),
|
|
70
|
+
/** Countries the lookup serves; `[]` when disabled. Picker form (GR, not EL). */
|
|
71
|
+
countries: z.array(z.string().length(2)),
|
|
72
|
+
}),
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
// --- POST /api/v1/organizations/registry-lookup ------------------------------
|
|
76
|
+
export const registryLookupRequestSchema = z.object({
|
|
77
|
+
/** As typed: spaces, dashes, dots and an EU prefix are accepted. */
|
|
78
|
+
taxId: z.string().trim().min(1).max(32),
|
|
79
|
+
/** The country chosen in the form; an EU prefix in `taxId` overrides it. */
|
|
80
|
+
country: z
|
|
81
|
+
.string()
|
|
82
|
+
.length(2)
|
|
83
|
+
.transform((c) => c.toUpperCase()),
|
|
84
|
+
});
|
|
85
|
+
export const REGISTRY_LOOKUP_STATUSES = [
|
|
86
|
+
'found',
|
|
87
|
+
'not_found',
|
|
88
|
+
'unavailable',
|
|
89
|
+
'invalid_tax_id',
|
|
90
|
+
'unsupported_country',
|
|
91
|
+
];
|
|
92
|
+
export const registryLookupStatusSchema = z.enum(REGISTRY_LOOKUP_STATUSES);
|
|
93
|
+
export const registryVatStatusSchema = z.enum(['active', 'exempt', 'not_registered', 'unknown']);
|
|
94
|
+
export const registryActivityStatusSchema = z.enum(['active', 'ceased', 'unknown']);
|
|
95
|
+
/** The registry a found answer's data came from. */
|
|
96
|
+
export const registrySourceSchema = z.enum(['gus', 'mf', 'vies']);
|
|
97
|
+
export const registryLookupCompanySchema = z.object({
|
|
98
|
+
legalName: z.string().nullable(),
|
|
99
|
+
/** Field names match `registerOrganizationRequestSchema.organization.registeredAddress`. */
|
|
100
|
+
registeredAddress: z.object({
|
|
101
|
+
street: z.string().nullable(),
|
|
102
|
+
postalCode: z.string().nullable(),
|
|
103
|
+
city: z.string().nullable(),
|
|
104
|
+
country: z.string().length(2),
|
|
105
|
+
}),
|
|
106
|
+
regon: z.string().nullable(),
|
|
107
|
+
vatStatus: registryVatStatusSchema,
|
|
108
|
+
activityStatus: registryActivityStatusSchema,
|
|
109
|
+
});
|
|
110
|
+
export const registryLookupResponseSchema = z.object({
|
|
111
|
+
data: z.object({
|
|
112
|
+
status: registryLookupStatusSchema,
|
|
113
|
+
/** Present for found / not_found / unavailable; send it back on registration. */
|
|
114
|
+
lookupId: registryLookupIdSchema.nullable(),
|
|
115
|
+
/** The normalised identifier the lookup used, e.g. "5260250995"; null when invalid. */
|
|
116
|
+
normalizedTaxId: z.string().nullable(),
|
|
117
|
+
/** The country the lookup used (an EU prefix may have changed it). Picker form: GR, not EL. */
|
|
118
|
+
country: z.string().length(2),
|
|
119
|
+
/** The registry the company data came from; null unless found. */
|
|
120
|
+
source: registrySourceSchema.nullable(),
|
|
121
|
+
company: registryLookupCompanySchema.nullable(),
|
|
122
|
+
fetchedAt: isoDateTimeSchema.nullable(),
|
|
123
|
+
}),
|
|
124
|
+
});
|
|
125
|
+
// --- Admin: GET /api/v1/admin/organizations/:id/vat-validations item ---------
|
|
126
|
+
/** The Polish-sources mode a lookup ran under (owner decision OD-5). */
|
|
127
|
+
export const REGISTRY_LOOKUP_PL_SOURCES = ['gus_mf', 'gus', 'mf'];
|
|
128
|
+
export const registryPlSourcesSchema = z.enum(REGISTRY_LOOKUP_PL_SOURCES);
|
|
129
|
+
export const registryProviderSchema = z.enum(['gus_pl', 'mf_pl', 'vies']);
|
|
130
|
+
export const registryAttemptSchema = z.object({
|
|
131
|
+
provider: registryProviderSchema,
|
|
132
|
+
outcome: z.enum(['found', 'not_found', 'unavailable', 'skipped']),
|
|
133
|
+
/** 'not_configured', 'excluded_by_setting', 'budget_exhausted', 'network_timeout', … */
|
|
134
|
+
errorKind: z.string().nullable(),
|
|
135
|
+
durationMs: z.number().int().nonnegative().nullable(),
|
|
136
|
+
});
|
|
137
|
+
/** What the registry said at registration, beside the existing validation columns (data-model §1.1). */
|
|
138
|
+
export const registryDetailsSchema = z.object({
|
|
139
|
+
/** The Polish-sources mode the lookup ran under; null for a non-Polish lookup (always VIES). */
|
|
140
|
+
plSources: registryPlSourcesSchema.nullable(),
|
|
141
|
+
dataSource: registryProviderSchema.nullable(),
|
|
142
|
+
vatStatusSource: z.enum(['mf_pl', 'vies']).nullable(),
|
|
143
|
+
regon: z.string().nullable(),
|
|
144
|
+
vatPayerStatus: registryVatStatusSchema,
|
|
145
|
+
activityStatus: registryActivityStatusSchema,
|
|
146
|
+
/** When the registries answered — may precede the row's `createdAt` by up to the ticket TTL. */
|
|
147
|
+
fetchedAt: isoDateTimeSchema,
|
|
148
|
+
/** Whether the answer was served from the platform's cache. */
|
|
149
|
+
fromCache: z.boolean(),
|
|
150
|
+
attempts: z.array(registryAttemptSchema),
|
|
151
|
+
});
|
|
152
|
+
/** What the registrant submitted, captured at registration (data-model §1.2). No personal data. */
|
|
153
|
+
export const submittedCompanyValuesSchema = z.object({
|
|
154
|
+
name: z.string(),
|
|
155
|
+
taxId: z.string(),
|
|
156
|
+
registeredAddress: z.object({
|
|
157
|
+
street: z.string(),
|
|
158
|
+
postalCode: z.string(),
|
|
159
|
+
city: z.string(),
|
|
160
|
+
country: z.string(),
|
|
161
|
+
}),
|
|
162
|
+
});
|
|
163
|
+
export const REGISTRY_DIVERGENCE_FIELDS = ['name', 'street', 'postalCode', 'city', 'country'];
|
|
164
|
+
export const registryDivergenceSchema = z.object({
|
|
165
|
+
field: z.enum(REGISTRY_DIVERGENCE_FIELDS),
|
|
166
|
+
registry: z.string(),
|
|
167
|
+
submitted: z.string(),
|
|
168
|
+
});
|
|
169
|
+
export const vatValidationProviderSchema = z.enum(['vies', 'mf_pl', 'format_only', 'gus_pl']);
|
|
170
|
+
export const vatValidationOutcomeSchema = z.enum(['validated', 'failed', 'deferred', 'unverified']);
|
|
171
|
+
export const vatReturnedAddressSchema = z.object({
|
|
172
|
+
line1: z.string().nullable().optional(),
|
|
173
|
+
line2: z.string().nullable().optional(),
|
|
174
|
+
postalCode: z.string().nullable().optional(),
|
|
175
|
+
city: z.string().nullable().optional(),
|
|
176
|
+
countryCode: z.string().nullable().optional(),
|
|
177
|
+
});
|
|
178
|
+
/** One row of an Organization's VAT validation history, as the admin API answers it. */
|
|
179
|
+
export const organizationTaxIdValidationRecordSchema = z.object({
|
|
180
|
+
id: z.string().uuid(),
|
|
181
|
+
provider: vatValidationProviderSchema,
|
|
182
|
+
outcome: vatValidationOutcomeSchema,
|
|
183
|
+
taxIdValue: z.string(),
|
|
184
|
+
legalNameReturned: z.string().nullable(),
|
|
185
|
+
addressReturned: vatReturnedAddressSchema.nullable(),
|
|
186
|
+
errorKind: z.string().nullable(),
|
|
187
|
+
requestedByAdminUserId: z.string().nullable(),
|
|
188
|
+
createdAt: isoDateTimeSchema,
|
|
189
|
+
/** `admin` — an administrator's "Validate now"; `registration` — the lookup a self-registration carried. */
|
|
190
|
+
origin: z.enum(['admin', 'registration']),
|
|
191
|
+
registryDetails: registryDetailsSchema.nullable(),
|
|
192
|
+
submittedValues: submittedCompanyValuesSchema.nullable(),
|
|
193
|
+
/** Computed on read; `null` for an admin row, `[]` for a registration row that matches. */
|
|
194
|
+
divergence: z.array(registryDivergenceSchema).nullable(),
|
|
195
|
+
});
|
|
196
|
+
//# sourceMappingURL=organization-registry-lookup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-registry-lookup.js","sourceRoot":"","sources":["../src/organization-registry-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;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AAE;IAC7C,SAAS,EAAE,iBAAiB;IAC5B,4GAA4G;IAC5G,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACzC,eAAe,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACjD,eAAe,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACxD,2FAA2F;IAC3F,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Actor } from './actor.js';
|
|
3
|
+
/**
|
|
4
|
+
* Organization roles and organization permissions — the buyer's side of
|
|
5
|
+
* "who may do what" (`specs/170-organization-roles/`).
|
|
6
|
+
*
|
|
7
|
+
* An Organization holds two predefined roles — *Administrator* (every present
|
|
8
|
+
* permission, immutable) and *Member* (editable) — and up to fifty custom ones.
|
|
9
|
+
* Each member holds exactly one. A role is a set of **organization permission**
|
|
10
|
+
* codes (`<module>.<action>`), declared by the module whose buyer action each
|
|
11
|
+
* gates in its manifest's `organizationPermissions` field (`./modules.ts`).
|
|
12
|
+
* The operator vocabulary (`<area>:<action>`, `/admin-roles`) is a different
|
|
13
|
+
* one and the two never meet (FR-020, research R-2).
|
|
14
|
+
*
|
|
15
|
+
* Normative: `specs/170-organization-roles/contracts/organization-permission-port.md`
|
|
16
|
+
* and `contracts/storefront-api.md` §2. They replaced the legacy two-value role
|
|
17
|
+
* enum, removed with its columns by the feature's legacy-removal package
|
|
18
|
+
* (research R-23).
|
|
19
|
+
*/
|
|
20
|
+
export declare const organizationRoleKindSchema: z.ZodEnum<{
|
|
21
|
+
custom: "custom";
|
|
22
|
+
administrator: "administrator";
|
|
23
|
+
member: "member";
|
|
24
|
+
}>;
|
|
25
|
+
export type OrganizationRoleKind = z.infer<typeof organizationRoleKindSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* The role as every response shows it (FR-008, FR-056, FR-073). `name` is the
|
|
28
|
+
* translated label for `administrator` / `member` in the response language and
|
|
29
|
+
* the stored name for `custom`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const organizationRoleRefSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
kind: z.ZodEnum<{
|
|
35
|
+
custom: "custom";
|
|
36
|
+
administrator: "administrator";
|
|
37
|
+
member: "member";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export type OrganizationRoleRef = z.infer<typeof organizationRoleRefSchema>;
|
|
41
|
+
/**
|
|
42
|
+
* One role on the role-management screens, storefront and Admin UI alike
|
|
43
|
+
* (`contracts/storefront-api.md` §2). `permissions` are the stored grants of
|
|
44
|
+
* **present** codes only — a grant of a switched-off module's code is kept
|
|
45
|
+
* server-side and never round-trips through the editor (FR-025); for the
|
|
46
|
+
* administrator it is every present code. `pendingInvitationCount` counts
|
|
47
|
+
* invitations neither accepted, revoked nor expired (FR-010a).
|
|
48
|
+
*/
|
|
49
|
+
export declare const organizationRoleViewSchema: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
kind: z.ZodEnum<{
|
|
52
|
+
custom: "custom";
|
|
53
|
+
administrator: "administrator";
|
|
54
|
+
member: "member";
|
|
55
|
+
}>;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
description: z.ZodNullable<z.ZodString>;
|
|
58
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
59
|
+
memberCount: z.ZodNumber;
|
|
60
|
+
pendingInvitationCount: z.ZodNumber;
|
|
61
|
+
version: z.ZodNumber;
|
|
62
|
+
updatedAt: z.ZodString;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type OrganizationRoleView = z.infer<typeof organizationRoleViewSchema>;
|
|
65
|
+
export declare const organizationRoleListResponseSchema: z.ZodObject<{
|
|
66
|
+
data: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
kind: z.ZodEnum<{
|
|
69
|
+
custom: "custom";
|
|
70
|
+
administrator: "administrator";
|
|
71
|
+
member: "member";
|
|
72
|
+
}>;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
description: z.ZodNullable<z.ZodString>;
|
|
75
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
76
|
+
memberCount: z.ZodNumber;
|
|
77
|
+
pendingInvitationCount: z.ZodNumber;
|
|
78
|
+
version: z.ZodNumber;
|
|
79
|
+
updatedAt: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type OrganizationRoleListResponse = z.infer<typeof organizationRoleListResponseSchema>;
|
|
83
|
+
export declare const organizationRoleResponseSchema: z.ZodObject<{
|
|
84
|
+
data: z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
custom: "custom";
|
|
88
|
+
administrator: "administrator";
|
|
89
|
+
member: "member";
|
|
90
|
+
}>;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
description: z.ZodNullable<z.ZodString>;
|
|
93
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
94
|
+
memberCount: z.ZodNumber;
|
|
95
|
+
pendingInvitationCount: z.ZodNumber;
|
|
96
|
+
version: z.ZodNumber;
|
|
97
|
+
updatedAt: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type OrganizationRoleResponse = z.infer<typeof organizationRoleResponseSchema>;
|
|
101
|
+
/** One grantable code, translated in the request language (R-31). */
|
|
102
|
+
export declare const organizationPermissionCatalogueEntrySchema: z.ZodObject<{
|
|
103
|
+
code: z.ZodString;
|
|
104
|
+
label: z.ZodString;
|
|
105
|
+
description: z.ZodString;
|
|
106
|
+
memberDefault: z.ZodBoolean;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type OrganizationPermissionCatalogueEntry = z.infer<typeof organizationPermissionCatalogueEntrySchema>;
|
|
109
|
+
/** `GET …/permission-catalogue` — present codes only, grouped by declaring module. */
|
|
110
|
+
export declare const organizationPermissionCatalogueResponseSchema: z.ZodObject<{
|
|
111
|
+
data: z.ZodObject<{
|
|
112
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
113
|
+
moduleId: z.ZodString;
|
|
114
|
+
moduleLabel: z.ZodString;
|
|
115
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
116
|
+
code: z.ZodString;
|
|
117
|
+
label: z.ZodString;
|
|
118
|
+
description: z.ZodString;
|
|
119
|
+
memberDefault: z.ZodBoolean;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type OrganizationPermissionCatalogueResponse = z.infer<typeof organizationPermissionCatalogueResponseSchema>;
|
|
125
|
+
/** `GET /api/v1/organizations/mine/role` — the member's own role (FR-058). */
|
|
126
|
+
export declare const organizationOwnRoleResponseSchema: z.ZodObject<{
|
|
127
|
+
data: z.ZodObject<{
|
|
128
|
+
role: z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
kind: z.ZodEnum<{
|
|
132
|
+
custom: "custom";
|
|
133
|
+
administrator: "administrator";
|
|
134
|
+
member: "member";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
138
|
+
code: z.ZodString;
|
|
139
|
+
label: z.ZodString;
|
|
140
|
+
description: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type OrganizationOwnRoleResponse = z.infer<typeof organizationOwnRoleResponseSchema>;
|
|
145
|
+
/** `DELETE …/roles/:id` — what moved to the replacement role (FR-024). */
|
|
146
|
+
export declare const deleteOrganizationRoleResponseSchema: z.ZodObject<{
|
|
147
|
+
data: z.ZodObject<{
|
|
148
|
+
reassignedMembers: z.ZodNumber;
|
|
149
|
+
reassignedInvitations: z.ZodNumber;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type DeleteOrganizationRoleResponse = z.infer<typeof deleteOrganizationRoleResponseSchema>;
|
|
153
|
+
/** `POST …/roles` — a custom role. */
|
|
154
|
+
export declare const createOrganizationRoleRequestSchema: z.ZodObject<{
|
|
155
|
+
name: z.ZodString;
|
|
156
|
+
description: z.ZodOptional<z.ZodString>;
|
|
157
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
export type CreateOrganizationRoleRequest = z.infer<typeof createOrganizationRoleRequestSchema>;
|
|
160
|
+
/**
|
|
161
|
+
* `PATCH …/roles/:id`. `expectedVersion` is the version the editor read
|
|
162
|
+
* (`ORGANIZATION_ROLE_STALE` on mismatch, R-29); `name` and `description` are
|
|
163
|
+
* refused for the *Member* role by the Command, not by the schema.
|
|
164
|
+
*/
|
|
165
|
+
export declare const updateOrganizationRoleRequestSchema: z.ZodObject<{
|
|
166
|
+
expectedVersion: z.ZodNumber;
|
|
167
|
+
name: z.ZodOptional<z.ZodString>;
|
|
168
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
export type UpdateOrganizationRoleRequest = z.infer<typeof updateOrganizationRoleRequestSchema>;
|
|
172
|
+
/** `DELETE …/roles/:id`. A held role needs a replacement (FR-024). */
|
|
173
|
+
export declare const deleteOrganizationRoleRequestSchema: z.ZodObject<{
|
|
174
|
+
expectedVersion: z.ZodNumber;
|
|
175
|
+
replacementRoleId: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strict>;
|
|
177
|
+
export type DeleteOrganizationRoleRequest = z.infer<typeof deleteOrganizationRoleRequestSchema>;
|
|
178
|
+
/**
|
|
179
|
+
* `PATCH /api/v1/organizations/mine/members/:id/role` — replaces the legacy
|
|
180
|
+
* `changeMemberRoleRequestSchema` (`{ role }`).
|
|
181
|
+
*/
|
|
182
|
+
export declare const assignMemberRoleRequestSchema: z.ZodObject<{
|
|
183
|
+
roleId: z.ZodString;
|
|
184
|
+
}, z.core.$strict>;
|
|
185
|
+
export type AssignMemberRoleRequest = z.infer<typeof assignMemberRoleRequestSchema>;
|
|
186
|
+
/**
|
|
187
|
+
* Inviting a member, on the storefront and in the Admin UI
|
|
188
|
+
* (`POST …/mine/invitations`, `POST /api/v1/admin/organizations/:id/members/invite`)
|
|
189
|
+
* — replaces the legacy `inviteMemberRequestSchema` (`{ email, role? }`). An
|
|
190
|
+
* absent `roleId` is the Organization's *Member* role, resolved server-side.
|
|
191
|
+
*/
|
|
192
|
+
export declare const inviteMemberToRoleRequestSchema: z.ZodObject<{
|
|
193
|
+
email: z.ZodString;
|
|
194
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
export type InviteMemberToRoleRequest = z.infer<typeof inviteMemberToRoleRequestSchema>;
|
|
197
|
+
/**
|
|
198
|
+
* Platform admin — `POST /api/v1/admin/organizations/:id/members` (direct
|
|
199
|
+
* create). Replaces the legacy `adminDirectMemberRequestSchema`'s `role?`.
|
|
200
|
+
*/
|
|
201
|
+
export declare const adminDirectMemberToRoleRequestSchema: z.ZodObject<{
|
|
202
|
+
email: z.ZodString;
|
|
203
|
+
firstName: z.ZodString;
|
|
204
|
+
lastName: z.ZodString;
|
|
205
|
+
password: z.ZodString;
|
|
206
|
+
roleId: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
export type AdminDirectMemberToRoleRequest = z.infer<typeof adminDirectMemberToRoleRequestSchema>;
|
|
209
|
+
/**
|
|
210
|
+
* Platform admin — `PATCH /api/v1/admin/organizations/:id/members/:customerAccountId/role`.
|
|
211
|
+
* Replaces the legacy `adminPatchMemberRoleRequestSchema` (`{ role, expectedUpdatedAt? }`).
|
|
212
|
+
*/
|
|
213
|
+
export declare const adminAssignMemberRoleRequestSchema: z.ZodObject<{
|
|
214
|
+
roleId: z.ZodString;
|
|
215
|
+
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
export type AdminAssignMemberRoleRequest = z.infer<typeof adminAssignMemberRoleRequestSchema>;
|
|
218
|
+
/** Who is being judged. `organizationRoleId` is the actor's when known (R-15). */
|
|
219
|
+
export interface OrganizationPermissionSubject {
|
|
220
|
+
readonly customerAccountId: string;
|
|
221
|
+
readonly organizationId: string;
|
|
222
|
+
readonly organizationRoleId?: string | null;
|
|
223
|
+
}
|
|
224
|
+
export interface OrganizationEffectivePermissions {
|
|
225
|
+
readonly role: {
|
|
226
|
+
readonly id: string;
|
|
227
|
+
readonly kind: OrganizationRoleKind;
|
|
228
|
+
};
|
|
229
|
+
/** Sorted; present codes only (FR-007). */
|
|
230
|
+
readonly permissions: readonly string[];
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Container name: `organizationPermissionPort`. Owner: `organizations`.
|
|
234
|
+
*
|
|
235
|
+
* Reached with `lazyPort<OrganizationPermissionPort>(ctx, 'organizationPermissionPort')`
|
|
236
|
+
* and never captured into a singleton. A subject whose role cannot be found in
|
|
237
|
+
* its Organization fails **closed**: `can` and `isAdministrator` answer `false`,
|
|
238
|
+
* `effective` an empty set. A code outside the vocabulary is a programming
|
|
239
|
+
* error: `can` answers `false`, `assert` throws `500 INTERNAL` (the permission
|
|
240
|
+
* inventory refuses such a call statically as well).
|
|
241
|
+
*/
|
|
242
|
+
export interface OrganizationPermissionPort {
|
|
243
|
+
can(subject: OrganizationPermissionSubject, code: string): Promise<boolean>;
|
|
244
|
+
/**
|
|
245
|
+
* Throws `403 ORGANIZATION_PERMISSION_REQUIRED` with
|
|
246
|
+
* `details: { permission, permissionLabel }`. `language` selects the label.
|
|
247
|
+
*/
|
|
248
|
+
assert(subject: OrganizationPermissionSubject, code: string, options?: {
|
|
249
|
+
language?: string;
|
|
250
|
+
}): Promise<void>;
|
|
251
|
+
isAdministrator(subject: OrganizationPermissionSubject): Promise<boolean>;
|
|
252
|
+
effective(subject: OrganizationPermissionSubject): Promise<OrganizationEffectivePermissions>;
|
|
253
|
+
/** Role ids of `organizationId` whose effective set holds `code` — administrator included. */
|
|
254
|
+
rolesHolding(organizationId: string, code: string): Promise<readonly string[]>;
|
|
255
|
+
}
|
|
256
|
+
/** Container name: `organizationRoleReadPort`. Owner: `organizations`. */
|
|
257
|
+
export interface OrganizationRoleReadPort {
|
|
258
|
+
/**
|
|
259
|
+
* The id of the Organization's predefined role of `kind`, read through the
|
|
260
|
+
* role cache from **committed** rows. A caller that has just created the
|
|
261
|
+
* Organization in its own open transaction takes the id from the provisioning
|
|
262
|
+
* answer instead (research R-34).
|
|
263
|
+
*/
|
|
264
|
+
predefinedRoleId(organizationId: string, kind: 'administrator' | 'member'): Promise<string>;
|
|
265
|
+
/**
|
|
266
|
+
* The role `roleId` **of `organizationId`**, or `null` when that Organization
|
|
267
|
+
* has no such role — another Organization's role id included (FR-005). Read
|
|
268
|
+
* through the role cache from committed rows, like {@link predefinedRoleId}.
|
|
269
|
+
* `name` is `null` for the two predefined roles, whose label is translated
|
|
270
|
+
* (FR-003). Added for `customer_account.change_role` (WP-02b), which assigns a
|
|
271
|
+
* role the caller named and must refuse one it cannot see.
|
|
272
|
+
*/
|
|
273
|
+
findRole(organizationId: string, roleId: string): Promise<OrganizationRoleSummary | null>;
|
|
274
|
+
/**
|
|
275
|
+
* The role `roleId` **of `organizationId`** as every response names it
|
|
276
|
+
* (FR-008, FR-056): a predefined role's label translated into `language`
|
|
277
|
+
* (English when absent or unsupported), a custom role's own name verbatim;
|
|
278
|
+
* `null` when that Organization has no such role (FR-005). Read through the
|
|
279
|
+
* role cache like {@link findRole}. Added for the session views and the
|
|
280
|
+
* operator's impersonation answer (WP-03), which other modules serve.
|
|
281
|
+
*/
|
|
282
|
+
roleRef(organizationId: string, roleId: string, language?: string): Promise<OrganizationRoleRef | null>;
|
|
283
|
+
}
|
|
284
|
+
/** A role as {@link OrganizationRoleReadPort.findRole} answers it. */
|
|
285
|
+
export interface OrganizationRoleSummary {
|
|
286
|
+
readonly id: string;
|
|
287
|
+
readonly kind: OrganizationRoleKind;
|
|
288
|
+
/** The custom role's name; `null` for `administrator` and `member`. */
|
|
289
|
+
readonly name: string | null;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The refusal {@link organizationPermissionPreHandler} raises for a request
|
|
293
|
+
* that carries no customer: `401 UNAUTHORIZED`, the answer `requireCustomer`
|
|
294
|
+
* gives.
|
|
295
|
+
*
|
|
296
|
+
* It is a class of this package rather than the platform's `HttpError`
|
|
297
|
+
* because the guard is a plain function here and this package depends on
|
|
298
|
+
* nothing but `zod` — it cannot construct the platform's error. The platform's
|
|
299
|
+
* error envelope renders it exactly as it renders `requireCustomer`'s refusal.
|
|
300
|
+
* The guard is declared **after** `requireCustomer`, so in a correctly
|
|
301
|
+
* declared route this is a second line and never the first.
|
|
302
|
+
*/
|
|
303
|
+
export declare class CustomerSessionRequiredError extends Error {
|
|
304
|
+
readonly statusCode = 401;
|
|
305
|
+
readonly code: "UNAUTHORIZED";
|
|
306
|
+
constructor();
|
|
307
|
+
}
|
|
308
|
+
/** What {@link organizationPermissionPreHandler} reads off a request. */
|
|
309
|
+
export interface OrganizationPermissionGuardRequest {
|
|
310
|
+
readonly actor: Actor;
|
|
311
|
+
/** The platform's `request.responseLanguage()`, when the error envelope installed it. */
|
|
312
|
+
readonly responseLanguage?: () => Promise<string>;
|
|
313
|
+
}
|
|
314
|
+
export interface OrganizationPermissionGuardOptions {
|
|
315
|
+
/**
|
|
316
|
+
* `'refuse'` (the default): a non-customer actor is refused with
|
|
317
|
+
* {@link CustomerSessionRequiredError}. `'pass'`: a non-customer actor — an
|
|
318
|
+
* anonymous visitor with a guest basket — passes **unjudged** to the route's
|
|
319
|
+
* own handling. Only for routes that admit a guest today (owner ruling PR-4,
|
|
320
|
+
* research R-35); every other guard stays fail-closed.
|
|
321
|
+
*/
|
|
322
|
+
readonly guests?: 'refuse' | 'pass';
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* The route guard every gating module declares (research R-20, R-35):
|
|
326
|
+
*
|
|
327
|
+
* ```ts
|
|
328
|
+
* preHandler: [requireCustomer, organizationPermissionPreHandler(() => permissions, 'carts.create')]
|
|
329
|
+
* ```
|
|
330
|
+
*
|
|
331
|
+
* A plain function — no Fastify import — so it lives beside the port it calls.
|
|
332
|
+
* `getPort` is a thunk resolved on **every** request, never at registration:
|
|
333
|
+
* a captured port is the third fail-open shape of `module-composition.md` item
|
|
334
|
+
* 4a. A customer actor — impersonation included — is judged by `assert` with
|
|
335
|
+
* the subject built from the actor and the response language; the port's
|
|
336
|
+
* refusal propagates unchanged. Composite actions are two guards, never a
|
|
337
|
+
* combined code; the refusal names the first missing one.
|
|
338
|
+
*/
|
|
339
|
+
export declare function organizationPermissionPreHandler(getPort: () => OrganizationPermissionPort, code: string, options?: OrganizationPermissionGuardOptions): (request: OrganizationPermissionGuardRequest) => Promise<void>;
|
|
340
|
+
//# sourceMappingURL=organization-roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-roles.d.ts","sourceRoot":"","sources":["../src/organization-roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAIxC;;;;;;;;;;;;;;;;GAgBG;AAIH,eAAO,MAAM,0BAA0B;;;;EAAgD,CAAC;AACxF,MAAM,MAAM,oBAAoB,GAAG,CAAC,C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