@elasticias/types 1.0.47 → 1.0.49
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elasticias-types.mjs","sources":["../../../../libs/types/src/lib/identity.ts","../../../../libs/types/src/lib/common.ts","../../../../libs/types/src/elasticias-types.ts"],"sourcesContent":["/**\n * Canonical permission verbs (CRUD + capabilities) — the single source of\n * truth on the frontend. Kept name-identical to the backend `Permissions`\n * constants so a value like `Permissions.Create` greps the same on both sides.\n *\n * - `Read` — view records (queries).\n * - `Create` — create new records.\n * - `Edit` — modify existing records (update). Distinct from `Create`.\n * - `Delete` — remove records.\n * - `Duplicate` / `Print` / `Export` / `Import` — action capabilities.\n *\n * Permissions are matched as plain strings, so an app may grant custom\n * permission strings beyond this set — the enum is the standard vocabulary,\n * open for extension.\n */\nexport enum Permissions {\n Read = 'Read',\n Create = 'Create',\n Edit = 'Edit',\n Delete = 'Delete',\n Duplicate = 'Duplicate',\n Print = 'Print',\n Export = 'Export',\n Import = 'Import',\n}\n\n/** The standard verbs in their canonical (display/storage) order. */\nexport const PERMISSIONS: readonly Permissions[] = [\n Permissions.Read,\n Permissions.Create,\n Permissions.Edit,\n Permissions.Delete,\n Permissions.Duplicate,\n Permissions.Print,\n Permissions.Export,\n Permissions.Import,\n];\n\n/**\n * A user's grants keyed by screen code, as the app stores them after login\n * (`{ SalesOrders: { permissions: ['Read', 'Edit'] } }`). Verbs are plain\n * strings so custom grants beyond {@link Permissions} pass through.\n */\nexport type ScreenGrants = Record<string, { permissions?: string[] }>;\n","export interface PaginationParams {\n pageNumber: number;\n pageSize: number;\n}\n\nexport interface SortParams {\n field: string;\n direction: SortDirection;\n}\n\nexport type SortDirection = 'ASC' | 'DESC';\n\nexport interface ApiResponse<T> {\n data: T;\n success: boolean;\n message?: string;\n errors?: string[];\n}\n\nexport interface PagedResult<T> {\n items: T[];\n totalCount: number;\n totalPages: number;\n pageNumber: number;\n pageSize: number;\n}\n\nexport enum DiscountType {\n PERCENTAGE = 'PERCENTAGE',\n FIXED = 'FIXED',\n}\n\nexport enum PaymentMethod {\n CASH = 'CASH',\n CARD = 'CARD',\n BANK_TRANSFER = 'BANK_TRANSFER',\n LOYALTY_POINTS = 'LOYALTY_POINTS',\n GIFT_CARD = 'GIFT_CARD',\n}\n\nexport enum ErpOrderStatus {\n DRAFT = 'DRAFT',\n SHIPPED = 'SHIPPED',\n INVOICED = 'INVOICED',\n IN_PROGRESS = 'IN_PROGRESS',\n}\n\nexport enum PosOrderStatus {\n PENDING = 'PENDING',\n PAID = 'PAID',\n CANCELLED = 'CANCELLED',\n REFUNDED = 'REFUNDED',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;IACS;AAAZ,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACnB,CAAC,EATW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;AAWvB;AACO,MAAM,WAAW,GAA2B;AACjD,IAAA,WAAW,CAAC,IAAI;AAChB,IAAA,WAAW,CAAC,MAAM;AAClB,IAAA,WAAW,CAAC,IAAI;AAChB,IAAA,WAAW,CAAC,MAAM;AAClB,IAAA,WAAW,CAAC,SAAS;AACrB,IAAA,WAAW,CAAC,KAAK;AACjB,IAAA,WAAW,CAAC,MAAM;AAClB,IAAA,WAAW,CAAC,MAAM;;;
|
|
1
|
+
{"version":3,"file":"elasticias-types.mjs","sources":["../../../../libs/types/src/lib/identity.ts","../../../../libs/types/src/lib/common.ts","../../../../libs/types/src/elasticias-types.ts"],"sourcesContent":["/**\n * Canonical permission verbs (CRUD + capabilities) — the single source of\n * truth on the frontend. Kept name-identical to the backend `Permissions`\n * constants so a value like `Permissions.Create` greps the same on both sides.\n *\n * - `Read` — view records (queries).\n * - `Create` — create new records.\n * - `Edit` — modify existing records (update). Distinct from `Create`.\n * - `Delete` — remove records.\n * - `Duplicate` / `Print` / `Export` / `Import` — action capabilities.\n *\n * Permissions are matched as plain strings, so an app may grant custom\n * permission strings beyond this set — the enum is the standard vocabulary,\n * open for extension.\n */\nexport enum Permissions {\n Read = 'Read',\n Create = 'Create',\n Edit = 'Edit',\n Delete = 'Delete',\n Duplicate = 'Duplicate',\n Print = 'Print',\n Export = 'Export',\n Import = 'Import',\n}\n\n/** The standard verbs in their canonical (display/storage) order. */\nexport const PERMISSIONS: readonly Permissions[] = [\n Permissions.Read,\n Permissions.Create,\n Permissions.Edit,\n Permissions.Delete,\n Permissions.Duplicate,\n Permissions.Print,\n Permissions.Export,\n Permissions.Import,\n];\n\n/**\n * A user's grants keyed by screen code, as the app stores them after login\n * (`{ SalesOrders: { permissions: ['Read', 'Edit'] } }`). Verbs are plain\n * strings so custom grants beyond {@link Permissions} pass through.\n */\nexport type ScreenGrants = Record<string, { permissions?: string[] }>;\n","export interface PaginationParams {\n pageNumber: number;\n pageSize: number;\n}\n\nexport interface SortParams {\n field: string;\n direction: SortDirection;\n}\n\nexport type SortDirection = 'ASC' | 'DESC';\n\nexport interface ApiResponse<T> {\n data: T;\n success: boolean;\n message?: string;\n errors?: string[];\n}\n\nexport interface PagedResult<T> {\n items: T[];\n totalCount: number;\n totalPages: number;\n pageNumber: number;\n pageSize: number;\n}\n\n/**\n * One page of a server-paginated search, as a component reads it: only the\n * rows and the total. Deliberately minimal and tolerant, so any paged DTO is\n * assignable to it: `PagedResult<T>` above, an NSwag `PaginatedListOf...`.\n */\nexport interface EfPage<T> {\n items?: ReadonlyArray<T> | null;\n totalCount?: number | null;\n}\n\nexport enum DiscountType {\n PERCENTAGE = 'PERCENTAGE',\n FIXED = 'FIXED',\n}\n\nexport enum PaymentMethod {\n CASH = 'CASH',\n CARD = 'CARD',\n BANK_TRANSFER = 'BANK_TRANSFER',\n LOYALTY_POINTS = 'LOYALTY_POINTS',\n GIFT_CARD = 'GIFT_CARD',\n}\n\nexport enum ErpOrderStatus {\n DRAFT = 'DRAFT',\n SHIPPED = 'SHIPPED',\n INVOICED = 'INVOICED',\n IN_PROGRESS = 'IN_PROGRESS',\n}\n\nexport enum PosOrderStatus {\n PENDING = 'PENDING',\n PAID = 'PAID',\n CANCELLED = 'CANCELLED',\n REFUNDED = 'REFUNDED',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;IACS;AAAZ,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACnB,CAAC,EATW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;AAWvB;AACO,MAAM,WAAW,GAA2B;AACjD,IAAA,WAAW,CAAC,IAAI;AAChB,IAAA,WAAW,CAAC,MAAM;AACl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A,UAAqB;AACvB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;ACzD1B;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -173,6 +173,15 @@ interface PagedResult<T> {
|
|
|
173
173
|
pageNumber: number;
|
|
174
174
|
pageSize: number;
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* One page of a server-paginated search, as a component reads it: only the
|
|
178
|
+
* rows and the total. Deliberately minimal and tolerant, so any paged DTO is
|
|
179
|
+
* assignable to it: `PagedResult<T>` above, an NSwag `PaginatedListOf...`.
|
|
180
|
+
*/
|
|
181
|
+
interface EfPage<T> {
|
|
182
|
+
items?: ReadonlyArray<T> | null;
|
|
183
|
+
totalCount?: number | null;
|
|
184
|
+
}
|
|
176
185
|
declare enum DiscountType {
|
|
177
186
|
PERCENTAGE = "PERCENTAGE",
|
|
178
187
|
FIXED = "FIXED"
|
|
@@ -238,4 +247,4 @@ interface EmailEventRecord {
|
|
|
238
247
|
}
|
|
239
248
|
|
|
240
249
|
export { DiscountType, ErpOrderStatus, PERMISSIONS, PaymentMethod, Permissions, PosOrderStatus };
|
|
241
|
-
export type { ApiResponse, BusinessHours, Cart, CartItem, Category, DeliveryAddress, EmailEventKind, EmailEventRecord, EmailMetrics, EmailMetricsCategoryBreakdown, EmailMetricsDailyPoint, Modifier, ModifierGroup, Order, OrderMode, PagedResult, PaginationParams, Product, ScreenGrants, SelectedModifier, SortDirection, SortParams, StoreConfig, StoreOrderStatus };
|
|
250
|
+
export type { ApiResponse, BusinessHours, Cart, CartItem, Category, DeliveryAddress, EfPage, EmailEventKind, EmailEventRecord, EmailMetrics, EmailMetricsCategoryBreakdown, EmailMetricsDailyPoint, Modifier, ModifierGroup, Order, OrderMode, PagedResult, PaginationParams, Product, ScreenGrants, SelectedModifier, SortDirection, SortParams, StoreConfig, StoreOrderStatus };
|