@solibo/solibo-query 1.5.1 → 1.5.2
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/api/queries/administration/agreementDetails.d.ts +2 -2
- package/dist/api/queries/administration/insuranceAgreements.d.ts +3 -3
- package/dist/api/queries/administration/insuranceAgreements.js +8 -3
- package/dist/api/queries/administration/insuranceAgreements.js.map +1 -1
- package/dist/api/queries/administration/loanAgreements.d.ts +4 -4
- package/dist/api/queries/administration/loanAgreements.js +9 -4
- package/dist/api/queries/administration/loanAgreements.js.map +1 -1
- package/dist/api/queries/administration/loanChangeLog.d.ts +1 -1
- package/dist/api/queries/administration/tripletexDetails.d.ts +3 -3
- package/dist/api/queries/administration/tripletexDetails.js +6 -2
- package/dist/api/queries/administration/tripletexDetails.js.map +1 -1
- package/dist/api/queries/board/boardMembers.d.ts +3 -3
- package/dist/api/queries/board/boardMembers.js +8 -3
- package/dist/api/queries/board/boardMembers.js.map +1 -1
- package/dist/api/queries/board/showPersonalIdentityNumberOnBoardMember.d.ts +1 -1
- package/dist/api/queries/communication/availableBundles.d.ts +1 -1
- package/dist/api/queries/communication/availableSMS.d.ts +1 -1
- package/dist/api/queries/communication/communicationReport.d.ts +1 -1
- package/dist/api/queries/communication/newsletter.d.ts +1 -1
- package/dist/api/queries/communication/newsletters.d.ts +12 -12
- package/dist/api/queries/communication/newsletters.js +24 -16
- package/dist/api/queries/communication/newsletters.js.map +1 -1
- package/dist/api/queries/communication/notificationgroupsEmail.d.ts +1 -1
- package/dist/api/queries/communication/notificationgroupsSms.d.ts +1 -1
- package/dist/api/queries/communication/sMSAvailableForSMSBroadcastPost.d.ts +1 -1
- package/dist/api/queries/communication/sMSBroadcast.d.ts +1 -1
- package/dist/api/queries/communication/sMSBroadcasts.d.ts +1 -1
- package/dist/api/queries/communication/sMSPurchases.d.ts +1 -1
- package/dist/api/queries/company/administratorsForCompany.d.ts +1 -1
- package/dist/api/queries/company/availableAdministratorsForCompany.d.ts +1 -1
- package/dist/api/queries/company/companies.d.ts +9 -9
- package/dist/api/queries/company/companies.js +14 -10
- package/dist/api/queries/company/companies.js.map +1 -1
- package/dist/api/queries/company/companyAddresses.d.ts +1 -1
- package/dist/api/queries/company/companyById.d.ts +1 -1
- package/dist/api/queries/company/companyDetailed.d.ts +1 -1
- package/dist/api/queries/company/companyDraft.d.ts +1 -1
- package/dist/api/queries/company/companyDrafts.d.ts +1 -1
- package/dist/api/queries/company/companyOrdinances.d.ts +1 -1
- package/dist/api/queries/company/fractions.d.ts +1 -1
- package/dist/api/queries/conversation/companyConversationCategoriesForRequests.d.ts +1 -1
- package/dist/api/queries/conversation/conversation.d.ts +1 -1
- package/dist/api/queries/conversation/conversationCategories.d.ts +1 -1
- package/dist/api/queries/conversation/conversationCount.d.ts +1 -1
- package/dist/api/queries/conversation/conversationFolders.d.ts +2 -2
- package/dist/api/queries/conversation/conversations.d.ts +13 -13
- package/dist/api/queries/conversation/conversations.js +23 -14
- package/dist/api/queries/conversation/conversations.js.map +1 -1
- package/dist/api/queries/conversation/conversationsByParticipant.d.ts +1 -1
- package/dist/api/queries/conversation/publicConversation.d.ts +2 -2
- package/dist/api/queries/conversation/publicConversationAuth.d.ts +1 -1
- package/dist/api/queries/conversation/unreadConversationsCount.d.ts +1 -1
- package/dist/api/queries/document/documentActions.d.ts +4 -4
- package/dist/api/queries/document/documentActions.js +15 -6
- package/dist/api/queries/document/documentActions.js.map +1 -1
- package/dist/api/queries/document/documents.d.ts +7 -7
- package/dist/api/queries/document/documents.js +20 -10
- package/dist/api/queries/document/documents.js.map +1 -1
- package/dist/api/queries/document/documentsOfTypeForCompany.d.ts +1 -1
- package/dist/api/queries/document/getDocumentURL.d.ts +1 -1
- package/dist/api/queries/document/searchDocumentsForCompany.d.ts +1 -1
- package/dist/api/queries/economy/checkIfAccountingAvailable.d.ts +1 -1
- package/dist/api/queries/economy/economicReports.d.ts +2 -2
- package/dist/api/queries/economy/invoiceArchive.d.ts +1 -1
- package/dist/api/queries/economy/invoiceForApprovalCount.d.ts +1 -1
- package/dist/api/queries/economy/invoiceNotification.d.ts +1 -1
- package/dist/api/queries/economy/invoices.d.ts +13 -13
- package/dist/api/queries/economy/invoices.js +26 -12
- package/dist/api/queries/economy/invoices.js.map +1 -1
- package/dist/api/queries/economy/status.d.ts +1 -1
- package/dist/api/queries/economy/unattestedCounts.d.ts +2 -2
- package/dist/api/queries/expense/expense.d.ts +1 -1
- package/dist/api/queries/expense/expenseList.d.ts +4 -4
- package/dist/api/queries/expense/expenseList.js +9 -4
- package/dist/api/queries/expense/expenseList.js.map +1 -1
- package/dist/api/queries/expense/expenseTypes.d.ts +1 -1
- package/dist/api/queries/hms/hMSReportRoutines.d.ts +1 -1
- package/dist/api/queries/hms/hMSSettings.d.ts +3 -3
- package/dist/api/queries/hms/hMSSettings.js +3 -3
- package/dist/api/queries/hms/hMSSettings.js.map +1 -1
- package/dist/api/queries/homepage/homepage.d.ts +10 -10
- package/dist/api/queries/homepage/homepage.js +26 -13
- package/dist/api/queries/homepage/homepage.js.map +1 -1
- package/dist/api/queries/homepage/homepageFeed.d.ts +2 -2
- package/dist/api/queries/homepage/openHomepageDocument.d.ts +1 -1
- package/dist/api/queries/homepage/openHomepageFeed.d.ts +2 -2
- package/dist/api/queries/homepage/postDocuments.d.ts +1 -1
- package/dist/api/queries/homepage/postNotificationgroups.d.ts +1 -1
- package/dist/api/queries/homepage/sMSAvailableForPost.d.ts +1 -1
- package/dist/api/queries/invoicing/adHocGroupById.d.ts +1 -1
- package/dist/api/queries/invoicing/adHocGroups.d.ts +1 -1
- package/dist/api/queries/invoicing/checkTriplewinActivated.d.ts +1 -1
- package/dist/api/queries/invoicing/creditNotes.d.ts +1 -1
- package/dist/api/queries/invoicing/customer.d.ts +1 -1
- package/dist/api/queries/invoicing/customerInvoices.d.ts +1 -1
- package/dist/api/queries/invoicing/customerMetadata.d.ts +1 -1
- package/dist/api/queries/invoicing/customerRecipient.d.ts +1 -1
- package/dist/api/queries/invoicing/customers.d.ts +1 -1
- package/dist/api/queries/invoicing/historicInvoices.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicePlan.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicePlanDistributions.d.ts +2 -2
- package/dist/api/queries/invoicing/invoicePlanLine.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicePlanLines.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicePlanTransactions.d.ts +2 -2
- package/dist/api/queries/invoicing/invoicePlans.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicePlansForSection.d.ts +1 -1
- package/dist/api/queries/invoicing/invoiceSettings.d.ts +1 -1
- package/dist/api/queries/invoicing/invoicingAdHocLines.d.ts +4 -4
- package/dist/api/queries/invoicing/invoicingInvoiceDetails.d.ts +5 -5
- package/dist/api/queries/invoicing/invoicingKeys.d.ts +39 -39
- package/dist/api/queries/invoicing/invoicingKeys.js +148 -61
- package/dist/api/queries/invoicing/invoicingKeys.js.map +1 -1
- package/dist/api/queries/invoicing/invoicingPlanTypes.d.ts +1 -1
- package/dist/api/queries/invoicing/massInvoiceForCompany.d.ts +1 -1
- package/dist/api/queries/invoicing/massInvoicePdfPreview.d.ts +1 -1
- package/dist/api/queries/invoicing/massInvoicePreview.d.ts +1 -1
- package/dist/api/queries/invoicing/planSettings.d.ts +1 -1
- package/dist/api/queries/invoicing/preview.d.ts +1 -1
- package/dist/api/queries/invoicing/previewPdf.d.ts +1 -1
- package/dist/api/queries/invoicing/queuedInvoicePdf.d.ts +1 -1
- package/dist/api/queries/invoicing/queuedInvoices.d.ts +1 -1
- package/dist/api/queries/invoicing/recipient.d.ts +1 -1
- package/dist/api/queries/issue/issue.d.ts +1 -1
- package/dist/api/queries/issue/issues.d.ts +3 -3
- package/dist/api/queries/issue/issues.js +3 -3
- package/dist/api/queries/issue/issues.js.map +1 -1
- package/dist/api/queries/meeting/meetings.d.ts +4 -4
- package/dist/api/queries/meeting/meetings.js +3 -3
- package/dist/api/queries/meeting/meetings.js.map +1 -1
- package/dist/api/queries/organization/organization.d.ts +1 -1
- package/dist/api/queries/organization/organizationsInCompany.d.ts +3 -3
- package/dist/api/queries/organization/organizationsInCompany.js +3 -3
- package/dist/api/queries/organization/organizationsInCompany.js.map +1 -1
- package/dist/api/queries/parkingSpaces/parkingSpaces.d.ts +4 -4
- package/dist/api/queries/parkingSpaces/parkingSpaces.js +8 -3
- package/dist/api/queries/parkingSpaces/parkingSpaces.js.map +1 -1
- package/dist/api/queries/person/person.d.ts +1 -1
- package/dist/api/queries/person/persons.d.ts +3 -3
- package/dist/api/queries/person/persons.js +3 -3
- package/dist/api/queries/person/persons.js.map +1 -1
- package/dist/api/queries/residentsAndSections/existingSectionTagsInCompany.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/loansByFraction.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/ownershipChanges.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/personalID.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/residentHistory.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/residentOccupancy.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/residentSearch.d.ts +2 -2
- package/dist/api/queries/residentsAndSections/residentTypes.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/residents.d.ts +8 -8
- package/dist/api/queries/residentsAndSections/residents.js +20 -10
- package/dist/api/queries/residentsAndSections/residents.js.map +1 -1
- package/dist/api/queries/residentsAndSections/sectionOccupancy.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/sectionStatus.d.ts +2 -2
- package/dist/api/queries/residentsAndSections/sectionTags.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/sectionTenants.d.ts +1 -1
- package/dist/api/queries/residentsAndSections/sections.d.ts +11 -11
- package/dist/api/queries/residentsAndSections/sections.js +37 -11
- package/dist/api/queries/residentsAndSections/sections.js.map +1 -1
- package/dist/api/queries/residentsAndSections/sectionsTags.d.ts +1 -1
- package/dist/api/queries/routines/availableRoutineTypes.d.ts +1 -1
- package/dist/api/queries/routines/companyFeatures.d.ts +1 -1
- package/dist/api/queries/routines/routine.d.ts +1 -1
- package/dist/api/queries/routines/routineGroupDrafts.d.ts +1 -1
- package/dist/api/queries/routines/routines.d.ts +6 -6
- package/dist/api/queries/routines/routines.js +16 -6
- package/dist/api/queries/routines/routines.js.map +1 -1
- package/dist/api/queries/settlement/settlement.d.ts +1 -1
- package/dist/api/queries/settlement/settlementCustomCost.d.ts +1 -1
- package/dist/api/queries/settlement/settlementCustomCosts.d.ts +1 -1
- package/dist/api/queries/settlement/settlementInvoices.d.ts +1 -1
- package/dist/api/queries/settlement/settlementProviderConfiguration.d.ts +1 -1
- package/dist/api/queries/settlement/settlementProviderConfigurations.d.ts +1 -1
- package/dist/api/queries/settlement/settlementProviders.d.ts +1 -1
- package/dist/api/queries/settlement/settlementTypes.d.ts +1 -1
- package/dist/api/queries/settlement/settlements.d.ts +10 -10
- package/dist/api/queries/settlement/settlements.js +27 -13
- package/dist/api/queries/settlement/settlements.js.map +1 -1
- package/dist/api/queries/storageRoom/storageRooms.d.ts +4 -4
- package/dist/api/queries/storageRoom/storageRooms.js +8 -3
- package/dist/api/queries/storageRoom/storageRooms.js.map +1 -1
- package/dist/api/queries/supplier/supplierContacts.d.ts +1 -1
- package/dist/api/queries/supplier/supplierDetails.d.ts +2 -2
- package/dist/api/queries/supplier/suppliers.d.ts +4 -4
- package/dist/api/queries/supplier/suppliers.js +12 -7
- package/dist/api/queries/supplier/suppliers.js.map +1 -1
- package/dist/api/queries/supplier/suppliersAndContacts.d.ts +2 -2
- package/dist/api/queries/task/tasks.d.ts +2 -2
- package/dist/api/queries/task/tasks.js +2 -2
- package/dist/api/queries/task/tasks.js.map +1 -1
- package/dist/api/queries/thirdPartyInformation/singleThirdPartyInformation.d.ts +1 -1
- package/dist/api/queries/thirdPartyInformation/skatteetatenDialog.d.ts +1 -1
- package/dist/api/queries/thirdPartyInformation/thirdPartyInformation.d.ts +8 -8
- package/dist/api/queries/thirdPartyInformation/thirdPartyInformation.js +18 -13
- package/dist/api/queries/thirdPartyInformation/thirdPartyInformation.js.map +1 -1
- package/dist/api/queries/thirdPartyInformation/thirdPartyInformationLetters.d.ts +2 -2
- package/dist/api/queries/thirdPartyInformation/totalsForThirdPartyInformation.d.ts +1 -1
- package/dist/api/queries/user/user.d.ts +2 -2
- package/dist/api/queries/user/user.js +3 -3
- package/dist/api/queries/user/user.js.map +1 -1
- package/dist/api/queries/user/userActions.d.ts +1 -1
- package/dist/api/queries/user/userImage.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/kt-bridge.d.ts +12 -0
- package/dist/utils/kt-bridge.js +5 -0
- package/dist/utils/kt-bridge.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,137 +1,224 @@
|
|
|
1
|
+
import { toKeyId } from "../../../utils/kt-bridge.js";
|
|
1
2
|
export const invoicingKeys = {
|
|
2
3
|
all: ["invoicing"],
|
|
3
4
|
// Customers
|
|
4
|
-
customers: (companyId) => [...invoicingKeys.all, "customers", companyId],
|
|
5
|
+
customers: (companyId) => [...invoicingKeys.all, "customers", toKeyId(companyId)],
|
|
5
6
|
customerDetail: (companyId, customerId, type) => [
|
|
6
7
|
...invoicingKeys.all,
|
|
7
8
|
"customerDetail",
|
|
8
|
-
companyId,
|
|
9
|
-
customerId,
|
|
9
|
+
toKeyId(companyId),
|
|
10
|
+
toKeyId(customerId),
|
|
10
11
|
type,
|
|
11
12
|
],
|
|
12
|
-
customerInvoices: (companyId, customerId) => [
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
customerInvoices: (companyId, customerId) => [
|
|
14
|
+
...invoicingKeys.all,
|
|
15
|
+
"customerInvoices",
|
|
16
|
+
toKeyId(companyId),
|
|
17
|
+
toKeyId(customerId),
|
|
18
|
+
],
|
|
19
|
+
customerMeta: (companyId, customerId) => [
|
|
20
|
+
...invoicingKeys.all,
|
|
21
|
+
"customerMeta",
|
|
22
|
+
toKeyId(companyId),
|
|
23
|
+
toKeyId(customerId),
|
|
24
|
+
],
|
|
25
|
+
customerRecipient: (companyId, personId) => [
|
|
26
|
+
...invoicingKeys.all,
|
|
27
|
+
"customerRecipient",
|
|
28
|
+
toKeyId(companyId),
|
|
29
|
+
toKeyId(personId),
|
|
30
|
+
],
|
|
15
31
|
// Invoice Plans
|
|
16
|
-
plans: (companyId, active, type) => [...invoicingKeys.all, "plans", companyId, active, type],
|
|
17
|
-
planDetail: (companyId, planId) => [
|
|
18
|
-
|
|
32
|
+
plans: (companyId, active, type) => [...invoicingKeys.all, "plans", toKeyId(companyId), active, type],
|
|
33
|
+
planDetail: (companyId, planId) => [
|
|
34
|
+
...invoicingKeys.all,
|
|
35
|
+
"planDetail",
|
|
36
|
+
toKeyId(companyId),
|
|
37
|
+
toKeyId(planId),
|
|
38
|
+
],
|
|
39
|
+
planLines: (companyId, planId) => [
|
|
40
|
+
...invoicingKeys.all,
|
|
41
|
+
"planLines",
|
|
42
|
+
toKeyId(companyId),
|
|
43
|
+
toKeyId(planId),
|
|
44
|
+
],
|
|
19
45
|
planLineDetail: (companyId, invoicePlanId, invoiceLineId) => [
|
|
20
46
|
...invoicingKeys.all,
|
|
21
47
|
"planLineDetail",
|
|
22
|
-
companyId,
|
|
23
|
-
invoicePlanId,
|
|
24
|
-
invoiceLineId,
|
|
48
|
+
toKeyId(companyId),
|
|
49
|
+
toKeyId(invoicePlanId),
|
|
50
|
+
toKeyId(invoiceLineId),
|
|
25
51
|
],
|
|
26
52
|
planDistributions: (companyId, invoicePlanId) => [
|
|
27
53
|
...invoicingKeys.all,
|
|
28
54
|
"planDistributions",
|
|
29
|
-
companyId,
|
|
30
|
-
invoicePlanId,
|
|
55
|
+
toKeyId(companyId),
|
|
56
|
+
toKeyId(invoicePlanId),
|
|
31
57
|
],
|
|
32
58
|
planDistribution: (companyId, invoicePlanId, distributionId) => [
|
|
33
59
|
...invoicingKeys.all,
|
|
34
60
|
"planDistribution",
|
|
35
|
-
companyId,
|
|
36
|
-
invoicePlanId,
|
|
37
|
-
distributionId,
|
|
61
|
+
toKeyId(companyId),
|
|
62
|
+
toKeyId(invoicePlanId),
|
|
63
|
+
toKeyId(distributionId),
|
|
38
64
|
],
|
|
39
65
|
planTransactions: (companyId, invoicePlanId) => [
|
|
40
66
|
...invoicingKeys.all,
|
|
41
67
|
"planTransactions",
|
|
42
|
-
companyId,
|
|
43
|
-
invoicePlanId,
|
|
68
|
+
toKeyId(companyId),
|
|
69
|
+
toKeyId(invoicePlanId),
|
|
44
70
|
],
|
|
45
71
|
planTransactionInvoices: (companyId, invoicePlanId, transactionId) => [
|
|
46
72
|
...invoicingKeys.all,
|
|
47
73
|
"planTransactionInvoices",
|
|
48
|
-
companyId,
|
|
49
|
-
invoicePlanId,
|
|
50
|
-
transactionId,
|
|
74
|
+
toKeyId(companyId),
|
|
75
|
+
toKeyId(invoicePlanId),
|
|
76
|
+
toKeyId(transactionId),
|
|
51
77
|
],
|
|
52
|
-
plansForSection: (companyId, sectionId) => [
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
plansForSection: (companyId, sectionId) => [
|
|
79
|
+
...invoicingKeys.all,
|
|
80
|
+
"plansForSection",
|
|
81
|
+
toKeyId(companyId),
|
|
82
|
+
toKeyId(sectionId),
|
|
83
|
+
],
|
|
84
|
+
planSettings: (companyId, planId) => [
|
|
85
|
+
...invoicingKeys.all,
|
|
86
|
+
"planSettings",
|
|
87
|
+
toKeyId(companyId),
|
|
88
|
+
toKeyId(planId),
|
|
89
|
+
],
|
|
90
|
+
planTypes: (companyId) => [...invoicingKeys.all, "planTypes", toKeyId(companyId)],
|
|
55
91
|
// Invoice Settings
|
|
56
|
-
settings: (companyId) => [...invoicingKeys.all, "settings", companyId],
|
|
92
|
+
settings: (companyId) => [...invoicingKeys.all, "settings", toKeyId(companyId)],
|
|
57
93
|
// Ad Hoc
|
|
58
|
-
adHocGroups: (companyId) => [...invoicingKeys.all, "adHocGroups", companyId],
|
|
59
|
-
adHocGroupDetail: (companyId, groupId) => [
|
|
94
|
+
adHocGroups: (companyId) => [...invoicingKeys.all, "adHocGroups", toKeyId(companyId)],
|
|
95
|
+
adHocGroupDetail: (companyId, groupId) => [
|
|
96
|
+
...invoicingKeys.all,
|
|
97
|
+
"adHocGroupDetail",
|
|
98
|
+
toKeyId(companyId),
|
|
99
|
+
toKeyId(groupId),
|
|
100
|
+
],
|
|
60
101
|
adHocLines: (companyId, type, id, adhocLineId) => [
|
|
61
102
|
...invoicingKeys.all,
|
|
62
103
|
"adHocLines",
|
|
63
|
-
companyId,
|
|
104
|
+
toKeyId(companyId),
|
|
64
105
|
type,
|
|
65
|
-
id,
|
|
66
|
-
adhocLineId,
|
|
106
|
+
toKeyId(id),
|
|
107
|
+
toKeyId(adhocLineId),
|
|
108
|
+
],
|
|
109
|
+
planAdHocLines: (companyId, invoicePlanId) => [
|
|
110
|
+
...invoicingKeys.all,
|
|
111
|
+
"planAdHocLines",
|
|
112
|
+
toKeyId(companyId),
|
|
113
|
+
toKeyId(invoicePlanId),
|
|
67
114
|
],
|
|
68
|
-
planAdHocLines: (companyId, invoicePlanId) => [...invoicingKeys.all, "planAdHocLines", companyId, invoicePlanId],
|
|
69
115
|
// Invoices & Queued
|
|
70
|
-
queuedInvoices: (companyId) => [...invoicingKeys.all, "queuedInvoices", companyId],
|
|
71
|
-
queuedInvoicePdf: (companyId, invoiceId) => [
|
|
116
|
+
queuedInvoices: (companyId) => [...invoicingKeys.all, "queuedInvoices", toKeyId(companyId)],
|
|
117
|
+
queuedInvoicePdf: (companyId, invoiceId) => [
|
|
118
|
+
...invoicingKeys.all,
|
|
119
|
+
"queuedInvoicePdf",
|
|
120
|
+
toKeyId(companyId),
|
|
121
|
+
invoiceId,
|
|
122
|
+
],
|
|
72
123
|
historicInvoices: (companyId, periodStart, periodEnd) => [
|
|
73
124
|
...invoicingKeys.all,
|
|
74
125
|
"historicInvoices",
|
|
75
|
-
companyId,
|
|
76
|
-
periodStart,
|
|
77
|
-
periodEnd,
|
|
126
|
+
toKeyId(companyId),
|
|
127
|
+
toKeyId(periodStart),
|
|
128
|
+
toKeyId(periodEnd),
|
|
129
|
+
],
|
|
130
|
+
creditNotes: (companyId, invoiceId) => [
|
|
131
|
+
...invoicingKeys.all,
|
|
132
|
+
"creditNotes",
|
|
133
|
+
toKeyId(companyId),
|
|
134
|
+
invoiceId,
|
|
135
|
+
],
|
|
136
|
+
sectionInvoices: (companyId, sectionId) => [
|
|
137
|
+
...invoicingKeys.all,
|
|
138
|
+
"sectionInvoices",
|
|
139
|
+
toKeyId(companyId),
|
|
140
|
+
toKeyId(sectionId),
|
|
78
141
|
],
|
|
79
|
-
creditNotes: (companyId, invoiceId) => [...invoicingKeys.all, "creditNotes", companyId, invoiceId],
|
|
80
|
-
sectionInvoices: (companyId, sectionId) => [...invoicingKeys.all, "sectionInvoices", companyId, sectionId],
|
|
81
142
|
// Mass Invoice
|
|
82
|
-
massInvoice: (companyId) => [...invoicingKeys.all, "massInvoice", companyId],
|
|
83
|
-
massInvoicePreview: (companyId, groupId) => [
|
|
143
|
+
massInvoice: (companyId) => [...invoicingKeys.all, "massInvoice", toKeyId(companyId)],
|
|
144
|
+
massInvoicePreview: (companyId, groupId) => [
|
|
145
|
+
...invoicingKeys.all,
|
|
146
|
+
"massInvoicePreview",
|
|
147
|
+
toKeyId(companyId),
|
|
148
|
+
toKeyId(groupId),
|
|
149
|
+
],
|
|
84
150
|
massInvoicePdf: (companyId, groupId, iterator) => [
|
|
85
151
|
...invoicingKeys.all,
|
|
86
152
|
"massInvoicePdf",
|
|
87
|
-
companyId,
|
|
88
|
-
groupId,
|
|
89
|
-
iterator,
|
|
153
|
+
toKeyId(companyId),
|
|
154
|
+
toKeyId(groupId),
|
|
155
|
+
toKeyId(iterator),
|
|
90
156
|
],
|
|
91
157
|
// Preview
|
|
92
|
-
preview: (companyId, plan, at) => [
|
|
158
|
+
preview: (companyId, plan, at) => [
|
|
159
|
+
...invoicingKeys.all,
|
|
160
|
+
"preview",
|
|
161
|
+
toKeyId(companyId),
|
|
162
|
+
toKeyId(plan),
|
|
163
|
+
toKeyId(at),
|
|
164
|
+
],
|
|
93
165
|
previewPdf: (companyId, customerId, customerType, sectionId, planId, at) => [
|
|
94
166
|
...invoicingKeys.all,
|
|
95
167
|
"previewPdf",
|
|
96
|
-
companyId,
|
|
97
|
-
customerId,
|
|
98
|
-
sectionId,
|
|
168
|
+
toKeyId(companyId),
|
|
169
|
+
toKeyId(customerId),
|
|
170
|
+
toKeyId(sectionId),
|
|
99
171
|
customerType,
|
|
100
|
-
planId,
|
|
101
|
-
at,
|
|
172
|
+
toKeyId(planId),
|
|
173
|
+
toKeyId(at),
|
|
102
174
|
],
|
|
103
175
|
// Recipients
|
|
104
|
-
recipient: (companyId, sectionId) => [
|
|
176
|
+
recipient: (companyId, sectionId) => [
|
|
177
|
+
...invoicingKeys.all,
|
|
178
|
+
"recipient",
|
|
179
|
+
toKeyId(companyId),
|
|
180
|
+
toKeyId(sectionId),
|
|
181
|
+
],
|
|
105
182
|
// Invoice Details
|
|
106
|
-
invoicePayments: (companyId, invoiceId) => [
|
|
107
|
-
|
|
183
|
+
invoicePayments: (companyId, invoiceId) => [
|
|
184
|
+
...invoicingKeys.all,
|
|
185
|
+
"invoicePayments",
|
|
186
|
+
toKeyId(companyId),
|
|
187
|
+
invoiceId,
|
|
188
|
+
],
|
|
189
|
+
invoicePdfs: (companyId, invoiceIds) => [
|
|
190
|
+
...invoicingKeys.all,
|
|
191
|
+
"invoicePdfs",
|
|
192
|
+
toKeyId(companyId),
|
|
193
|
+
invoiceIds,
|
|
194
|
+
],
|
|
108
195
|
customerInvoicePdf: (companyId, customerType, customerId, invoiceId) => [
|
|
109
196
|
...invoicingKeys.all,
|
|
110
197
|
"customerInvoicePdf",
|
|
111
|
-
companyId,
|
|
198
|
+
toKeyId(companyId),
|
|
112
199
|
customerType,
|
|
113
|
-
customerId,
|
|
200
|
+
toKeyId(customerId),
|
|
114
201
|
invoiceId,
|
|
115
202
|
],
|
|
116
203
|
customerInvoiceOverdueFirstPdf: (companyId, customerType, customerId, invoiceId) => [
|
|
117
204
|
...invoicingKeys.all,
|
|
118
205
|
"customerInvoiceOverdueFirstPdf",
|
|
119
|
-
companyId,
|
|
206
|
+
toKeyId(companyId),
|
|
120
207
|
customerType,
|
|
121
|
-
customerId,
|
|
208
|
+
toKeyId(customerId),
|
|
122
209
|
invoiceId,
|
|
123
210
|
],
|
|
124
211
|
customerInvoiceOverdueSecondPdf: (companyId, customerType, customerId, invoiceId) => [
|
|
125
212
|
...invoicingKeys.all,
|
|
126
213
|
"customerInvoiceOverdueSecondPdf",
|
|
127
|
-
companyId,
|
|
214
|
+
toKeyId(companyId),
|
|
128
215
|
customerType,
|
|
129
|
-
customerId,
|
|
216
|
+
toKeyId(customerId),
|
|
130
217
|
invoiceId,
|
|
131
218
|
],
|
|
132
219
|
// Triplewin
|
|
133
|
-
triplewinActivated: (companyId) => [...invoicingKeys.all, "triplewinActivated", companyId],
|
|
134
|
-
triplewin: (companyId) => [...invoicingKeys.all, "triplewin", companyId],
|
|
220
|
+
triplewinActivated: (companyId) => [...invoicingKeys.all, "triplewinActivated", toKeyId(companyId)],
|
|
221
|
+
triplewin: (companyId) => [...invoicingKeys.all, "triplewin", toKeyId(companyId)],
|
|
135
222
|
// Overdue & Expired
|
|
136
223
|
overdueInvoices: (expiredType) => [...invoicingKeys.all, "overdueInvoices", expiredType],
|
|
137
224
|
expiredInvoices: () => [...invoicingKeys.all, "expiredInvoices"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoicingKeys.js","sourceRoot":"","sources":["../../../../src/api/queries/invoicing/invoicingKeys.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,CAAC,WAAW,CAAU;IAE3B,YAAY;IACZ,SAAS,EAAE,CAAC,SAAiC,EAAE,EAAE,CAC/C,CAAC,GAAG,a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B,OAAgB,EAChB,cAAwB,EACxB,EAAE,CACF;QACE,GAAG,aAAa,CAAC,GAAG;QACpB,2BAA2B;QAC3B,MAAM;QACN,SAAS;QACT,OAAO;QACP,cAAc;KACN;IAEZ,sBAAsB;IACtB,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAU;IAC7E,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAU;IAC7E,mBAAmB,EAAE,GAAG,EAAE,CACxB,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,qBAAqB,CAAU;CACzD,CAAC","sourcesContent":["import type {\n CustomerType,\n ExpiredType,\n InvoicePlanType,\n PayerType,\n} from \"@solibo/solibo-sdk\";\n\nimport { Id } from \"../../../utils/kt-bridge.js\";\n\nexport const invoicingKeys = {\n all: [\"invoicing\"] as const,\n\n // Customers\n customers: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"customers\", companyId] as const,\n customerDetail: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n type?: CustomerType,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerDetail\",\n companyId,\n customerId,\n type,\n ] as const,\n customerInvoices: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n ) =>\n [...invoicingKeys.all, \"customerInvoices\", companyId, customerId] as const,\n customerMeta: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"customerMeta\", companyId, customerId] as const,\n customerRecipient: (\n companyId?: Id | null | undefined,\n personId?: Id | null | undefined,\n ) =>\n [...invoicingKeys.all, \"customerRecipient\", companyId, personId] as const,\n\n // Invoice Plans\n plans: (\n companyId?: Id | null | undefined,\n active?: boolean,\n type?: InvoicePlanType,\n ) => [...invoicingKeys.all, \"plans\", companyId, active, type] as const,\n planDetail: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"planDetail\", companyId, planId] as const,\n planLines: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"planLines\", companyId, planId] as const,\n planLineDetail: (\n companyId?: Id | null | undefined,\n invoicePlanId?: Id | null | undefined,\n invoiceLineId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planLineDetail\",\n companyId,\n invoicePlanId,\n invoiceLineId,\n ] as const,\n planDistributions: (companyId: Id, invoicePlanId: Id) =>\n [\n ...invoicingKeys.all,\n \"planDistributions\",\n companyId,\n invoicePlanId,\n ] as const,\n planDistribution: (companyId: Id, invoicePlanId: Id, distributionId: Id) =>\n [\n ...invoicingKeys.all,\n \"planDistribution\",\n companyId,\n invoicePlanId,\n distributionId,\n ] as const,\n planTransactions: (companyId: Id, invoicePlanId: Id) =>\n [\n ...invoicingKeys.all,\n \"planTransactions\",\n companyId,\n invoicePlanId,\n ] as const,\n planTransactionInvoices: (\n companyId: Id,\n invoicePlanId: Id,\n transactionId: Id,\n ) =>\n [\n ...invoicingKeys.all,\n \"planTransactionInvoices\",\n companyId,\n invoicePlanId,\n transactionId,\n ] as const,\n plansForSection: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"plansForSection\", companyId, sectionId] as const,\n planSettings: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"planSettings\", companyId, planId] as const,\n planTypes: (companyId?: Id) =>\n [...invoicingKeys.all, \"planTypes\", companyId] as const,\n\n // Invoice Settings\n settings: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"settings\", companyId] as const,\n\n // Ad Hoc\n adHocGroups: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"adHocGroups\", companyId] as const,\n adHocGroupDetail: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"adHocGroupDetail\", companyId, groupId] as const,\n adHocLines: (\n companyId: Id,\n type: \"organization\" | \"person\" | \"section\",\n id: Id,\n adhocLineId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"adHocLines\",\n companyId,\n type,\n id,\n adhocLineId,\n ] as const,\n planAdHocLines: (\n companyId?: Id | null | undefined,\n invoicePlanId?: Id | null | undefined,\n ) =>\n [...invoicingKeys.all, \"planAdHocLines\", companyId, invoicePlanId] as const,\n\n // Invoices & Queued\n queuedInvoices: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"queuedInvoices\", companyId] as const,\n queuedInvoicePdf: (companyId?: Id | null | undefined, invoiceId?: string) =>\n [...invoicingKeys.all, \"queuedInvoicePdf\", companyId, invoiceId] as const,\n historicInvoices: (\n companyId?: Id | null | undefined,\n periodStart?: Id | null | undefined,\n periodEnd?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"historicInvoices\",\n companyId,\n periodStart,\n periodEnd,\n ] as const,\n creditNotes: (companyId?: Id | null | undefined, invoiceId?: string) =>\n [...invoicingKeys.all, \"creditNotes\", companyId, invoiceId] as const,\n sectionInvoices: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"sectionInvoices\", companyId, sectionId] as const,\n\n // Mass Invoice\n massInvoice: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"massInvoice\", companyId] as const,\n massInvoicePreview: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n ) =>\n [...invoicingKeys.all, \"massInvoicePreview\", companyId, groupId] as const,\n massInvoicePdf: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n iterator?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"massInvoicePdf\",\n companyId,\n groupId,\n iterator,\n ] as const,\n\n // Preview\n preview: (\n companyId?: Id | null | undefined,\n plan?: Id | null | undefined,\n at?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"preview\", companyId, plan, at] as const,\n previewPdf: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n customerType?: string,\n sectionId?: Id | null | undefined,\n planId?: Id | null | undefined,\n at?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"previewPdf\",\n companyId,\n customerId,\n sectionId,\n customerType,\n planId,\n at,\n ] as const,\n\n // Recipients\n recipient: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) => [...invoicingKeys.all, \"recipient\", companyId, sectionId] as const,\n\n // Invoice Details\n invoicePayments: (companyId: Id, invoiceId: string) =>\n [...invoicingKeys.all, \"invoicePayments\", companyId, invoiceId] as const,\n invoicePdfs: (companyId: Id, invoiceIds: string[]) =>\n [...invoicingKeys.all, \"invoicePdfs\", companyId, invoiceIds] as const,\n customerInvoicePdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoicePdf\",\n companyId,\n customerType,\n customerId,\n invoiceId,\n ] as const,\n customerInvoiceOverdueFirstPdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoiceOverdueFirstPdf\",\n companyId,\n customerType,\n customerId,\n invoiceId,\n ] as const,\n customerInvoiceOverdueSecondPdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoiceOverdueSecondPdf\",\n companyId,\n customerType,\n customerId,\n invoiceId,\n ] as const,\n\n // Triplewin\n triplewinActivated: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"triplewinActivated\", companyId] as const,\n triplewin: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"triplewin\", companyId] as const,\n\n // Overdue & Expired\n overdueInvoices: (expiredType: ExpiredType) =>\n [...invoicingKeys.all, \"overdueInvoices\", expiredType] as const,\n expiredInvoices: () => [...invoicingKeys.all, \"expiredInvoices\"] as const,\n expiredTypes: () => [...invoicingKeys.all, \"expiredTypes\"] as const,\n expiredByCustomer: (\n tenant?: string,\n payerType?: PayerType,\n payerId?: string,\n invoiceIds?: string[],\n ) =>\n [\n ...invoicingKeys.all,\n \"expiredByCustomer\",\n tenant,\n payerType,\n payerId,\n invoiceIds,\n ] as const,\n redirectExpiredByCustomer: (\n tenant?: string,\n payerType?: PayerType,\n payerId?: string,\n shouldRedirect?: boolean,\n ) =>\n [\n ...invoicingKeys.all,\n \"redirectExpiredByCustomer\",\n tenant,\n payerType,\n payerId,\n shouldRedirect,\n ] as const,\n\n // Upcoming & Payments\n upcomingInvoicing: () => [...invoicingKeys.all, \"upcomingInvoicing\"] as const,\n processedPayments: () => [...invoicingKeys.all, \"processedPayments\"] as const,\n unprocessedPayments: () =>\n [...invoicingKeys.all, \"unprocessedPayments\"] as const,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"invoicingKeys.js","sourceRoot":"","sources":["../../../../src/api/queries/invoicing/invoicingKeys.ts"],"names":[],"mappings":"AAOA,OAAO,EAAM,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,CAAC,WAAW,CAAU;IAE3B,YAAY;IACZ,SAAS,EAAE,CAAC,SAAiC,EAAE,EAAE,CAC/C,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,CAAU;IAClE,cAAc,EAAE,CACd,SAAiC,EACjC,UAAkC,EAClC,IAAmB,EACnB,EAAE,CACF;QACE,GAAG,aAAa,CAAC,GAAG;QACpB,gBAAgB;QAChB,OAAO,CAAC,SAAS,CAAC;QAClB,OAAO,CAAC,UAAU,CAAC;QACnB,IAAI;KACI;IACZ,gBAAgB,EAAE,CAChB,SAAiC,EACjC,UAAkC,EAClC,EAAE,CACF;QACE,GAAG,aA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E,GAAG,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,mBAAmB,CAAU;IAC7E,mBAAmB,EAAE,GAAG,EAAE,CACxB,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,qBAAqB,CAAU;CACzD,CAAC","sourcesContent":["import type {\n CustomerType,\n ExpiredType,\n InvoicePlanType,\n PayerType,\n} from \"@solibo/solibo-sdk\";\n\nimport { Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nexport const invoicingKeys = {\n all: [\"invoicing\"] as const,\n\n // Customers\n customers: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"customers\", toKeyId(companyId)] as const,\n customerDetail: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n type?: CustomerType,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerDetail\",\n toKeyId(companyId),\n toKeyId(customerId),\n type,\n ] as const,\n customerInvoices: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoices\",\n toKeyId(companyId),\n toKeyId(customerId),\n ] as const,\n customerMeta: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerMeta\",\n toKeyId(companyId),\n toKeyId(customerId),\n ] as const,\n customerRecipient: (\n companyId?: Id | null | undefined,\n personId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerRecipient\",\n toKeyId(companyId),\n toKeyId(personId),\n ] as const,\n\n // Invoice Plans\n plans: (\n companyId?: Id | null | undefined,\n active?: boolean,\n type?: InvoicePlanType,\n ) =>\n [...invoicingKeys.all, \"plans\", toKeyId(companyId), active, type] as const,\n planDetail: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planDetail\",\n toKeyId(companyId),\n toKeyId(planId),\n ] as const,\n planLines: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planLines\",\n toKeyId(companyId),\n toKeyId(planId),\n ] as const,\n planLineDetail: (\n companyId?: Id | null | undefined,\n invoicePlanId?: Id | null | undefined,\n invoiceLineId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planLineDetail\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n toKeyId(invoiceLineId),\n ] as const,\n planDistributions: (companyId: Id, invoicePlanId: Id) =>\n [\n ...invoicingKeys.all,\n \"planDistributions\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n ] as const,\n planDistribution: (companyId: Id, invoicePlanId: Id, distributionId: Id) =>\n [\n ...invoicingKeys.all,\n \"planDistribution\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n toKeyId(distributionId),\n ] as const,\n planTransactions: (companyId: Id, invoicePlanId: Id) =>\n [\n ...invoicingKeys.all,\n \"planTransactions\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n ] as const,\n planTransactionInvoices: (\n companyId: Id,\n invoicePlanId: Id,\n transactionId: Id,\n ) =>\n [\n ...invoicingKeys.all,\n \"planTransactionInvoices\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n toKeyId(transactionId),\n ] as const,\n plansForSection: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"plansForSection\",\n toKeyId(companyId),\n toKeyId(sectionId),\n ] as const,\n planSettings: (\n companyId?: Id | null | undefined,\n planId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planSettings\",\n toKeyId(companyId),\n toKeyId(planId),\n ] as const,\n planTypes: (companyId?: Id) =>\n [...invoicingKeys.all, \"planTypes\", toKeyId(companyId)] as const,\n\n // Invoice Settings\n settings: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"settings\", toKeyId(companyId)] as const,\n\n // Ad Hoc\n adHocGroups: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"adHocGroups\", toKeyId(companyId)] as const,\n adHocGroupDetail: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"adHocGroupDetail\",\n toKeyId(companyId),\n toKeyId(groupId),\n ] as const,\n adHocLines: (\n companyId: Id,\n type: \"organization\" | \"person\" | \"section\",\n id: Id,\n adhocLineId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"adHocLines\",\n toKeyId(companyId),\n type,\n toKeyId(id),\n toKeyId(adhocLineId),\n ] as const,\n planAdHocLines: (\n companyId?: Id | null | undefined,\n invoicePlanId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"planAdHocLines\",\n toKeyId(companyId),\n toKeyId(invoicePlanId),\n ] as const,\n\n // Invoices & Queued\n queuedInvoices: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"queuedInvoices\", toKeyId(companyId)] as const,\n queuedInvoicePdf: (companyId?: Id | null | undefined, invoiceId?: string) =>\n [\n ...invoicingKeys.all,\n \"queuedInvoicePdf\",\n toKeyId(companyId),\n invoiceId,\n ] as const,\n historicInvoices: (\n companyId?: Id | null | undefined,\n periodStart?: Id | null | undefined,\n periodEnd?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"historicInvoices\",\n toKeyId(companyId),\n toKeyId(periodStart),\n toKeyId(periodEnd),\n ] as const,\n creditNotes: (companyId?: Id | null | undefined, invoiceId?: string) =>\n [\n ...invoicingKeys.all,\n \"creditNotes\",\n toKeyId(companyId),\n invoiceId,\n ] as const,\n sectionInvoices: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"sectionInvoices\",\n toKeyId(companyId),\n toKeyId(sectionId),\n ] as const,\n\n // Mass Invoice\n massInvoice: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"massInvoice\", toKeyId(companyId)] as const,\n massInvoicePreview: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"massInvoicePreview\",\n toKeyId(companyId),\n toKeyId(groupId),\n ] as const,\n massInvoicePdf: (\n companyId?: Id | null | undefined,\n groupId?: Id | null | undefined,\n iterator?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"massInvoicePdf\",\n toKeyId(companyId),\n toKeyId(groupId),\n toKeyId(iterator),\n ] as const,\n\n // Preview\n preview: (\n companyId?: Id | null | undefined,\n plan?: Id | null | undefined,\n at?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"preview\",\n toKeyId(companyId),\n toKeyId(plan),\n toKeyId(at),\n ] as const,\n previewPdf: (\n companyId?: Id | null | undefined,\n customerId?: Id | null | undefined,\n customerType?: string,\n sectionId?: Id | null | undefined,\n planId?: Id | null | undefined,\n at?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"previewPdf\",\n toKeyId(companyId),\n toKeyId(customerId),\n toKeyId(sectionId),\n customerType,\n toKeyId(planId),\n toKeyId(at),\n ] as const,\n\n // Recipients\n recipient: (\n companyId?: Id | null | undefined,\n sectionId?: Id | null | undefined,\n ) =>\n [\n ...invoicingKeys.all,\n \"recipient\",\n toKeyId(companyId),\n toKeyId(sectionId),\n ] as const,\n\n // Invoice Details\n invoicePayments: (companyId: Id, invoiceId: string) =>\n [\n ...invoicingKeys.all,\n \"invoicePayments\",\n toKeyId(companyId),\n invoiceId,\n ] as const,\n invoicePdfs: (companyId: Id, invoiceIds: string[]) =>\n [\n ...invoicingKeys.all,\n \"invoicePdfs\",\n toKeyId(companyId),\n invoiceIds,\n ] as const,\n customerInvoicePdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoicePdf\",\n toKeyId(companyId),\n customerType,\n toKeyId(customerId),\n invoiceId,\n ] as const,\n customerInvoiceOverdueFirstPdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoiceOverdueFirstPdf\",\n toKeyId(companyId),\n customerType,\n toKeyId(customerId),\n invoiceId,\n ] as const,\n customerInvoiceOverdueSecondPdf: (\n companyId?: Id | null | undefined,\n customerType?: string,\n customerId?: Id | null | undefined,\n invoiceId?: string,\n ) =>\n [\n ...invoicingKeys.all,\n \"customerInvoiceOverdueSecondPdf\",\n toKeyId(companyId),\n customerType,\n toKeyId(customerId),\n invoiceId,\n ] as const,\n\n // Triplewin\n triplewinActivated: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"triplewinActivated\", toKeyId(companyId)] as const,\n triplewin: (companyId?: Id | null | undefined) =>\n [...invoicingKeys.all, \"triplewin\", toKeyId(companyId)] as const,\n\n // Overdue & Expired\n overdueInvoices: (expiredType: ExpiredType) =>\n [...invoicingKeys.all, \"overdueInvoices\", expiredType] as const,\n expiredInvoices: () => [...invoicingKeys.all, \"expiredInvoices\"] as const,\n expiredTypes: () => [...invoicingKeys.all, \"expiredTypes\"] as const,\n expiredByCustomer: (\n tenant?: string,\n payerType?: PayerType,\n payerId?: string,\n invoiceIds?: string[],\n ) =>\n [\n ...invoicingKeys.all,\n \"expiredByCustomer\",\n tenant,\n payerType,\n payerId,\n invoiceIds,\n ] as const,\n redirectExpiredByCustomer: (\n tenant?: string,\n payerType?: PayerType,\n payerId?: string,\n shouldRedirect?: boolean,\n ) =>\n [\n ...invoicingKeys.all,\n \"redirectExpiredByCustomer\",\n tenant,\n payerType,\n payerId,\n shouldRedirect,\n ] as const,\n\n // Upcoming & Payments\n upcomingInvoicing: () => [...invoicingKeys.all, \"upcomingInvoicing\"] as const,\n processedPayments: () => [...invoicingKeys.all, \"processedPayments\"] as const,\n unprocessedPayments: () =>\n [...invoicingKeys.all, \"unprocessedPayments\"] as const,\n};\n"]}
|
|
@@ -7,7 +7,7 @@ export declare function invoicingPlanTypesQueryOptions(sdk: SoliboSDK, companyId
|
|
|
7
7
|
count?: number;
|
|
8
8
|
}): {
|
|
9
9
|
initialPageParam: string | undefined;
|
|
10
|
-
queryKey: (string | number | readonly ["invoicing", "planTypes",
|
|
10
|
+
queryKey: (string | number | readonly ["invoicing", "planTypes", string | number | null | undefined] | undefined)[];
|
|
11
11
|
queryFn: ({ pageParam }: {
|
|
12
12
|
pageParam: any;
|
|
13
13
|
}) => Promise<import("@solibo/solibo-sdk").PagedListInvoicePlanType>;
|
|
@@ -10,7 +10,7 @@ export declare function massInvoiceForCompanyQueryOptions(sdk: SoliboSDK, params
|
|
|
10
10
|
count?: number;
|
|
11
11
|
}): {
|
|
12
12
|
initialPageParam: string | undefined;
|
|
13
|
-
queryKey: (string | number | boolean | readonly ["invoicing", "massInvoice",
|
|
13
|
+
queryKey: (string | number | boolean | readonly ["invoicing", "massInvoice", string | number | null | undefined] | null | undefined)[];
|
|
14
14
|
queryFn: ({ pageParam }: {
|
|
15
15
|
pageParam: any;
|
|
16
16
|
}) => Promise<import("@solibo/solibo-sdk").PagedListAdHocInvoiceLine>;
|
|
@@ -6,7 +6,7 @@ export declare function massInvoicePdfPreviewQueryOptions(sdk: SoliboSDK, params
|
|
|
6
6
|
iterator?: Id | null | undefined;
|
|
7
7
|
fields?: string;
|
|
8
8
|
}): {
|
|
9
|
-
queryKey: (string | readonly ["invoicing", "massInvoicePdf",
|
|
9
|
+
queryKey: (string | readonly ["invoicing", "massInvoicePdf", string | number | null | undefined, string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
10
10
|
queryFn: () => Promise<import("@solibo/solibo-sdk").InvoiceResultPreview>;
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
};
|
|
@@ -9,7 +9,7 @@ export declare function massInvoicePreviewQueryOptions(sdk: SoliboSDK, params: {
|
|
|
9
9
|
count?: number;
|
|
10
10
|
}): {
|
|
11
11
|
initialPageParam: string | undefined;
|
|
12
|
-
queryKey: (string | number | readonly ["invoicing", "massInvoicePreview",
|
|
12
|
+
queryKey: (string | number | readonly ["invoicing", "massInvoicePreview", string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
13
13
|
queryFn: ({ pageParam }: {
|
|
14
14
|
pageParam: any;
|
|
15
15
|
}) => Promise<import("@solibo/solibo-sdk").PagedListInvoicePreview>;
|
|
@@ -7,7 +7,7 @@ export declare function planSettingsQueryOptions(sdk: SoliboSDK, params: {
|
|
|
7
7
|
at?: Id | null;
|
|
8
8
|
fields?: string;
|
|
9
9
|
}): {
|
|
10
|
-
queryKey: (Id | readonly ["invoicing", "planSettings",
|
|
10
|
+
queryKey: (Id | readonly ["invoicing", "planSettings", string | number | null | undefined, string | number | null | undefined] | null | undefined)[];
|
|
11
11
|
queryFn: () => Promise<import("@solibo/solibo-sdk").InvoicePlanSettings>;
|
|
12
12
|
enabled: boolean;
|
|
13
13
|
};
|
|
@@ -7,7 +7,7 @@ export declare function previewQueryOptions(sdk: SoliboSDK, params: {
|
|
|
7
7
|
forced?: boolean | null;
|
|
8
8
|
fields?: string;
|
|
9
9
|
}): {
|
|
10
|
-
queryKey: (string | boolean | readonly ["invoicing", "preview",
|
|
10
|
+
queryKey: (string | boolean | readonly ["invoicing", "preview", string | number | null | undefined, string | number | null | undefined, string | number | null | undefined] | null | undefined)[];
|
|
11
11
|
queryFn: () => Promise<import("@solibo/solibo-sdk").PagedListInvoicePreview>;
|
|
12
12
|
enabled: boolean;
|
|
13
13
|
};
|
|
@@ -9,7 +9,7 @@ export declare function previewPdfQueryOptions(sdk: SoliboSDK, params: {
|
|
|
9
9
|
sectionId?: Id | null | undefined;
|
|
10
10
|
fields?: string;
|
|
11
11
|
}): {
|
|
12
|
-
queryKey: (string | readonly ["invoicing", "previewPdf",
|
|
12
|
+
queryKey: (string | readonly ["invoicing", "previewPdf", string | number | null | undefined, string | number | null | undefined, string | number | null | undefined, string | undefined, string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
13
13
|
queryFn: () => Promise<import("@solibo/solibo-sdk").InvoiceResultPreview>;
|
|
14
14
|
enabled: boolean;
|
|
15
15
|
};
|
|
@@ -5,7 +5,7 @@ export declare function queuedInvoicePdfQueryOptions(sdk: SoliboSDK, params: {
|
|
|
5
5
|
invoiceId?: string;
|
|
6
6
|
fields?: string;
|
|
7
7
|
}): {
|
|
8
|
-
queryKey: (string | readonly ["invoicing", "queuedInvoicePdf",
|
|
8
|
+
queryKey: (string | readonly ["invoicing", "queuedInvoicePdf", string | number | null | undefined, string | undefined] | undefined)[];
|
|
9
9
|
queryFn: () => Promise<import("@solibo/solibo-sdk").InvoiceResultPreview>;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
};
|
|
@@ -8,7 +8,7 @@ export declare function queuedInvoicesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
8
8
|
count?: number;
|
|
9
9
|
}): {
|
|
10
10
|
initialPageParam: string | undefined;
|
|
11
|
-
queryKey: (string | number | readonly ["invoicing", "queuedInvoices",
|
|
11
|
+
queryKey: (string | number | readonly ["invoicing", "queuedInvoices", string | number | null | undefined] | undefined)[];
|
|
12
12
|
queryFn: ({ pageParam }: {
|
|
13
13
|
pageParam: any;
|
|
14
14
|
}) => Promise<import("@solibo/solibo-sdk").PagedListInvoiceInput>;
|
|
@@ -9,7 +9,7 @@ export declare function recipientQueryOptions(sdk: SoliboSDK, params: {
|
|
|
9
9
|
count?: number;
|
|
10
10
|
}): {
|
|
11
11
|
initialPageParam: string | undefined;
|
|
12
|
-
queryKey: (string | number | readonly ["invoicing", "recipient",
|
|
12
|
+
queryKey: (string | number | readonly ["invoicing", "recipient", string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
13
13
|
queryFn: ({ pageParam }: {
|
|
14
14
|
pageParam: any;
|
|
15
15
|
}) => Promise<import("@solibo/solibo-sdk").PagedListSectionInvoiceRecipientOverview>;
|
|
@@ -5,7 +5,7 @@ export declare function issueQueryOptions(sdk: SoliboSDK, params: {
|
|
|
5
5
|
issueId?: Id | null | undefined;
|
|
6
6
|
fields?: string;
|
|
7
7
|
}): {
|
|
8
|
-
queryKey: (Id | readonly ["issues", "detail",
|
|
8
|
+
queryKey: (Id | readonly ["issues", "detail", string | number | null | undefined] | null | undefined)[];
|
|
9
9
|
queryFn: () => Promise<import("@solibo/solibo-sdk").IssueDetails>;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
};
|
|
@@ -2,8 +2,8 @@ import { SoliboSDK } from "@solibo/solibo-sdk";
|
|
|
2
2
|
import { Id } from "../../../utils/kt-bridge.js";
|
|
3
3
|
export declare const issueKeys: {
|
|
4
4
|
all: readonly ["issues"];
|
|
5
|
-
list: (companyId?: Id | null | undefined) => readonly ["issues", "list",
|
|
6
|
-
detail: (issueId?: Id | null | undefined) => readonly ["issues", "detail",
|
|
5
|
+
list: (companyId?: Id | null | undefined) => readonly ["issues", "list", string | number | null | undefined];
|
|
6
|
+
detail: (issueId?: Id | null | undefined) => readonly ["issues", "detail", string | number | null | undefined];
|
|
7
7
|
};
|
|
8
8
|
export declare function issuesQueryOptions(sdk: SoliboSDK, params: {
|
|
9
9
|
companyId?: Id | null | undefined;
|
|
@@ -15,7 +15,7 @@ export declare function issuesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
15
15
|
count?: number;
|
|
16
16
|
}): {
|
|
17
17
|
initialPageParam: string | undefined;
|
|
18
|
-
queryKey: (string | number | readonly ["issues", "list",
|
|
18
|
+
queryKey: (string | number | readonly ["issues", "list", string | number | null | undefined] | undefined)[];
|
|
19
19
|
queryFn: ({ pageParam }: {
|
|
20
20
|
pageParam: any;
|
|
21
21
|
}) => Promise<import("@solibo/solibo-sdk").PagedListIssue>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
1
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
2
2
|
export const issueKeys = {
|
|
3
3
|
all: ["issues"],
|
|
4
|
-
list: (companyId) => [...issueKeys.all, "list", companyId],
|
|
5
|
-
detail: (issueId) => [...issueKeys.all, "detail", issueId],
|
|
4
|
+
list: (companyId) => [...issueKeys.all, "list", toKeyId(companyId)],
|
|
5
|
+
detail: (issueId) => [...issueKeys.all, "detail", toKeyId(issueId)],
|
|
6
6
|
};
|
|
7
7
|
export function issuesQueryOptions(sdk, params) {
|
|
8
8
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../../../src/api/queries/issue/issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../../../src/api/queries/issue/issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAM,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,CAAC,QAAQ,CAAU;IACxB,IAAI,EAAE,CAAC,SAAiC,EAAE,EAAE,CAC1C,CAAC,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAU;IACzD,MAAM,EAAE,CAAC,OAA+B,EAAE,EAAE,CAC1C,CAAC,GAAG,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAU;CAC1D,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAChC,GAAc,EACd,MAQC;IAED,OAAO;QACL,gBAAgB,EAAE,MAAM,CAAC,SAAS;QAClC,QAAQ,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;QACzE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,EAAE,EAAE,CAC7C,GAAG,CAAC,GAAG,CAAC,KAAK;aACV,UAAU,CACT,MAAM,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC,OAAO,EAAE,EACnC,MAAM,CAAC,MAAM,EACb,SAAS,EACT,MAAM,CAAC,YAAY,EACnB,MAAM,CAAC,KAAK,CACb;aACA,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEjC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;QACvD,gBAAgB,EAAE,CAAC,QAAa,EAAE,EAAE,CAClC,QAAQ,EAAE,MAAM,EAAE,IAAI,KAAK,aAAa;YACtC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI;QAC5B,oBAAoB,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ;KACpE,CAAC;AACJ,CAAC","sourcesContent":["import { SoliboSDK } from \"@solibo/solibo-sdk\";\nimport { fromKt, Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nexport const issueKeys = {\n all: [\"issues\"] as const,\n list: (companyId?: Id | null | undefined) =>\n [...issueKeys.all, \"list\", toKeyId(companyId)] as const,\n detail: (issueId?: Id | null | undefined) =>\n [...issueKeys.all, \"detail\", toKeyId(issueId)] as const,\n};\n\nexport function issuesQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n select?: (issue: any) => any;\n enabled?: boolean;\n fields?: string;\n pageToken?: string;\n autoPaginate?: boolean | null;\n count?: number;\n },\n) {\n return {\n initialPageParam: params.pageToken,\n queryKey: [issueKeys.list(params.companyId), params.fields, params.count],\n queryFn: ({ pageParam }: { pageParam: any }) =>\n sdk.api.issue\n .indexIssue(\n BigInt(params.companyId!).valueOf(),\n params.fields,\n pageParam,\n params.autoPaginate,\n params.count,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body)),\n\n enabled: !!params.companyId && params.enabled !== false,\n getNextPageParam: (lastPage: any) =>\n lastPage?.paging?.next === \"END_OF_LIST\"\n ? undefined\n : lastPage?.paging?.next,\n getPreviousPageParam: (lastPage: any) => lastPage?.paging?.previous,\n };\n}\n"]}
|
|
@@ -2,8 +2,8 @@ import { SoliboSDK } from "@solibo/solibo-sdk";
|
|
|
2
2
|
import { Id } from "../../../utils/kt-bridge.js";
|
|
3
3
|
export declare const meetingKeys: {
|
|
4
4
|
all: readonly ["meetings"];
|
|
5
|
-
list: (companyId: Id) => readonly ["meetings", "company",
|
|
6
|
-
detail: (id?: Id | null | undefined) => readonly ["meetings", "detail",
|
|
5
|
+
list: (companyId: Id) => readonly ["meetings", "company", string | number | null | undefined];
|
|
6
|
+
detail: (id?: Id | null | undefined) => readonly ["meetings", "detail", string | number | null | undefined];
|
|
7
7
|
multiCompanyList: () => readonly ["meetings", "companies"];
|
|
8
8
|
};
|
|
9
9
|
export declare function meetingsQueryOptions(sdk: SoliboSDK, params: {
|
|
@@ -14,7 +14,7 @@ export declare function meetingsQueryOptions(sdk: SoliboSDK, params: {
|
|
|
14
14
|
count?: number;
|
|
15
15
|
}): {
|
|
16
16
|
initialPageParam: string | undefined;
|
|
17
|
-
queryKey: (Id | readonly ["meetings", "company",
|
|
17
|
+
queryKey: (Id | readonly ["meetings", "company", string | number | null | undefined] | readonly ["meetings", "companies"] | null | undefined)[];
|
|
18
18
|
queryFn: ({ pageParam }: {
|
|
19
19
|
pageParam: any;
|
|
20
20
|
}) => Promise<import("@solibo/solibo-sdk").PagedListMeeting>;
|
|
@@ -26,7 +26,7 @@ export declare function meetingQueryOptions(sdk: SoliboSDK, params: {
|
|
|
26
26
|
meetingId?: Id | null | undefined;
|
|
27
27
|
fields?: string;
|
|
28
28
|
}): {
|
|
29
|
-
queryKey: (Id | readonly ["meetings", "detail",
|
|
29
|
+
queryKey: (Id | readonly ["meetings", "detail", string | number | null | undefined] | null | undefined)[];
|
|
30
30
|
queryFn: () => Promise<import("@solibo/solibo-sdk").MeetingDetails>;
|
|
31
31
|
enabled: boolean;
|
|
32
32
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
1
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
2
2
|
export const meetingKeys = {
|
|
3
3
|
all: ["meetings"],
|
|
4
|
-
list: (companyId) => [...meetingKeys.all, "company", companyId],
|
|
5
|
-
detail: (id) => [...meetingKeys.all, "detail", id],
|
|
4
|
+
list: (companyId) => [...meetingKeys.all, "company", toKeyId(companyId)],
|
|
5
|
+
detail: (id) => [...meetingKeys.all, "detail", toKeyId(id)],
|
|
6
6
|
multiCompanyList: () => [...meetingKeys.all, "companies"],
|
|
7
7
|
};
|
|
8
8
|
export function meetingsQueryOptions(sdk, params) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meetings.js","sourceRoot":"","sources":["../../../../src/api/queries/meeting/meetings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"meetings.js","sourceRoot":"","sources":["../../../../src/api/queries/meeting/meetings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAM,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,CAAC,UAAU,CAAU;IAC1B,IAAI,EAAE,CAAC,SAAa,EAAE,EAAE,CACtB,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAU;IAC9D,MAAM,EAAE,CAAC,EAA0B,EAAE,EAAE,CACrC,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAU;IACtD,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,GAA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,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI;QAC5B,oBAAoB,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ;KACpE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAc,EACd,MAIC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;YACpC,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,MAAM;SACd;QACD,OAAO,EAAE,GAAG,EAAE,CACZ,GAAG,CAAC,GAAG,CAAC,OAAO;aACZ,WAAW,CACV,MAAM,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC,OAAO,EAAE,EACnC,MAAM,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC,OAAO,EAAE,EACnC,MAAM,CAAC,MAAM,CACd;aACA,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS;KAClD,CAAC;AACJ,CAAC","sourcesContent":["import { SoliboSDK } from \"@solibo/solibo-sdk\";\nimport { fromKt, Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nexport const meetingKeys = {\n all: [\"meetings\"] as const,\n list: (companyId: Id) =>\n [...meetingKeys.all, \"company\", toKeyId(companyId)] as const,\n detail: (id?: Id | null | undefined) =>\n [...meetingKeys.all, \"detail\", toKeyId(id)] as const,\n multiCompanyList: () => [...meetingKeys.all, \"companies\"] as const,\n};\n\nexport function meetingsQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n fields?: string;\n pageToken?: string;\n autoPaginate?: boolean | null;\n count?: number;\n },\n) {\n return {\n initialPageParam: params.pageToken,\n queryKey: [\n params.companyId\n ? meetingKeys.list(params.companyId)\n : meetingKeys.multiCompanyList(),\n params.companyId,\n params.fields,\n params.count,\n ],\n queryFn: ({ pageParam }: { pageParam: any }) =>\n params.companyId\n ? sdk.api.meeting\n .indexMeeting(\n BigInt(params.companyId).valueOf(),\n params.fields,\n pageParam,\n params.autoPaginate,\n params.count,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body))\n : sdk.api.meeting\n .indexMeetingUser(\n params.fields,\n pageParam,\n params.autoPaginate,\n params.count,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body)),\n getNextPageParam: (lastPage: any) =>\n lastPage?.paging?.next === \"END_OF_LIST\"\n ? undefined\n : lastPage?.paging?.next,\n getPreviousPageParam: (lastPage: any) => lastPage?.paging?.previous,\n };\n}\n\nexport function meetingQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n meetingId?: Id | null | undefined;\n fields?: string;\n },\n) {\n return {\n queryKey: [\n meetingKeys.detail(params.meetingId),\n params.companyId,\n params.fields,\n ],\n queryFn: () =>\n sdk.api.meeting\n .showMeeting(\n BigInt(params.companyId!).valueOf(),\n BigInt(params.meetingId!).valueOf(),\n params.fields,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body)),\n enabled: !!params.companyId && !!params.meetingId,\n };\n}\n"]}
|
|
@@ -4,7 +4,7 @@ export declare function organizationQueryOptions(sdk: SoliboSDK, params: {
|
|
|
4
4
|
organizationId?: Id | null | undefined;
|
|
5
5
|
fields?: string;
|
|
6
6
|
}, companies?: any[]): {
|
|
7
|
-
queryKey: (string | readonly ["organization", "detail",
|
|
7
|
+
queryKey: (string | readonly ["organization", "detail", string | number | null | undefined] | undefined)[];
|
|
8
8
|
queryFn: () => Promise<import("@solibo/solibo-sdk").Organization>;
|
|
9
9
|
staleTime: number;
|
|
10
10
|
enabled: boolean;
|