@managemint-solutions/sdk 0.65.0 → 0.67.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/audit/index.d.ts +1 -1
- package/dist/audit/index.js +14 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +14 -0
- package/dist/documents/content.js +6 -1
- package/dist/documents/document-templates.js +15 -5
- package/dist/documents/documents.d.ts +14 -5
- package/dist/documents/documents.js +14 -2
- package/dist/documents/dto.d.ts +12 -2
- package/dist/documents/dto.js +61 -1
- package/dist/documents/render/html.d.ts +5 -0
- package/dist/documents/render/html.js +10 -3
- package/dist/documents/render/index.d.ts +1 -1
- package/dist/documents/render/index.js +3 -1
- package/dist/documents/render/values.d.ts +12 -5
- package/dist/documents/render/values.js +16 -6
- package/dist/index.d.ts +3 -1
- package/dist/index.js +32 -3
- package/dist/inventory/dto.d.ts +134 -0
- package/dist/inventory/dto.js +684 -0
- package/dist/inventory/index.d.ts +7 -0
- package/dist/inventory/index.js +30 -0
- package/dist/inventory/items.d.ts +65 -0
- package/dist/inventory/items.js +216 -0
- package/dist/inventory/levels.d.ts +52 -0
- package/dist/inventory/levels.js +157 -0
- package/dist/inventory/locations.d.ts +29 -0
- package/dist/inventory/locations.js +158 -0
- package/dist/inventory/movements.d.ts +36 -0
- package/dist/inventory/movements.js +103 -0
- package/dist/inventory/stocktakes.d.ts +36 -0
- package/dist/inventory/stocktakes.js +70 -0
- package/dist/inventory/transfers.d.ts +73 -0
- package/dist/inventory/transfers.js +134 -0
- package/dist/organizations/dto.d.ts +3 -1
- package/dist/organizations/dto.js +12 -0
- package/dist/organizations/index.js +2 -0
- package/dist/permissions/dto.d.ts +4 -0
- package/dist/permissions/dto.js +20 -0
- package/dist/service-client/index.d.ts +6 -0
- package/dist/service-client/index.js +10 -0
- package/dist/users/paths.d.ts +5 -6
- package/dist/users/paths.js +12 -12
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.systemValues = exports.johannesburgDate = exports.startingValues = exports.printsMoney = exports.documentTotals = exports.lineAmounts = exports.MONO_FONT = exports.formatDocumentDate = exports.money = exports.escapeHtml = exports.safeHref = exports.isObject = exports.SYSTEM_VARIABLES = exports.DOCUMENT_VARIABLE_PATTERN = void 0;
|
|
3
|
+
exports.systemValues = exports.dueDateFrom = exports.johannesburgDate = exports.startingValues = exports.printsMoney = exports.documentTotals = exports.lineAmounts = exports.amountOf = exports.MONO_FONT = exports.formatDocumentDate = exports.money = exports.escapeHtml = exports.safeHref = exports.isObject = exports.SYSTEM_VARIABLES = exports.DOCUMENT_VARIABLE_PATTERN = void 0;
|
|
4
4
|
const enum_1 = require("@managemint-solutions/entities/documents/enum");
|
|
5
5
|
// The values a document prints that nobody types in: one line's amounts, the totals of every line
|
|
6
6
|
// items block, the system values, and how a value is escaped and formatted. Pure functions with
|
|
@@ -33,6 +33,7 @@ exports.SYSTEM_VARIABLES = {
|
|
|
33
33
|
[enum_1.DocumentSystemVariable.CLIENT_ADDRESS]: { label: 'Client address', type: enum_1.DocumentVariableType.TEXT },
|
|
34
34
|
[enum_1.DocumentSystemVariable.CLIENT_REGISTRATION_NUMBER]: { label: 'Client registration number', type: enum_1.DocumentVariableType.TEXT },
|
|
35
35
|
[enum_1.DocumentSystemVariable.CLIENT_VAT_NUMBER]: { label: 'Client VAT number', type: enum_1.DocumentVariableType.TEXT },
|
|
36
|
+
[enum_1.DocumentSystemVariable.DUE_DATE]: { label: 'Due date', type: enum_1.DocumentVariableType.DATE },
|
|
36
37
|
};
|
|
37
38
|
const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
38
39
|
exports.isObject = isObject;
|
|
@@ -60,18 +61,20 @@ exports.formatDocumentDate = formatDocumentDate;
|
|
|
60
61
|
/** The monospace stack for numbers - the design's JetBrains Mono, self-contained. */
|
|
61
62
|
exports.MONO_FONT = 'ui-monospace, \'Cascadia Mono\', \'Segoe UI Mono\', Consolas, monospace';
|
|
62
63
|
/** A line's quantity or unit price: the number written in, or its variable's value (0 while it has none). */
|
|
64
|
+
/** A line's quantity or price as a figure: written in, or read from its variable (0 when unset). */
|
|
63
65
|
const amountOf = (amount, values) => {
|
|
64
66
|
if (typeof amount === 'number')
|
|
65
67
|
return amount;
|
|
66
68
|
const value = values[amount.variable];
|
|
67
69
|
return typeof value === 'number' ? value : 0;
|
|
68
70
|
};
|
|
71
|
+
exports.amountOf = amountOf;
|
|
69
72
|
/**
|
|
70
73
|
* One line's amounts in cents: gross = quantity x unit price, the discount a percentage of the
|
|
71
74
|
* gross, net = gross - discount, the tax a percentage of the net - each rounded to the cent.
|
|
72
75
|
*/
|
|
73
76
|
const lineAmounts = (line, values) => {
|
|
74
|
-
const gross = Math.round(amountOf(line.quantity, values) * amountOf(line.unit_price_minor, values));
|
|
77
|
+
const gross = Math.round((0, exports.amountOf)(line.quantity, values) * (0, exports.amountOf)(line.unit_price_minor, values));
|
|
75
78
|
const discount = Math.round((gross * line.discount_percent) / 100);
|
|
76
79
|
const net = gross - discount;
|
|
77
80
|
const tax = Math.round((net * line.tax_rate) / 100);
|
|
@@ -108,14 +111,20 @@ exports.startingValues = startingValues;
|
|
|
108
111
|
/** The calendar date (`YYYY-MM-DD`) `now` falls on in Africa/Johannesburg - a draft's issue date. */
|
|
109
112
|
const johannesburgDate = (now) => new Intl.DateTimeFormat('en-CA', { timeZone: 'Africa/Johannesburg' }).format(now);
|
|
110
113
|
exports.johannesburgDate = johannesburgDate;
|
|
114
|
+
/** `issueDate` plus `days`, as a calendar date: the due date of a document issued that day. */
|
|
115
|
+
const dueDateFrom = (issueDate, days) => {
|
|
116
|
+
const [year, month, day] = issueDate.split('-').map(Number);
|
|
117
|
+
return new Date(Date.UTC(year, month - 1, day + days)).toISOString().slice(0, 10);
|
|
118
|
+
};
|
|
119
|
+
exports.dueDateFrom = dueDateFrom;
|
|
111
120
|
/**
|
|
112
121
|
* The values filled in for the system variables: the organization's name (its trading name
|
|
113
122
|
* first), address, registration and VAT numbers, email and phone; the client's name, email, phone,
|
|
114
|
-
* address, registration and VAT numbers; the document number;
|
|
115
|
-
* name and year. A value that is empty is left out, so it prints as missing.
|
|
116
|
-
* page number and count are not values: they are counted page by page as the PDF prints.
|
|
123
|
+
* address, registration and VAT numbers; the document number; the issue date with its month
|
|
124
|
+
* name and year; and the due date. A value that is empty is left out, so it prints as missing.
|
|
125
|
+
* The page number and count are not values: they are counted page by page as the PDF prints.
|
|
117
126
|
*/
|
|
118
|
-
const systemValues = ({ organization, client, number, issueDate }) => {
|
|
127
|
+
const systemValues = ({ organization, client, number, issueDate, dueDate }) => {
|
|
119
128
|
const text = (value) => (typeof value === 'string' ? value.trim() : '');
|
|
120
129
|
const address = (parts) => (parts ?? []).map(text).filter(Boolean).join(', ');
|
|
121
130
|
const [year, month] = issueDate.split('-');
|
|
@@ -136,6 +145,7 @@ const systemValues = ({ organization, client, number, issueDate }) => {
|
|
|
136
145
|
[enum_1.DocumentSystemVariable.ISSUE_DATE]: issueDate,
|
|
137
146
|
[enum_1.DocumentSystemVariable.MONTH]: new Intl.DateTimeFormat('en-ZA', { month: 'long', timeZone: 'UTC' }).format(new Date(Date.UTC(Number(year), Number(month) - 1, 1))),
|
|
138
147
|
[enum_1.DocumentSystemVariable.YEAR]: year,
|
|
148
|
+
[enum_1.DocumentSystemVariable.DUE_DATE]: dueDate ?? '',
|
|
139
149
|
};
|
|
140
150
|
return Object.fromEntries(Object.entries(values).filter(([, value]) => value !== ''));
|
|
141
151
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -41,9 +41,11 @@ export type { ClaimOutcome, WebhookEventRow, WebhookEventsTable } from './webhoo
|
|
|
41
41
|
export { GetSupportingFilesDto, SupportingFileIdDto, SupportingFileNamesDto } from './supporting-files';
|
|
42
42
|
export { ClientIdDto, CreateClientDto, GetClientsDto, StaffGetClientsDto, UpdateClientDto } from './clients';
|
|
43
43
|
export { ConvertLeadDto, CreateLeadDto, GetLeadsDto, LeadIdDto, StaffGetLeadsDto, UpdateLeadDto } from './leads';
|
|
44
|
+
export type { CreateInventoryMovementRow, InventoryItemRow, InventoryLevelRow, InventoryStocktakeRow, InventoryTransferRow, UpdateInventoryTransferRow, } from './inventory';
|
|
45
|
+
export { CountInventoryDto, CountInventoryLineDto, CreateInventoryItemDto, CreateInventoryLocationDto, CreateInventoryMovementDto, CreateInventoryTransferDto, CreateInventoryTransferLineDto, GeocodeAddressDto, GetInventoryItemsDto, GetInventoryLocationsDto, GetInventoryMovementsDto, GetInventoryStocktakesDto, GetInventoryTransfersDto, ImportInventoryItemDto, ImportInventoryItemsDto, InventoryItemIdDto, InventoryLevelKeyDto, InventoryLocationIdDto, InventoryStocktakeIdDto, InventoryTransferIdDto, ReceiveInventoryTransferDto, StaffGetInventoryItemsDto, SuggestAddressesDto, UpdateInventoryItemDto, UpdateInventoryLevelDto, UpdateInventoryLocationDto, UpdateInventoryTransferDto, } from './inventory';
|
|
44
46
|
export type { CreateDocumentRow, DocumentListRecord, DocumentSendEvent, UpdateDocumentRow } from './documents';
|
|
45
47
|
export type { CreatePaymentRow, OpenPaymentRecord, PaymentRecord, SettlePaymentRow } from './payments';
|
|
46
|
-
export { CatalogueTemplateSlugDto, CopyCatalogueTemplateDto, CreateDocumentDto, CreateDocumentTemplateDto, DocumentIdDto, DocumentImageNameDto, DocumentImageUrlsDto, DocumentPayQueryDto, DocumentPayTokenDto, DocumentPaymentIdDto, DocumentTemplateIdDto, documentProblem, GetCatalogueTemplatesDto, GetDocumentsDto, GetDocumentTemplatesDto, PayDocumentDto, RecordDocumentPaymentDto, SendDocumentDto, UpdateDocumentDto, UpdateDocumentTemplateDto, VoidDocumentDto, ReassignPrivateDocumentsDto, } from './documents';
|
|
48
|
+
export { CatalogueTemplateSlugDto, CopyCatalogueTemplateDto, CreateDocumentDto, CreateDocumentTemplateDto, DocumentIdDto, DocumentImageNameDto, DocumentImageUrlsDto, DocumentPayQueryDto, DocumentPayTokenDto, DocumentPaymentIdDto, DocumentTemplateIdDto, documentProblem, GetCatalogueTemplatesDto, GetDocumentsDto, GetDocumentTemplatesDto, PayDocumentDto, RecordDocumentPaymentDto, SendDocumentDto, UpdateDocumentDto, UpdateDocumentTemplateDto, VoidDocumentDto, ConvertDocumentDto, ReassignPrivateDocumentsDto, } from './documents';
|
|
47
49
|
export type { DocumentRecord, DocumentTemplateRecord } from './documents';
|
|
48
50
|
export type { VisibilityRecord, VisibilityShareInput } from './visibility';
|
|
49
51
|
export { UpdateVisibilityDto } from './visibility';
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// to keep. The row and input types they produce and accept are exported for annotations.
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.UpdateOrganizationPayoutsDto = exports.NotificationIdDto = exports.GetNotificationsDto = exports.NoteIdDto = exports.GetNotesDto = exports.AddNoteDto = exports.UpdateAdditionalDetailsDto = exports.IsAdditionalDetailsValueByType = exports.GetAdditionalDetailsDto = exports.AdditionalDetailsIdDto = exports.AddAdditionalDetailsDto = exports.UpdateLabelDto = exports.LabelIdDto = exports.GetLabelsDto = exports.AddLabelDto = exports.UpdateStatusDto = exports.StatusIdDto = exports.ReorderStatusesDto = exports.GetStatusesDto = exports.AddStatusDto = exports.CreateSupportRequestDto = exports.UpdateConfigDto = exports.CreateConfigDto = exports.CreateFeatureRequestDto = exports.InvoiceIdDto = exports.GetInvoicesQueryDto = exports.ReinstateSubscriptionDto = exports.PurchaseModuleDto = exports.PaymentIdDto = exports.InitialPaymentDto = exports.GetPaymentsQueryDto = exports.CancelSubscriptionDto = exports.withAuditBatch = exports.GetAuditTrailDto = exports.IsNullable = exports.EmptyToNull = exports.SupabaseClientError = exports.createSupabaseServiceClient = exports.SupabaseServiceClient = exports.SignInDto = exports.SendPasswordResetEmailDto = exports.ResetPasswordDto = exports.ExchangeTokenHashDto = exports.ExchangeRefreshTokenDto = exports.createSupabaseAuthClient = exports.SupabaseAuthClient = exports.createSupabaseStaffClient = exports.SupabaseStaffClient = exports.createSupabaseClient = exports.SupabaseClient = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.monthlyTotalMinor = exports.weekStartOf = exports.minutesBetween = void 0;
|
|
11
|
+
exports.InventoryLocationIdDto = exports.InventoryLevelKeyDto = exports.InventoryItemIdDto = exports.ImportInventoryItemsDto = exports.ImportInventoryItemDto = exports.GetInventoryTransfersDto = exports.GetInventoryStocktakesDto = exports.GetInventoryMovementsDto = exports.GetInventoryLocationsDto = exports.GetInventoryItemsDto = exports.GeocodeAddressDto = exports.CreateInventoryTransferLineDto = exports.CreateInventoryTransferDto = exports.CreateInventoryMovementDto = exports.CreateInventoryLocationDto = exports.CreateInventoryItemDto = exports.CountInventoryLineDto = exports.CountInventoryDto = exports.UpdateLeadDto = exports.StaffGetLeadsDto = exports.LeadIdDto = exports.GetLeadsDto = exports.CreateLeadDto = exports.ConvertLeadDto = exports.UpdateClientDto = exports.StaffGetClientsDto = exports.GetClientsDto = exports.CreateClientDto = exports.ClientIdDto = exports.SupportingFileNamesDto = exports.SupportingFileIdDto = exports.GetSupportingFilesDto = exports.UserIdDto = exports.UpdateUserDto = exports.UpdateMyProfileDto = exports.StaffGetUsersDto = exports.GetUsersQueryDto = exports.AddUserDto = exports.UserApiCredentialIdDto = exports.MintEmulationTokenDto = exports.CreateUserApiCredentialDto = exports.UpdateStaffPermissionsDto = exports.StaffIdDto = exports.CreateStaffDto = exports.UpdatePermissionsDto = exports.PermissionsResource = exports.UpdateOrganizationDto = exports.OrganizationIdDto = exports.GetOrganizationsDto = exports.CreateOrganizationDto = void 0;
|
|
12
|
+
exports.CreateLeaveTypeDto = exports.CreateLeaveRequestDto = exports.CreateLeaveEntitlementDto = exports.CreateLeaveAdjustmentDto = exports.BulkCreateLeaveEntitlementsDto = exports.UpdateTaskDto = exports.TaskLinkIdDto = exports.TaskIdDto = exports.StaffGetTasksDto = exports.GetTasksDto = exports.CreateTaskDto = exports.AddTaskLinkDto = exports.UpdateProjectDto = exports.StaffGetProjectsDto = exports.ProjectIdDto = exports.GetProjectsDto = exports.CreateProjectDto = exports.UpdateVisibilityDto = exports.ReassignPrivateDocumentsDto = exports.ConvertDocumentDto = exports.VoidDocumentDto = exports.UpdateDocumentTemplateDto = exports.UpdateDocumentDto = exports.SendDocumentDto = exports.RecordDocumentPaymentDto = exports.PayDocumentDto = exports.GetDocumentTemplatesDto = exports.GetDocumentsDto = exports.GetCatalogueTemplatesDto = exports.documentProblem = exports.DocumentTemplateIdDto = exports.DocumentPaymentIdDto = exports.DocumentPayTokenDto = exports.DocumentPayQueryDto = exports.DocumentImageUrlsDto = exports.DocumentImageNameDto = exports.DocumentIdDto = exports.CreateDocumentTemplateDto = exports.CreateDocumentDto = exports.CopyCatalogueTemplateDto = exports.CatalogueTemplateSlugDto = exports.UpdateInventoryTransferDto = exports.UpdateInventoryLocationDto = exports.UpdateInventoryLevelDto = exports.UpdateInventoryItemDto = exports.SuggestAddressesDto = exports.StaffGetInventoryItemsDto = exports.ReceiveInventoryTransferDto = exports.InventoryTransferIdDto = exports.InventoryStocktakeIdDto = void 0;
|
|
13
|
+
exports.monthlyTotalMinor = exports.weekStartOf = exports.minutesBetween = exports.UpdateTimesheetEntryDto = exports.TimesheetIdDto = exports.TimesheetEntryIdDto = exports.ReviewTimesheetDto = exports.GetTimesheetsDto = exports.GetTimesheetReportDto = exports.CreateTimesheetEntryDto = exports.todayInJohannesburg = exports.shiftDays = exports.proRataDays = exports.isWithinPeriod = exports.initialUntil = exports.cyclePeriodFor = exports.countWorkingDays = exports.completedMonths = exports.addMonths = exports.GetPublicHolidaysDto = exports.UpdateLeaveTypeDto = exports.UpdateLeaveRequestDto = exports.UpdateLeaveEntitlementDto = exports.ReviewLeaveRequestDto = exports.LeaveTypeIdDto = exports.LeaveRequestIdDto = exports.LeaveEntitlementIdDto = exports.GetLeaveTypesDto = exports.GetLeaveRequestsDto = exports.GetLeaveEntitlementsDto = exports.GetLeaveCalendarDto = void 0;
|
|
14
14
|
var client_1 = require("./client");
|
|
15
15
|
Object.defineProperty(exports, "SupabaseClient", { enumerable: true, get: function () { return client_1.SupabaseClient; } });
|
|
16
16
|
Object.defineProperty(exports, "createSupabaseClient", { enumerable: true, get: function () { return client_1.createSupabaseClient; } });
|
|
@@ -123,6 +123,34 @@ Object.defineProperty(exports, "GetLeadsDto", { enumerable: true, get: function
|
|
|
123
123
|
Object.defineProperty(exports, "LeadIdDto", { enumerable: true, get: function () { return leads_1.LeadIdDto; } });
|
|
124
124
|
Object.defineProperty(exports, "StaffGetLeadsDto", { enumerable: true, get: function () { return leads_1.StaffGetLeadsDto; } });
|
|
125
125
|
Object.defineProperty(exports, "UpdateLeadDto", { enumerable: true, get: function () { return leads_1.UpdateLeadDto; } });
|
|
126
|
+
var inventory_1 = require("./inventory");
|
|
127
|
+
Object.defineProperty(exports, "CountInventoryDto", { enumerable: true, get: function () { return inventory_1.CountInventoryDto; } });
|
|
128
|
+
Object.defineProperty(exports, "CountInventoryLineDto", { enumerable: true, get: function () { return inventory_1.CountInventoryLineDto; } });
|
|
129
|
+
Object.defineProperty(exports, "CreateInventoryItemDto", { enumerable: true, get: function () { return inventory_1.CreateInventoryItemDto; } });
|
|
130
|
+
Object.defineProperty(exports, "CreateInventoryLocationDto", { enumerable: true, get: function () { return inventory_1.CreateInventoryLocationDto; } });
|
|
131
|
+
Object.defineProperty(exports, "CreateInventoryMovementDto", { enumerable: true, get: function () { return inventory_1.CreateInventoryMovementDto; } });
|
|
132
|
+
Object.defineProperty(exports, "CreateInventoryTransferDto", { enumerable: true, get: function () { return inventory_1.CreateInventoryTransferDto; } });
|
|
133
|
+
Object.defineProperty(exports, "CreateInventoryTransferLineDto", { enumerable: true, get: function () { return inventory_1.CreateInventoryTransferLineDto; } });
|
|
134
|
+
Object.defineProperty(exports, "GeocodeAddressDto", { enumerable: true, get: function () { return inventory_1.GeocodeAddressDto; } });
|
|
135
|
+
Object.defineProperty(exports, "GetInventoryItemsDto", { enumerable: true, get: function () { return inventory_1.GetInventoryItemsDto; } });
|
|
136
|
+
Object.defineProperty(exports, "GetInventoryLocationsDto", { enumerable: true, get: function () { return inventory_1.GetInventoryLocationsDto; } });
|
|
137
|
+
Object.defineProperty(exports, "GetInventoryMovementsDto", { enumerable: true, get: function () { return inventory_1.GetInventoryMovementsDto; } });
|
|
138
|
+
Object.defineProperty(exports, "GetInventoryStocktakesDto", { enumerable: true, get: function () { return inventory_1.GetInventoryStocktakesDto; } });
|
|
139
|
+
Object.defineProperty(exports, "GetInventoryTransfersDto", { enumerable: true, get: function () { return inventory_1.GetInventoryTransfersDto; } });
|
|
140
|
+
Object.defineProperty(exports, "ImportInventoryItemDto", { enumerable: true, get: function () { return inventory_1.ImportInventoryItemDto; } });
|
|
141
|
+
Object.defineProperty(exports, "ImportInventoryItemsDto", { enumerable: true, get: function () { return inventory_1.ImportInventoryItemsDto; } });
|
|
142
|
+
Object.defineProperty(exports, "InventoryItemIdDto", { enumerable: true, get: function () { return inventory_1.InventoryItemIdDto; } });
|
|
143
|
+
Object.defineProperty(exports, "InventoryLevelKeyDto", { enumerable: true, get: function () { return inventory_1.InventoryLevelKeyDto; } });
|
|
144
|
+
Object.defineProperty(exports, "InventoryLocationIdDto", { enumerable: true, get: function () { return inventory_1.InventoryLocationIdDto; } });
|
|
145
|
+
Object.defineProperty(exports, "InventoryStocktakeIdDto", { enumerable: true, get: function () { return inventory_1.InventoryStocktakeIdDto; } });
|
|
146
|
+
Object.defineProperty(exports, "InventoryTransferIdDto", { enumerable: true, get: function () { return inventory_1.InventoryTransferIdDto; } });
|
|
147
|
+
Object.defineProperty(exports, "ReceiveInventoryTransferDto", { enumerable: true, get: function () { return inventory_1.ReceiveInventoryTransferDto; } });
|
|
148
|
+
Object.defineProperty(exports, "StaffGetInventoryItemsDto", { enumerable: true, get: function () { return inventory_1.StaffGetInventoryItemsDto; } });
|
|
149
|
+
Object.defineProperty(exports, "SuggestAddressesDto", { enumerable: true, get: function () { return inventory_1.SuggestAddressesDto; } });
|
|
150
|
+
Object.defineProperty(exports, "UpdateInventoryItemDto", { enumerable: true, get: function () { return inventory_1.UpdateInventoryItemDto; } });
|
|
151
|
+
Object.defineProperty(exports, "UpdateInventoryLevelDto", { enumerable: true, get: function () { return inventory_1.UpdateInventoryLevelDto; } });
|
|
152
|
+
Object.defineProperty(exports, "UpdateInventoryLocationDto", { enumerable: true, get: function () { return inventory_1.UpdateInventoryLocationDto; } });
|
|
153
|
+
Object.defineProperty(exports, "UpdateInventoryTransferDto", { enumerable: true, get: function () { return inventory_1.UpdateInventoryTransferDto; } });
|
|
126
154
|
var documents_1 = require("./documents");
|
|
127
155
|
Object.defineProperty(exports, "CatalogueTemplateSlugDto", { enumerable: true, get: function () { return documents_1.CatalogueTemplateSlugDto; } });
|
|
128
156
|
Object.defineProperty(exports, "CopyCatalogueTemplateDto", { enumerable: true, get: function () { return documents_1.CopyCatalogueTemplateDto; } });
|
|
@@ -145,6 +173,7 @@ Object.defineProperty(exports, "SendDocumentDto", { enumerable: true, get: funct
|
|
|
145
173
|
Object.defineProperty(exports, "UpdateDocumentDto", { enumerable: true, get: function () { return documents_1.UpdateDocumentDto; } });
|
|
146
174
|
Object.defineProperty(exports, "UpdateDocumentTemplateDto", { enumerable: true, get: function () { return documents_1.UpdateDocumentTemplateDto; } });
|
|
147
175
|
Object.defineProperty(exports, "VoidDocumentDto", { enumerable: true, get: function () { return documents_1.VoidDocumentDto; } });
|
|
176
|
+
Object.defineProperty(exports, "ConvertDocumentDto", { enumerable: true, get: function () { return documents_1.ConvertDocumentDto; } });
|
|
148
177
|
Object.defineProperty(exports, "ReassignPrivateDocumentsDto", { enumerable: true, get: function () { return documents_1.ReassignPrivateDocumentsDto; } });
|
|
149
178
|
var visibility_1 = require("./visibility");
|
|
150
179
|
Object.defineProperty(exports, "UpdateVisibilityDto", { enumerable: true, get: function () { return visibility_1.UpdateVisibilityDto; } });
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
|
+
import type { CountInventoryDto as CountInventoryDtoType, CreateInventoryItemDto as CreateInventoryItemDtoType, CreateInventoryLocationDto as CreateInventoryLocationDtoType, CreateInventoryMovementDto as CreateInventoryMovementDtoType, CreateInventoryTransferDto as CreateInventoryTransferDtoType, CreateInventoryTransferLineDto as CreateInventoryTransferLineDtoType, GetInventoryItemsDto as GetInventoryItemsDtoType, GeocodeAddressDto as GeocodeAddressDtoType, GetInventoryLocationsDto as GetInventoryLocationsDtoType, GetInventoryMovementsDto as GetInventoryMovementsDtoType, GetInventoryStocktakesDto as GetInventoryStocktakesDtoType, GetInventoryTransfersDto as GetInventoryTransfersDtoType, ImportInventoryItemDto as ImportInventoryItemDtoType, ImportInventoryItemsDto as ImportInventoryItemsDtoType, InventoryItemFieldsDto as InventoryItemFieldsDtoType, InventoryItemIdDto as InventoryItemIdDtoType, InventoryLevelKeyDto as InventoryLevelKeyDtoType, InventoryLocationIdDto as InventoryLocationIdDtoType, InventoryStocktakeIdDto as InventoryStocktakeIdDtoType, InventoryTransferIdDto as InventoryTransferIdDtoType, ReceiveInventoryTransferDto as ReceiveInventoryTransferDtoType, SuggestAddressesDto as SuggestAddressesDtoType, StaffGetInventoryItemsDto as StaffGetInventoryItemsDtoType, UpdateInventoryItemDto as UpdateInventoryItemDtoType, UpdateInventoryLevelDto as UpdateInventoryLevelDtoType, UpdateInventoryLocationDto as UpdateInventoryLocationDtoType, UpdateInventoryTransferDto as UpdateInventoryTransferDtoType } from '@managemint-solutions/entities/inventory/dto';
|
|
3
|
+
import { InventoryLocationKind, InventoryMovementType, InventoryTransferStatus } from '@managemint-solutions/entities/inventory/enum';
|
|
4
|
+
export declare class GetInventoryLocationsDto implements GetInventoryLocationsDtoType {
|
|
5
|
+
readonly archive: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class InventoryLocationIdDto implements InventoryLocationIdDtoType {
|
|
8
|
+
readonly locationId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class CreateInventoryLocationDto implements CreateInventoryLocationDtoType {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly kind: InventoryLocationKind;
|
|
13
|
+
readonly address?: string | null;
|
|
14
|
+
readonly latitude?: number | null;
|
|
15
|
+
readonly longitude?: number | null;
|
|
16
|
+
readonly is_default?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class UpdateInventoryLocationDto extends CreateInventoryLocationDto implements UpdateInventoryLocationDtoType {
|
|
19
|
+
}
|
|
20
|
+
export declare class GeocodeAddressDto implements GeocodeAddressDtoType {
|
|
21
|
+
readonly address?: string | null;
|
|
22
|
+
readonly place_id?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare class SuggestAddressesDto implements SuggestAddressesDtoType {
|
|
25
|
+
readonly query: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class GetInventoryItemsDto implements GetInventoryItemsDtoType {
|
|
28
|
+
readonly search?: string | null;
|
|
29
|
+
readonly page: number;
|
|
30
|
+
readonly page_size: number;
|
|
31
|
+
readonly archive: boolean;
|
|
32
|
+
readonly group_name?: string | null;
|
|
33
|
+
readonly location_id?: string | null;
|
|
34
|
+
readonly below_reorder?: boolean | null;
|
|
35
|
+
}
|
|
36
|
+
/** A staff read across organizations, optionally narrowed to one of them. */
|
|
37
|
+
export declare class StaffGetInventoryItemsDto extends GetInventoryItemsDto implements StaffGetInventoryItemsDtoType {
|
|
38
|
+
readonly organization_id?: string | null;
|
|
39
|
+
}
|
|
40
|
+
export declare class InventoryItemIdDto implements InventoryItemIdDtoType {
|
|
41
|
+
readonly itemId: string;
|
|
42
|
+
}
|
|
43
|
+
export declare class InventoryItemFieldsDto implements InventoryItemFieldsDtoType {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly sku?: string | null;
|
|
46
|
+
readonly description?: string | null;
|
|
47
|
+
readonly group_name?: string | null;
|
|
48
|
+
readonly cost_minor?: number | null;
|
|
49
|
+
readonly price_minor?: number | null;
|
|
50
|
+
readonly track_stock?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** A new item with what is already on the shelf: the opening quantity lands at the named location, or the default one. */
|
|
53
|
+
export declare class CreateInventoryItemDto extends InventoryItemFieldsDto implements CreateInventoryItemDtoType {
|
|
54
|
+
readonly opening_quantity?: number | null;
|
|
55
|
+
readonly location_id?: string | null;
|
|
56
|
+
}
|
|
57
|
+
export declare class UpdateInventoryItemDto extends InventoryItemFieldsDto implements UpdateInventoryItemDtoType {
|
|
58
|
+
}
|
|
59
|
+
/** One CSV row: the item plus an optional opening quantity at a named location. */
|
|
60
|
+
export declare class ImportInventoryItemDto extends InventoryItemFieldsDto implements ImportInventoryItemDtoType {
|
|
61
|
+
readonly opening_quantity?: number | null;
|
|
62
|
+
readonly location_name?: string | null;
|
|
63
|
+
}
|
|
64
|
+
export declare class ImportInventoryItemsDto implements ImportInventoryItemsDtoType {
|
|
65
|
+
readonly items: ImportInventoryItemDto[];
|
|
66
|
+
}
|
|
67
|
+
export declare class InventoryLevelKeyDto implements InventoryLevelKeyDtoType {
|
|
68
|
+
readonly itemId: string;
|
|
69
|
+
readonly locationId: string;
|
|
70
|
+
}
|
|
71
|
+
export declare class UpdateInventoryLevelDto implements UpdateInventoryLevelDtoType {
|
|
72
|
+
readonly reorder_point: number | null;
|
|
73
|
+
readonly reorder_quantity: number | null;
|
|
74
|
+
readonly bin?: string | null;
|
|
75
|
+
}
|
|
76
|
+
export declare class GetInventoryMovementsDto implements GetInventoryMovementsDtoType {
|
|
77
|
+
readonly page: number;
|
|
78
|
+
readonly page_size: number;
|
|
79
|
+
readonly item_id?: string | null;
|
|
80
|
+
readonly location_id?: string | null;
|
|
81
|
+
readonly type?: InventoryMovementType | null;
|
|
82
|
+
}
|
|
83
|
+
export declare class CreateInventoryMovementDto implements CreateInventoryMovementDtoType {
|
|
84
|
+
readonly item_id: UUID;
|
|
85
|
+
readonly location_id: UUID;
|
|
86
|
+
readonly type: InventoryMovementType;
|
|
87
|
+
readonly quantity: number;
|
|
88
|
+
readonly unit_cost_minor?: number | null;
|
|
89
|
+
readonly reason?: string | null;
|
|
90
|
+
readonly supplier?: string | null;
|
|
91
|
+
readonly supplier_reference?: string | null;
|
|
92
|
+
readonly notes?: string | null;
|
|
93
|
+
}
|
|
94
|
+
export declare class CountInventoryLineDto {
|
|
95
|
+
readonly item_id: UUID;
|
|
96
|
+
readonly counted: number;
|
|
97
|
+
readonly reason?: string | null;
|
|
98
|
+
}
|
|
99
|
+
export declare class CountInventoryDto implements CountInventoryDtoType {
|
|
100
|
+
readonly lines: CountInventoryLineDto[];
|
|
101
|
+
readonly notes?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export declare class GetInventoryStocktakesDto implements GetInventoryStocktakesDtoType {
|
|
104
|
+
readonly page: number;
|
|
105
|
+
readonly page_size: number;
|
|
106
|
+
readonly location_id?: string | null;
|
|
107
|
+
}
|
|
108
|
+
export declare class InventoryStocktakeIdDto implements InventoryStocktakeIdDtoType {
|
|
109
|
+
readonly stocktakeId: string;
|
|
110
|
+
}
|
|
111
|
+
export declare class GetInventoryTransfersDto implements GetInventoryTransfersDtoType {
|
|
112
|
+
readonly page: number;
|
|
113
|
+
readonly page_size: number;
|
|
114
|
+
readonly status?: InventoryTransferStatus | null;
|
|
115
|
+
readonly location_id?: string | null;
|
|
116
|
+
}
|
|
117
|
+
export declare class InventoryTransferIdDto implements InventoryTransferIdDtoType {
|
|
118
|
+
readonly transferId: string;
|
|
119
|
+
}
|
|
120
|
+
export declare class CreateInventoryTransferLineDto implements CreateInventoryTransferLineDtoType {
|
|
121
|
+
readonly item_id: UUID;
|
|
122
|
+
readonly quantity: number;
|
|
123
|
+
}
|
|
124
|
+
export declare class CreateInventoryTransferDto implements CreateInventoryTransferDtoType {
|
|
125
|
+
readonly from_location_id: UUID;
|
|
126
|
+
readonly to_location_id: UUID;
|
|
127
|
+
readonly lines: CreateInventoryTransferLineDto[];
|
|
128
|
+
readonly notes?: string | null;
|
|
129
|
+
}
|
|
130
|
+
export declare class UpdateInventoryTransferDto extends CreateInventoryTransferDto implements UpdateInventoryTransferDtoType {
|
|
131
|
+
}
|
|
132
|
+
export declare class ReceiveInventoryTransferDto implements ReceiveInventoryTransferDtoType {
|
|
133
|
+
readonly lines?: CreateInventoryTransferLineDto[] | null;
|
|
134
|
+
}
|