@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,18 +1,22 @@
|
|
|
1
1
|
import { minutes } from "../../../utils/dateTime.js";
|
|
2
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
2
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
3
3
|
export const companyKeys = {
|
|
4
4
|
all: ["company"],
|
|
5
5
|
list: () => [...companyKeys.all, "list"],
|
|
6
|
-
detailed: (id) => [...companyKeys.all, "detailed", id],
|
|
7
|
-
byId: (id) => [...companyKeys.all, "byId", id],
|
|
8
|
-
addresses: (companyId) => [...companyKeys.all, "addresses", companyId],
|
|
9
|
-
ordinances: (id) => [...companyKeys.all, "ordinances", id],
|
|
10
|
-
draft: (draftId) => [...companyKeys.all, "draft", draftId],
|
|
6
|
+
detailed: (id) => [...companyKeys.all, "detailed", toKeyId(id)],
|
|
7
|
+
byId: (id) => [...companyKeys.all, "byId", toKeyId(id)],
|
|
8
|
+
addresses: (companyId) => [...companyKeys.all, "addresses", toKeyId(companyId)],
|
|
9
|
+
ordinances: (id) => [...companyKeys.all, "ordinances", toKeyId(id)],
|
|
10
|
+
draft: (draftId) => [...companyKeys.all, "draft", toKeyId(draftId)],
|
|
11
11
|
drafts: () => [...companyKeys.all, "drafts"],
|
|
12
|
-
draftValidation: (draftId) => [...companyKeys.all, "draftValidation", draftId],
|
|
13
|
-
fractions: (companyId) => [...companyKeys.all, "fractions", companyId],
|
|
14
|
-
administrators: (companyId) => [...companyKeys.all, "administrators", companyId],
|
|
15
|
-
availableAdministrators: (companyId) => [
|
|
12
|
+
draftValidation: (draftId) => [...companyKeys.all, "draftValidation", toKeyId(draftId)],
|
|
13
|
+
fractions: (companyId) => [...companyKeys.all, "fractions", toKeyId(companyId)],
|
|
14
|
+
administrators: (companyId) => [...companyKeys.all, "administrators", toKeyId(companyId)],
|
|
15
|
+
availableAdministrators: (companyId) => [
|
|
16
|
+
...companyKeys.all,
|
|
17
|
+
"availableAdministrators",
|
|
18
|
+
toKeyId(companyId),
|
|
19
|
+
],
|
|
16
20
|
activeAdministrators: () => [...companyKeys.all, "activeAdministrators"],
|
|
17
21
|
allAdministrators: () => [...companyKeys.all, "allAdministrators"],
|
|
18
22
|
types: () => [...companyKeys.all, "types"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../../../../src/api/queries/company/companies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../../../../src/api/queries/company/companies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAM,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,CAAC,SAAS,CAAU;IACzB,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAU;IACjD,QAAQ,EAAE,CAAC,EAA0B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SDK } from \"@solibo/solibo-sdk\";\n\nimport { minutes } from \"../../../utils/dateTime.js\";\nimport { fromKt, Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nexport const companyKeys = {\n all: [\"company\"] as const,\n list: () => [...companyKeys.all, \"list\"] as const,\n detailed: (id?: Id | null | undefined) =>\n [...companyKeys.all, \"detailed\", toKeyId(id)] as const,\n byId: (id?: Id | null | undefined) =>\n [...companyKeys.all, \"byId\", toKeyId(id)] as const,\n addresses: (companyId?: Id | null | undefined) =>\n [...companyKeys.all, \"addresses\", toKeyId(companyId)] as const,\n ordinances: (id?: Id | null | undefined) =>\n [...companyKeys.all, \"ordinances\", toKeyId(id)] as const,\n draft: (draftId?: Id | null | undefined) =>\n [...companyKeys.all, \"draft\", toKeyId(draftId)] as const,\n drafts: () => [...companyKeys.all, \"drafts\"] as const,\n draftValidation: (draftId?: Id | null | undefined) =>\n [...companyKeys.all, \"draftValidation\", toKeyId(draftId)] as const,\n fractions: (companyId?: Id | null | undefined) =>\n [...companyKeys.all, \"fractions\", toKeyId(companyId)] as const,\n administrators: (companyId?: Id | null | undefined) =>\n [...companyKeys.all, \"administrators\", toKeyId(companyId)] as const,\n availableAdministrators: (companyId?: Id | null | undefined) =>\n [\n ...companyKeys.all,\n \"availableAdministrators\",\n toKeyId(companyId),\n ] as const,\n activeAdministrators: () =>\n [...companyKeys.all, \"activeAdministrators\"] as const,\n allAdministrators: () => [...companyKeys.all, \"allAdministrators\"] as const,\n types: () => [...companyKeys.all, \"types\"] as const,\n newlyManaged: () => [...companyKeys.all, \"newlyManaged\"] as const,\n};\n\nexport function companiesQueryOptions(\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: [companyKeys.list(), params.fields, params.count],\n queryFn: ({ pageParam }: { pageParam: any }) =>\n sdk.api.companies\n .indexCompany(\n params.fields,\n pageParam,\n params.autoPaginate,\n params.count,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body)),\n\n staleTime: minutes(10),\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"]}
|
|
@@ -8,7 +8,7 @@ export declare function companyAddressesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
8
8
|
count?: number;
|
|
9
9
|
}): {
|
|
10
10
|
initialPageParam: string | undefined;
|
|
11
|
-
queryKey: (string | number | readonly ["company", "addresses",
|
|
11
|
+
queryKey: (string | number | readonly ["company", "addresses", string | number | null | undefined] | undefined)[];
|
|
12
12
|
queryFn: ({ pageParam }: {
|
|
13
13
|
pageParam: any;
|
|
14
14
|
}) => Promise<import("@solibo/solibo-sdk").PagedListCompanyAddress>;
|
|
@@ -5,7 +5,7 @@ export declare function companyByIdQueryOptions(sdk: SoliboSDK, params: {
|
|
|
5
5
|
placeholder?: Company;
|
|
6
6
|
fields?: string;
|
|
7
7
|
}): {
|
|
8
|
-
queryKey: (string | readonly ["company", "byId",
|
|
8
|
+
queryKey: (string | readonly ["company", "byId", string | number | null | undefined] | undefined)[];
|
|
9
9
|
queryFn: () => Promise<Company>;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
staleTime: number;
|
|
@@ -4,7 +4,7 @@ export declare function companyDetailedQueryOptions(sdk: SoliboSDK, params: {
|
|
|
4
4
|
id?: Id | null | undefined;
|
|
5
5
|
fields?: string;
|
|
6
6
|
}): {
|
|
7
|
-
queryKey: (string | readonly ["company", "detailed",
|
|
7
|
+
queryKey: (string | readonly ["company", "detailed", string | number | null | undefined] | undefined)[];
|
|
8
8
|
queryFn: () => Promise<import("@solibo/solibo-sdk").CompanyDetailed>;
|
|
9
9
|
staleTime: number;
|
|
10
10
|
enabled: boolean;
|
|
@@ -4,7 +4,7 @@ export declare function companyDraftQueryOptions(sdk: SoliboSDK, params: {
|
|
|
4
4
|
draftId?: Id | null | undefined;
|
|
5
5
|
fields?: string;
|
|
6
6
|
}): {
|
|
7
|
-
queryKey: (string | readonly ["company", "draft",
|
|
7
|
+
queryKey: (string | readonly ["company", "draft", string | number | null | undefined] | undefined)[];
|
|
8
8
|
queryFn: () => Promise<import("@solibo/solibo-sdk").DraftCompany>;
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
};
|
|
@@ -18,7 +18,7 @@ export declare function companyDraftsQueryOptions(sdk: SoliboSDK, params?: {
|
|
|
18
18
|
export declare function importDraftValidationQueryOptions(sdk: SoliboSDK, params: {
|
|
19
19
|
draftId?: Id | null | undefined;
|
|
20
20
|
}): {
|
|
21
|
-
queryKey: (readonly ["company", "draftValidation",
|
|
21
|
+
queryKey: (readonly ["company", "draftValidation", string | number | null | undefined])[];
|
|
22
22
|
queryFn: () => Promise<import("@solibo/solibo-sdk").HttpResponse<void>>;
|
|
23
23
|
enabled: boolean;
|
|
24
24
|
};
|
|
@@ -4,7 +4,7 @@ export declare function companyOrdinancesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
4
4
|
id?: Id | null | undefined;
|
|
5
5
|
fields?: string;
|
|
6
6
|
}): {
|
|
7
|
-
queryKey: (string | readonly ["company", "ordinances",
|
|
7
|
+
queryKey: (string | readonly ["company", "ordinances", string | number | null | undefined] | undefined)[];
|
|
8
8
|
queryFn: () => Promise<import("@solibo/solibo-sdk").CompanyOrdinances>;
|
|
9
9
|
staleTime: number;
|
|
10
10
|
enabled: boolean;
|
|
@@ -8,7 +8,7 @@ export declare function fractionsQueryOptions(sdk: SoliboSDK, params?: {
|
|
|
8
8
|
validFrom?: bigint | null;
|
|
9
9
|
fields?: string;
|
|
10
10
|
}): {
|
|
11
|
-
queryKey: (string | bigint | Id[] | readonly ["company", "fractions",
|
|
11
|
+
queryKey: (string | bigint | Id[] | readonly ["company", "fractions", string | number | null | undefined] | FractionType | null | undefined)[];
|
|
12
12
|
queryFn: () => Promise<{
|
|
13
13
|
[key: string]: readonly SectionFraction[];
|
|
14
14
|
}>;
|
|
@@ -8,7 +8,7 @@ export declare function companyConversationCategoriesForRequestsQueryOptions(sdk
|
|
|
8
8
|
count?: number;
|
|
9
9
|
}): {
|
|
10
10
|
initialPageParam: string | undefined;
|
|
11
|
-
queryKey: (string | number | readonly ["conversations", "categoriesForRequests",
|
|
11
|
+
queryKey: (string | number | readonly ["conversations", "categoriesForRequests", string | number | null | undefined] | undefined)[];
|
|
12
12
|
queryFn: ({ pageParam }: {
|
|
13
13
|
pageParam: any;
|
|
14
14
|
}) => Promise<import("@solibo/solibo-sdk").PagedListConversationCategory>;
|
|
@@ -6,7 +6,7 @@ export declare function conversationQueryOptions(sdk: SoliboSDK, params: {
|
|
|
6
6
|
translateToCountryId?: Id | null;
|
|
7
7
|
fields?: string;
|
|
8
8
|
}): {
|
|
9
|
-
queryKey: (Id | readonly ["conversations", "detail",
|
|
9
|
+
queryKey: (Id | readonly ["conversations", "detail", string | number | null | undefined] | null | undefined)[];
|
|
10
10
|
queryFn: () => Promise<import("@solibo/solibo-sdk").Conversation>;
|
|
11
11
|
refetchInterval: number;
|
|
12
12
|
retry: (failureCount: any, err: any) => boolean;
|
|
@@ -8,7 +8,7 @@ export declare function conversationCategoriesQueryOptions(sdk: SoliboSDK, param
|
|
|
8
8
|
count?: number;
|
|
9
9
|
}): {
|
|
10
10
|
initialPageParam: string | undefined;
|
|
11
|
-
queryKey: (string | number | readonly ["conversations", "categories",
|
|
11
|
+
queryKey: (string | number | readonly ["conversations", "categories", string | number | null | undefined] | undefined)[];
|
|
12
12
|
queryFn: ({ pageParam }: {
|
|
13
13
|
pageParam: any;
|
|
14
14
|
}) => Promise<import("@solibo/solibo-sdk").PagedListSecureConversationCategory>;
|
|
@@ -10,7 +10,7 @@ export declare function conversationCountInCompanyQueryOptions(sdk: SoliboSDK, p
|
|
|
10
10
|
companyId?: Id | null | undefined;
|
|
11
11
|
fields?: string;
|
|
12
12
|
}): {
|
|
13
|
-
queryKey: (string | readonly ["conversations", "countInCompany",
|
|
13
|
+
queryKey: (string | readonly ["conversations", "countInCompany", string | number | null | undefined] | undefined)[];
|
|
14
14
|
queryFn: () => Promise<import("@solibo/solibo-sdk").ConversationCount>;
|
|
15
15
|
enabled: boolean;
|
|
16
16
|
};
|
|
@@ -9,7 +9,7 @@ export declare function conversationFoldersQueryOptions(sdk: SoliboSDK, params:
|
|
|
9
9
|
count?: number;
|
|
10
10
|
}): {
|
|
11
11
|
initialPageParam: string | undefined;
|
|
12
|
-
queryKey: (string | number | readonly ["conversations", "folders",
|
|
12
|
+
queryKey: (string | number | readonly ["conversations", "folders", string | number | null | undefined] | undefined)[];
|
|
13
13
|
queryFn: ({ pageParam }: {
|
|
14
14
|
pageParam: any;
|
|
15
15
|
}) => Promise<import("@solibo/solibo-sdk").PagedListConversationFolder>;
|
|
@@ -22,7 +22,7 @@ export declare function conversationFolderQueryOptions(sdk: SoliboSDK, params: {
|
|
|
22
22
|
folderId?: Id | null | undefined;
|
|
23
23
|
fields?: string;
|
|
24
24
|
}): {
|
|
25
|
-
queryKey: (string | readonly ["conversations", "folder",
|
|
25
|
+
queryKey: (string | readonly ["conversations", "folder", string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
26
26
|
queryFn: () => Promise<import("@solibo/solibo-sdk").ConversationFolder>;
|
|
27
27
|
enabled: boolean;
|
|
28
28
|
};
|
|
@@ -3,19 +3,19 @@ import { ParticipantType } from "@solibo/solibo-sdk";
|
|
|
3
3
|
import { Id } from "../../../utils/kt-bridge.js";
|
|
4
4
|
export declare const conversationKeys: {
|
|
5
5
|
all: readonly ["conversations"];
|
|
6
|
-
list: (companyId?: Id | null | undefined) => readonly ["conversations", "list",
|
|
7
|
-
detail: (conversationId?: Id | null | undefined) => readonly ["conversations", "detail",
|
|
8
|
-
categories: (companyId?: Id | null | undefined) => readonly ["conversations", "categories",
|
|
9
|
-
categoriesForRequests: (companyId?: Id | null | undefined) => readonly ["conversations", "categoriesForRequests",
|
|
6
|
+
list: (companyId?: Id | null | undefined) => readonly ["conversations", "list", string | number | null | undefined];
|
|
7
|
+
detail: (conversationId?: Id | null | undefined) => readonly ["conversations", "detail", string | number | null | undefined];
|
|
8
|
+
categories: (companyId?: Id | null | undefined) => readonly ["conversations", "categories", string | number | null | undefined];
|
|
9
|
+
categoriesForRequests: (companyId?: Id | null | undefined) => readonly ["conversations", "categoriesForRequests", string | number | null | undefined];
|
|
10
10
|
count: () => readonly ["conversations", "count"];
|
|
11
|
-
countInCompany: (companyId?: Id | null | undefined) => readonly ["conversations", "countInCompany",
|
|
12
|
-
folders: (companyId?: Id | null | undefined) => readonly ["conversations", "folders",
|
|
13
|
-
folder: (companyId?: Id | null | undefined, folderId?: Id | null | undefined) => readonly ["conversations", "folder",
|
|
14
|
-
byParticipant: (participantId?: Id | null | undefined, participantType?: ParticipantType) => readonly ["conversations", "byParticipant",
|
|
15
|
-
unreadCount: (companyId?: Id | null | undefined) => readonly ["conversations", "unreadCount",
|
|
16
|
-
public: (conversationId?: Id | null | undefined) => readonly ["conversations", "public",
|
|
17
|
-
publicDocument: (conversationId?: Id | null | undefined, documentId?: Id | null | undefined) => readonly ["conversations", "publicDocument",
|
|
18
|
-
publicAuth: (companySlug?: string, conversationId?: Id | null | undefined) => readonly ["conversations", "publicAuth", string | undefined,
|
|
11
|
+
countInCompany: (companyId?: Id | null | undefined) => readonly ["conversations", "countInCompany", string | number | null | undefined];
|
|
12
|
+
folders: (companyId?: Id | null | undefined) => readonly ["conversations", "folders", string | number | null | undefined];
|
|
13
|
+
folder: (companyId?: Id | null | undefined, folderId?: Id | null | undefined) => readonly ["conversations", "folder", string | number | null | undefined, string | number | null | undefined];
|
|
14
|
+
byParticipant: (participantId?: Id | null | undefined, participantType?: ParticipantType) => readonly ["conversations", "byParticipant", string | number | null | undefined, ParticipantType | undefined];
|
|
15
|
+
unreadCount: (companyId?: Id | null | undefined) => readonly ["conversations", "unreadCount", string | number | null | undefined];
|
|
16
|
+
public: (conversationId?: Id | null | undefined) => readonly ["conversations", "public", string | number | null | undefined];
|
|
17
|
+
publicDocument: (conversationId?: Id | null | undefined, documentId?: Id | null | undefined) => readonly ["conversations", "publicDocument", string | number | null | undefined, string | number | null | undefined];
|
|
18
|
+
publicAuth: (companySlug?: string, conversationId?: Id | null | undefined) => readonly ["conversations", "publicAuth", string | undefined, string | number | null | undefined];
|
|
19
19
|
categoriesOpen: (companySlug?: string) => readonly ["conversations", "categoriesOpen", string | undefined];
|
|
20
20
|
};
|
|
21
21
|
export declare function conversationsQueryOptions(sdk: SoliboSDK, params: {
|
|
@@ -33,7 +33,7 @@ export declare function conversationsQueryOptions(sdk: SoliboSDK, params: {
|
|
|
33
33
|
byParticipantType?: string | null | undefined;
|
|
34
34
|
}): {
|
|
35
35
|
initialPageParam: string | undefined;
|
|
36
|
-
queryKey: (boolean | Id | readonly ["conversations", "list",
|
|
36
|
+
queryKey: (boolean | Id | readonly ["conversations", "list", string | number | null | undefined] | null | undefined)[];
|
|
37
37
|
queryFn: ({ pageParam }: {
|
|
38
38
|
pageParam: any;
|
|
39
39
|
}) => Promise<import("@solibo/solibo-sdk").PagedListConversation>;
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
1
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
2
2
|
function emptyAsUndefined(value) {
|
|
3
3
|
return value ? value : undefined;
|
|
4
4
|
}
|
|
5
5
|
export const conversationKeys = {
|
|
6
6
|
all: ["conversations"],
|
|
7
|
-
list: (companyId) => [...conversationKeys.all, "list", companyId],
|
|
8
|
-
detail: (conversationId) => [...conversationKeys.all, "detail", conversationId],
|
|
9
|
-
categories: (companyId) => [...conversationKeys.all, "categories", companyId],
|
|
10
|
-
categoriesForRequests: (companyId) => [
|
|
7
|
+
list: (companyId) => [...conversationKeys.all, "list", toKeyId(companyId)],
|
|
8
|
+
detail: (conversationId) => [...conversationKeys.all, "detail", toKeyId(conversationId)],
|
|
9
|
+
categories: (companyId) => [...conversationKeys.all, "categories", toKeyId(companyId)],
|
|
10
|
+
categoriesForRequests: (companyId) => [
|
|
11
|
+
...conversationKeys.all,
|
|
12
|
+
"categoriesForRequests",
|
|
13
|
+
toKeyId(companyId),
|
|
14
|
+
],
|
|
11
15
|
count: () => [...conversationKeys.all, "count"],
|
|
12
|
-
countInCompany: (companyId) => [...conversationKeys.all, "countInCompany", companyId],
|
|
13
|
-
folders: (companyId) => [...conversationKeys.all, "folders", companyId],
|
|
14
|
-
folder: (companyId, folderId) => [
|
|
16
|
+
countInCompany: (companyId) => [...conversationKeys.all, "countInCompany", toKeyId(companyId)],
|
|
17
|
+
folders: (companyId) => [...conversationKeys.all, "folders", toKeyId(companyId)],
|
|
18
|
+
folder: (companyId, folderId) => [
|
|
19
|
+
...conversationKeys.all,
|
|
20
|
+
"folder",
|
|
21
|
+
toKeyId(companyId),
|
|
22
|
+
toKeyId(folderId),
|
|
23
|
+
],
|
|
15
24
|
byParticipant: (participantId, participantType) => [
|
|
16
25
|
...conversationKeys.all,
|
|
17
26
|
"byParticipant",
|
|
18
|
-
participantId,
|
|
27
|
+
toKeyId(participantId),
|
|
19
28
|
participantType,
|
|
20
29
|
],
|
|
21
|
-
unreadCount: (companyId) => [...conversationKeys.all, "unreadCount", companyId],
|
|
22
|
-
public: (conversationId) => [...conversationKeys.all, "public", conversationId],
|
|
30
|
+
unreadCount: (companyId) => [...conversationKeys.all, "unreadCount", toKeyId(companyId)],
|
|
31
|
+
public: (conversationId) => [...conversationKeys.all, "public", toKeyId(conversationId)],
|
|
23
32
|
publicDocument: (conversationId, documentId) => [
|
|
24
33
|
...conversationKeys.all,
|
|
25
34
|
"publicDocument",
|
|
26
|
-
conversationId,
|
|
27
|
-
documentId,
|
|
35
|
+
toKeyId(conversationId),
|
|
36
|
+
toKeyId(documentId),
|
|
28
37
|
],
|
|
29
38
|
publicAuth: (companySlug, conversationId) => [
|
|
30
39
|
...conversationKeys.all,
|
|
31
40
|
"publicAuth",
|
|
32
41
|
companySlug,
|
|
33
|
-
conversationId,
|
|
42
|
+
toKeyId(conversationId),
|
|
34
43
|
],
|
|
35
44
|
categoriesOpen: (companySlug) => [...conversationKeys.all, "categoriesOpen", companySlug],
|
|
36
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../../src/api/queries/conversation/conversations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../../src/api/queries/conversation/conversations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAM,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAElE,SAAS,gBAAgB,CACvB,KAA2B;IAE3B,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG,EAAE,CAAC,eAAe,CAAU;IAC/B,IAAI,EAAE,CAAC,SAAiC,EAAE,EAAE,CAC1C,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAU;IAChE,MAAM,EAAE,CAAC,cAAsC,EAAE,EAAE,CACjD,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAU;IACvE,UAAU,EAAE,CAAC,SAAiC,EAAE,EAAE,CAChD,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,CAAC,SAAS,CAAC,CAAU;IACtE,qBAAqB,EAAE,CAAC,SAAiC,EAAE,EAAE,CAC3D;QACE,GAAG,gBAAgB,CAAC,GAAG;QACvB,uBAAuB;QACvB,OAAO,CAAC,SAAS,CAAC;KACV;IACZ,KAAK,EAAE,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AAiB,CAAQ,EACjD,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;QACjC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS;QAC3B,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 { ParticipantType } from \"@solibo/solibo-sdk\";\nimport { fromKt, Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nfunction emptyAsUndefined<T extends string>(\n value: T | null | undefined,\n): T | undefined {\n return value ? value : undefined;\n}\n\nexport const conversationKeys = {\n all: [\"conversations\"] as const,\n list: (companyId?: Id | null | undefined) =>\n [...conversationKeys.all, \"list\", toKeyId(companyId)] as const,\n detail: (conversationId?: Id | null | undefined) =>\n [...conversationKeys.all, \"detail\", toKeyId(conversationId)] as const,\n categories: (companyId?: Id | null | undefined) =>\n [...conversationKeys.all, \"categories\", toKeyId(companyId)] as const,\n categoriesForRequests: (companyId?: Id | null | undefined) =>\n [\n ...conversationKeys.all,\n \"categoriesForRequests\",\n toKeyId(companyId),\n ] as const,\n count: () => [...conversationKeys.all, \"count\"] as const,\n countInCompany: (companyId?: Id | null | undefined) =>\n [...conversationKeys.all, \"countInCompany\", toKeyId(companyId)] as const,\n folders: (companyId?: Id | null | undefined) =>\n [...conversationKeys.all, \"folders\", toKeyId(companyId)] as const,\n folder: (\n companyId?: Id | null | undefined,\n folderId?: Id | null | undefined,\n ) =>\n [\n ...conversationKeys.all,\n \"folder\",\n toKeyId(companyId),\n toKeyId(folderId),\n ] as const,\n byParticipant: (\n participantId?: Id | null | undefined,\n participantType?: ParticipantType,\n ) =>\n [\n ...conversationKeys.all,\n \"byParticipant\",\n toKeyId(participantId),\n participantType,\n ] as const,\n unreadCount: (companyId?: Id | null | undefined) =>\n [...conversationKeys.all, \"unreadCount\", toKeyId(companyId)] as const,\n public: (conversationId?: Id | null | undefined) =>\n [...conversationKeys.all, \"public\", toKeyId(conversationId)] as const,\n publicDocument: (\n conversationId?: Id | null | undefined,\n documentId?: Id | null | undefined,\n ) =>\n [\n ...conversationKeys.all,\n \"publicDocument\",\n toKeyId(conversationId),\n toKeyId(documentId),\n ] as const,\n publicAuth: (companySlug?: string, conversationId?: Id | null | undefined) =>\n [\n ...conversationKeys.all,\n \"publicAuth\",\n companySlug,\n toKeyId(conversationId),\n ] as const,\n categoriesOpen: (companySlug?: string) =>\n [...conversationKeys.all, \"categoriesOpen\", companySlug] as const,\n};\n\nexport function conversationsQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n fields?: string;\n pageToken?: string;\n count?: number;\n autoPaginate?: boolean;\n searchString?: string | null | undefined;\n category?: number | null | undefined;\n status?: string | null | undefined;\n folder?: Id | null | undefined;\n onlyRoot?: boolean | null | undefined;\n byParticipant?: number | null | undefined;\n byParticipantType?: string | null | undefined;\n },\n) {\n return {\n initialPageParam: params.pageToken,\n queryKey: [\n conversationKeys.list(params.companyId),\n params.fields,\n params.pageToken,\n params.count,\n params.autoPaginate,\n params.searchString,\n params.category,\n params.folder,\n params.onlyRoot,\n params.status,\n params.byParticipant,\n params.byParticipantType,\n ],\n queryFn: ({ pageParam }: { pageParam: any }) =>\n sdk.api.conversations\n .indexConversation(\n BigInt(params.companyId!).valueOf(),\n params.searchString,\n params.category ? BigInt(params.category).valueOf() : undefined,\n params.folder ? BigInt(params.folder).valueOf() : undefined,\n params.onlyRoot,\n emptyAsUndefined(params.status) as any,\n params.byParticipant\n ? BigInt(params.byParticipant).valueOf()\n : undefined,\n emptyAsUndefined(params.byParticipantType) as any,\n params.fields,\n pageParam,\n params.autoPaginate,\n params.count,\n )\n .then((res) => res.body())\n .then((body) => fromKt(body)),\n enabled: !!params.companyId,\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"]}
|
|
@@ -12,7 +12,7 @@ export declare function conversationsByParticipantQueryOptions(sdk: SoliboSDK, p
|
|
|
12
12
|
count?: number;
|
|
13
13
|
}): {
|
|
14
14
|
initialPageParam: string | undefined;
|
|
15
|
-
queryKey: (Id | readonly ["conversations", "byParticipant",
|
|
15
|
+
queryKey: (Id | readonly ["conversations", "byParticipant", string | number | null | undefined, ParticipantType | undefined] | null | undefined)[];
|
|
16
16
|
queryFn: ({ pageParam }: {
|
|
17
17
|
pageParam: any;
|
|
18
18
|
}) => Promise<import("@solibo/solibo-sdk").PagedListConversation>;
|
|
@@ -5,7 +5,7 @@ export declare function publicConversationQueryOptions(sdk: SoliboSDK, params: {
|
|
|
5
5
|
conversationId?: Id | null | undefined;
|
|
6
6
|
fields?: string;
|
|
7
7
|
}): {
|
|
8
|
-
queryKey: (string | readonly ["conversations", "public",
|
|
8
|
+
queryKey: (string | readonly ["conversations", "public", string | number | null | undefined] | undefined)[];
|
|
9
9
|
queryFn: () => Promise<import("@solibo/solibo-sdk").PublicConversation>;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
};
|
|
@@ -16,7 +16,7 @@ export declare function publicConversationDocumentQueryOptions(sdk: SoliboSDK, p
|
|
|
16
16
|
redirect?: boolean | null;
|
|
17
17
|
fields?: string;
|
|
18
18
|
}): {
|
|
19
|
-
queryKey: (string | boolean | readonly ["conversations", "publicDocument",
|
|
19
|
+
queryKey: (string | boolean | readonly ["conversations", "publicDocument", string | number | null | undefined, string | number | null | undefined] | null | undefined)[];
|
|
20
20
|
queryFn: () => Promise<import("@solibo/solibo-sdk").UrlWrapper>;
|
|
21
21
|
enabled: boolean;
|
|
22
22
|
};
|
|
@@ -5,7 +5,7 @@ export declare function publicConversationAuthQueryOptions(sdk: SoliboSDK, param
|
|
|
5
5
|
conversationId?: Id | null | undefined;
|
|
6
6
|
token?: string;
|
|
7
7
|
}): {
|
|
8
|
-
queryKey: (string | readonly ["conversations", "publicAuth", string | undefined,
|
|
8
|
+
queryKey: (string | readonly ["conversations", "publicAuth", string | undefined, string | number | null | undefined] | undefined)[];
|
|
9
9
|
queryFn: () => Promise<import("@solibo/solibo-sdk").HttpResponse<void>>;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
};
|
|
@@ -4,7 +4,7 @@ export declare function unreadConversationsCountQueryOptions(sdk: SoliboSDK, par
|
|
|
4
4
|
companyId?: Id | null | undefined;
|
|
5
5
|
fields?: string;
|
|
6
6
|
}): {
|
|
7
|
-
queryKey: (string | readonly ["conversations", "unreadCount",
|
|
7
|
+
queryKey: (string | readonly ["conversations", "unreadCount", string | number | null | undefined] | undefined)[];
|
|
8
8
|
queryFn: () => Promise<import("@solibo/solibo-sdk").ConversationCount>;
|
|
9
9
|
refetchInterval: number;
|
|
10
10
|
enabled: boolean;
|
|
@@ -8,7 +8,7 @@ export declare function documentTypesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
8
8
|
count?: number;
|
|
9
9
|
}): {
|
|
10
10
|
initialPageParam: string | undefined;
|
|
11
|
-
queryKey: (
|
|
11
|
+
queryKey: (string | number | null | undefined)[];
|
|
12
12
|
queryFn: ({ pageParam }: {
|
|
13
13
|
pageParam: any;
|
|
14
14
|
}) => Promise<import("@solibo/solibo-sdk").PagedListDocumentType>;
|
|
@@ -19,7 +19,7 @@ export declare function documentTypesQueryOptions(sdk: SoliboSDK, params: {
|
|
|
19
19
|
export declare function directoryZipQueryOptions(sdk: SoliboSDK, params: {
|
|
20
20
|
companyId?: Id | null | undefined;
|
|
21
21
|
}): {
|
|
22
|
-
queryKey: (
|
|
22
|
+
queryKey: (string | number | null | undefined)[];
|
|
23
23
|
queryFn: () => Promise<null>;
|
|
24
24
|
enabled: boolean;
|
|
25
25
|
};
|
|
@@ -27,7 +27,7 @@ export declare function typeDirectoryZipQueryOptions(sdk: SoliboSDK, params: {
|
|
|
27
27
|
companyId?: Id | null | undefined;
|
|
28
28
|
documentType?: string;
|
|
29
29
|
}): {
|
|
30
|
-
queryKey: (
|
|
30
|
+
queryKey: (string | number | null | undefined)[];
|
|
31
31
|
queryFn: () => Promise<null>;
|
|
32
32
|
enabled: boolean;
|
|
33
33
|
};
|
|
@@ -36,7 +36,7 @@ export declare function companyTypeDirectoryZipQueryOptions(sdk: SoliboSDK, para
|
|
|
36
36
|
documentType?: string;
|
|
37
37
|
documentId?: Id | null | undefined;
|
|
38
38
|
}): {
|
|
39
|
-
queryKey: (
|
|
39
|
+
queryKey: (string | number | null | undefined)[];
|
|
40
40
|
queryFn: () => Promise<null>;
|
|
41
41
|
enabled: boolean;
|
|
42
42
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
1
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
2
2
|
export function documentTypesQueryOptions(sdk, params) {
|
|
3
3
|
return {
|
|
4
4
|
initialPageParam: params.pageToken,
|
|
5
|
-
queryKey: [
|
|
5
|
+
queryKey: [
|
|
6
|
+
"documentTypes",
|
|
7
|
+
toKeyId(params.companyId),
|
|
8
|
+
params.fields,
|
|
9
|
+
params.count,
|
|
10
|
+
],
|
|
6
11
|
queryFn: ({ pageParam }) => sdk.api.documents
|
|
7
12
|
.showDocumentTypes(BigInt(params.companyId).valueOf(), params.fields, pageParam, params.autoPaginate, params.count)
|
|
8
13
|
.then((res) => res.body())
|
|
@@ -16,7 +21,7 @@ export function documentTypesQueryOptions(sdk, params) {
|
|
|
16
21
|
}
|
|
17
22
|
export function directoryZipQueryOptions(sdk, params) {
|
|
18
23
|
return {
|
|
19
|
-
queryKey: ["directoryZip", params.companyId],
|
|
24
|
+
queryKey: ["directoryZip", toKeyId(params.companyId)],
|
|
20
25
|
queryFn: () => sdk.api.documents
|
|
21
26
|
.showDirectoryZip(BigInt(params.companyId).valueOf())
|
|
22
27
|
.then(() => null),
|
|
@@ -25,7 +30,11 @@ export function directoryZipQueryOptions(sdk, params) {
|
|
|
25
30
|
}
|
|
26
31
|
export function typeDirectoryZipQueryOptions(sdk, params) {
|
|
27
32
|
return {
|
|
28
|
-
queryKey: [
|
|
33
|
+
queryKey: [
|
|
34
|
+
"typeDirectoryZip",
|
|
35
|
+
toKeyId(params.companyId),
|
|
36
|
+
params.documentType,
|
|
37
|
+
],
|
|
29
38
|
queryFn: () => sdk.api.documents
|
|
30
39
|
.showTypeDirectoryZip(BigInt(params.companyId).valueOf(), params.documentType)
|
|
31
40
|
.then(() => null),
|
|
@@ -36,9 +45,9 @@ export function companyTypeDirectoryZipQueryOptions(sdk, params) {
|
|
|
36
45
|
return {
|
|
37
46
|
queryKey: [
|
|
38
47
|
"companyTypeDirectoryZip",
|
|
39
|
-
params.companyId,
|
|
48
|
+
toKeyId(params.companyId),
|
|
40
49
|
params.documentType,
|
|
41
|
-
params.documentId,
|
|
50
|
+
toKeyId(params.documentId),
|
|
42
51
|
],
|
|
43
52
|
queryFn: () => sdk.api.documents
|
|
44
53
|
.showCompanyTypeDirectoryZip(BigInt(params.companyId).valueOf(), params.documentType, BigInt(params.documentId).valueOf())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentActions.js","sourceRoot":"","sources":["../../../../src/api/queries/document/documentActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"documentAct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CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU;KAC5E,CAAC;AACJ,CAAC","sourcesContent":["import { SoliboSDK } from \"@solibo/solibo-sdk\";\nimport { fromKt, Id, toKeyId } from \"../../../utils/kt-bridge.js\";\n\nexport function documentTypesQueryOptions(\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 \"documentTypes\",\n toKeyId(params.companyId),\n params.fields,\n params.count,\n ],\n queryFn: ({ pageParam }: { pageParam: any }) =>\n sdk.api.documents\n .showDocumentTypes(\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 enabled: !!params.companyId,\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 directoryZipQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n },\n) {\n return {\n queryKey: [\"directoryZip\", toKeyId(params.companyId)],\n queryFn: () =>\n sdk.api.documents\n .showDirectoryZip(BigInt(params.companyId!).valueOf())\n .then(() => null),\n enabled: !!params.companyId,\n };\n}\n\nexport function typeDirectoryZipQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n documentType?: string;\n },\n) {\n return {\n queryKey: [\n \"typeDirectoryZip\",\n toKeyId(params.companyId),\n params.documentType,\n ],\n queryFn: () =>\n sdk.api.documents\n .showTypeDirectoryZip(\n BigInt(params.companyId!).valueOf(),\n params.documentType!,\n )\n .then(() => null),\n enabled: !!params.companyId && !!params.documentType,\n };\n}\n\nexport function companyTypeDirectoryZipQueryOptions(\n sdk: SoliboSDK,\n params: {\n companyId?: Id | null | undefined;\n documentType?: string;\n documentId?: Id | null | undefined;\n },\n) {\n return {\n queryKey: [\n \"companyTypeDirectoryZip\",\n toKeyId(params.companyId),\n params.documentType,\n toKeyId(params.documentId),\n ],\n queryFn: () =>\n sdk.api.documents\n .showCompanyTypeDirectoryZip(\n BigInt(params.companyId!).valueOf(),\n params.documentType!,\n BigInt(params.documentId!).valueOf(),\n )\n .then(() => null),\n enabled: !!params.companyId && !!params.documentType && !!params.documentId,\n };\n}\n"]}
|
|
@@ -3,11 +3,11 @@ import { DocumentType } from "@solibo/solibo-sdk";
|
|
|
3
3
|
import { Id } from "../../../utils/kt-bridge.js";
|
|
4
4
|
export declare const documentKeys: {
|
|
5
5
|
all: readonly ["documents"];
|
|
6
|
-
list: (companyId?: Id | null | undefined) => readonly ["documents", "list",
|
|
7
|
-
belongingToId: (companyId?: Id | null | undefined, documentType?: DocumentType, id?: Id | null | undefined, parentId?: Id | null | undefined) => readonly ["documents", "belongingToId",
|
|
8
|
-
ofType: (type?: DocumentType, companyId?: Id | null | undefined, parentId?: Id | null | undefined, isDirectory?: boolean) => readonly ["documents", "ofType",
|
|
9
|
-
url: (companyId?: Id | null | undefined, documentId?: Id | null | undefined) => readonly ["documents", "url",
|
|
10
|
-
search: (companyId?: Id | null | undefined, searchString?: string) => readonly ["documents", "search",
|
|
6
|
+
list: (companyId?: Id | null | undefined) => readonly ["documents", "list", string | number | null | undefined];
|
|
7
|
+
belongingToId: (companyId?: Id | null | undefined, documentType?: DocumentType, id?: Id | null | undefined, parentId?: Id | null | undefined) => readonly ["documents", "belongingToId", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined] | readonly ["documents", "belongingToId", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined, string | number | null | undefined];
|
|
8
|
+
ofType: (type?: DocumentType, companyId?: Id | null | undefined, parentId?: Id | null | undefined, isDirectory?: boolean) => readonly ["documents", "ofType", string | number | null | undefined, DocumentType | undefined] | readonly ["documents", "ofType", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined, boolean] | readonly ["documents", "ofType", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined] | readonly ["documents", "ofType", string | number | null | undefined, DocumentType | undefined, boolean];
|
|
9
|
+
url: (companyId?: Id | null | undefined, documentId?: Id | null | undefined) => readonly ["documents", "url", string | number | null | undefined, string | number | null | undefined];
|
|
10
|
+
search: (companyId?: Id | null | undefined, searchString?: string) => readonly ["documents", "search", string | number | null | undefined, string | undefined];
|
|
11
11
|
};
|
|
12
12
|
export declare function documentsQueryOptions(sdk: SoliboSDK, params: {
|
|
13
13
|
companyId?: Id | null | undefined;
|
|
@@ -17,7 +17,7 @@ export declare function documentsQueryOptions(sdk: SoliboSDK, params: {
|
|
|
17
17
|
count?: number;
|
|
18
18
|
}): {
|
|
19
19
|
initialPageParam: string | undefined;
|
|
20
|
-
queryKey: (string | number | readonly ["documents", "list",
|
|
20
|
+
queryKey: (string | number | readonly ["documents", "list", string | number | null | undefined] | undefined)[];
|
|
21
21
|
queryFn: ({ pageParam }: {
|
|
22
22
|
pageParam: any;
|
|
23
23
|
}) => Promise<import("@solibo/solibo-sdk").PagedListDocument>;
|
|
@@ -36,7 +36,7 @@ export declare function documentsBelongingToIdQueryOptions(sdk: SoliboSDK, param
|
|
|
36
36
|
count?: number;
|
|
37
37
|
}): {
|
|
38
38
|
initialPageParam: string | undefined;
|
|
39
|
-
queryKey: (string | number | readonly ["documents", "belongingToId",
|
|
39
|
+
queryKey: (string | number | readonly ["documents", "belongingToId", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined] | readonly ["documents", "belongingToId", string | number | null | undefined, DocumentType | undefined, string | number | null | undefined, string | number | null | undefined] | undefined)[];
|
|
40
40
|
queryFn: ({ pageParam }: {
|
|
41
41
|
pageParam: any;
|
|
42
42
|
}) => Promise<import("@solibo/solibo-sdk").PagedListDocument>;
|
|
@@ -1,35 +1,45 @@
|
|
|
1
|
-
import { fromKt } from "../../../utils/kt-bridge.js";
|
|
1
|
+
import { fromKt, toKeyId } from "../../../utils/kt-bridge.js";
|
|
2
2
|
export const documentKeys = {
|
|
3
3
|
all: ["documents"],
|
|
4
|
-
list: (companyId) => [...documentKeys.all, "list", companyId],
|
|
4
|
+
list: (companyId) => [...documentKeys.all, "list", toKeyId(companyId)],
|
|
5
5
|
belongingToId: (companyId, documentType, id, parentId) => {
|
|
6
6
|
const key = [
|
|
7
7
|
...documentKeys.all,
|
|
8
8
|
"belongingToId",
|
|
9
|
-
companyId,
|
|
9
|
+
toKeyId(companyId),
|
|
10
10
|
documentType,
|
|
11
|
-
id,
|
|
11
|
+
toKeyId(id),
|
|
12
12
|
];
|
|
13
13
|
if (parentId !== undefined) {
|
|
14
|
-
return [...key, parentId];
|
|
14
|
+
return [...key, toKeyId(parentId)];
|
|
15
15
|
}
|
|
16
16
|
return key;
|
|
17
17
|
},
|
|
18
18
|
ofType: (type, companyId, parentId, isDirectory) => {
|
|
19
|
-
const base = [
|
|
19
|
+
const base = [
|
|
20
|
+
...documentKeys.all,
|
|
21
|
+
"ofType",
|
|
22
|
+
toKeyId(companyId),
|
|
23
|
+
type,
|
|
24
|
+
];
|
|
20
25
|
if (parentId !== undefined && isDirectory !== undefined) {
|
|
21
|
-
return [...base, parentId, isDirectory];
|
|
26
|
+
return [...base, toKeyId(parentId), isDirectory];
|
|
22
27
|
}
|
|
23
28
|
if (parentId !== undefined) {
|
|
24
|
-
return [...base, parentId];
|
|
29
|
+
return [...base, toKeyId(parentId)];
|
|
25
30
|
}
|
|
26
31
|
if (isDirectory !== undefined) {
|
|
27
32
|
return [...base, isDirectory];
|
|
28
33
|
}
|
|
29
34
|
return base;
|
|
30
35
|
},
|
|
31
|
-
url: (companyId, documentId) => [
|
|
32
|
-
|
|
36
|
+
url: (companyId, documentId) => [
|
|
37
|
+
...documentKeys.all,
|
|
38
|
+
"url",
|
|
39
|
+
toKeyId(companyId),
|
|
40
|
+
toKeyId(documentId),
|
|
41
|
+
],
|
|
42
|
+
search: (companyId, searchString) => [...documentKeys.all, "search", toKeyId(companyId), searchString],
|
|
33
43
|
};
|
|
34
44
|
export function documentsQueryOptions(sdk, params) {
|
|
35
45
|
return {
|