MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / listAddressBooks

Method listAddressBooks

lib/models/contacts.ts:132–149  ·  view source on GitHub ↗
(
    userId: string,
  )

Source from the content-addressed store, hash-verified

130 }
131
132 static async listAddressBooks(
133 userId: string,
134 ): Promise<AddressBook[]> {
135 const client = await getClient(userId);
136
137 const davAddressBooks: DAVObject[] = await client.fetchAddressBooks();
138
139 const addressBooks: AddressBook[] = davAddressBooks.map((davAddressBook) => {
140 const uid = davAddressBook.url.split('/').filter(Boolean).pop()!;
141
142 return {
143 ...davAddressBook,
144 uid,
145 };
146 });
147
148 return addressBooks;
149 }
150
151 static async createAddressBook(
152 userId: string,

Callers 4

getFunction · 0.80
postFunction · 0.80
postFunction · 0.80
postFunction · 0.80

Calls 2

fetchAddressBooksMethod · 0.80
getClientFunction · 0.70

Tested by

no test coverage detected