@faiber/faiber-crm 0.5.1 → 0.6.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/README.md CHANGED
@@ -1,73 +1,37 @@
1
1
  # @faiber/faiber-crm
2
2
 
3
- Leads, campaigns, sources, logs, touches, teams, workflows, reminders, escalations, webhooks, work logs, and statistics.
4
-
5
- ## Install
3
+ Typed client for the current production CRM: workspace configuration, pipelines and boards,
4
+ teams, companies, contacts, leads, deals, tasks, activities, marketing sources/campaigns,
5
+ reports, durable automation, and approval-gated Agentic insights.
6
6
 
7
7
  ```bash
8
8
  npm install @faiber/faiber-crm
9
9
  ```
10
10
 
11
- ## Configure
12
-
13
11
  ```ts
14
- import { FaiberClient, MemoryTokenProvider } from "@faiber/sdk-core";
15
- import { CrmApi } from "@faiber/faiber-crm";
12
+ import { CrmApi, FaiberClient } from "@faiber/faiber-crm";
16
13
 
17
- const tokens = new MemoryTokenProvider();
18
- const client = new FaiberClient("crm", {
14
+ const crm = new CrmApi(new FaiberClient("crm", {
19
15
  domains: { crm: process.env.FAIBER_CRM_URL! },
20
- tokenProvider: tokens,
21
- axios: { timeout: 15_000, withCredentials: true },
22
- });
23
- const api = new CrmApi(client);
16
+ authMode: "bearer",
17
+ getAccessToken: async () => accessToken,
18
+ }));
24
19
 
25
- const leads = await api.leads.list({ search: "Acme" });
26
- await api.markLeadDone(leadId);
20
+ const leads = await crm.listLeads({ q: "Acme", status: "open" });
21
+ const overview = await crm.getOverview();
22
+ await crm.moveLeadStage(leadId, { stage_id: nextStageId, version: leadVersion });
27
23
  ```
28
24
 
29
- ## Complete capability
30
-
31
- This package exposes 102 registered operations from the crm service. Common workflows have concise methods on `api`; every registered backend route is also available as a named function on `api.operations`. Generated operation input, query, response, path, verb, and permission contracts are exported from `operations.types`.
32
-
33
- | Area | Operations | HTTP methods |
34
- |---|---:|---|
35
- | `integration` | 2 | `GET` |
36
- | `lead` | 23 | `DELETE`, `GET`, `POST`, `PUT` |
37
- | `lead-campaign` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
38
- | `lead-source` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
39
- | `reminder` | 6 | `DELETE`, `GET`, `POST`, `PUT` |
40
- | `router` | 4 | `GET` |
41
- | `sos` | 17 | `DELETE`, `GET`, `POST`, `PUT` |
42
- | `stats` | 2 | `GET` |
43
- | `team` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
44
- | `team-user` | 6 | `DELETE`, `GET`, `POST`, `PUT` |
45
- | `webhook` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
46
- | `workflow` | 6 | `DELETE`, `GET`, `POST`, `PUT` |
47
- | `workflow-member` | 6 | `DELETE`, `GET`, `POST`, `PUT` |
48
- | `workflow-node` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
49
- | `worklog` | 5 | `DELETE`, `GET`, `POST`, `PUT` |
50
-
51
- CRM resources update with `PUT`, not `PATCH`. Workflow nodes and members are created under parent-ID routes; those exact operations are available under `api.operations`.
52
-
53
- ## Authentication and authorization
54
-
55
- Use a `TokenProvider` to forward the signed-in user's Bearer token, or enable `withCredentials` for secure HttpOnly cookie sessions. Permission requirements copied from service route guards are included in each operation's JSDoc. The SDK does not embed API keys, credentials, localhost URLs, sandbox hosts, or production hosts.
25
+ The package exposes all 49 currently mounted routes through `api.operations`, with concise
26
+ methods for each CRM business capability. Mutations use optimistic `version` fields and
27
+ the backend's `Idempotency-Key` header where required. All methods return complete Axios
28
+ responses and accept shared request options, including `AbortSignal` cancellation.
56
29
 
57
- ## Inputs, queries, responses, and transport
58
-
59
- All methods return the complete Axios response, including status, headers, and request IDs. Request bodies and query objects are named exported interfaces. Nested pagination uses keys such as `page[number]` and `page[size]` where required by the service. Standard Axios request options, headers, timeouts, adapters, interceptors, and `AbortSignal` cancellation are supported as the final argument.
60
-
61
- Generic REST resources are capability-guarded. Calling a legacy method that the service does not register throws `UnsupportedOperationError` before sending a request instead of producing a backend `405`.
62
-
63
- ## Errors and cancellation
64
-
65
- ```ts
66
- try {
67
- await api.client.get("/health", undefined, { signal: AbortSignal.timeout(5_000) });
68
- } catch (error) {
69
- // Axios errors retain response.status and the service error body.
70
- }
71
- ```
30
+ CRM authorization remains server enforced. Typical permissions are scoped by capability,
31
+ including `crm:lead:*`, `crm:deal:*`, `crm:company:*`, `crm:contact:*`, `crm:team:*`,
32
+ `crm:task:*`, `crm:activity:*`, `crm:marketing:*`, `crm:report:*`, `crm:automation:read`,
33
+ `crm:settings:update`, and `crm:agent:run`; `crm:admin` is the service-wide override.
72
34
 
73
- Use `@faiber/faiber-ts-sdk` when one application needs multiple Faiber services with one configuration.
35
+ The previous singular `/api/v1/lead`, workflow, reminder, SOS, and worklog resources are
36
+ not mounted by the current CRM and were removed from the public convenience client rather
37
+ than issuing requests that always return 404/405.
package/dist/.tsbuildinfo CHANGED
@@ -1 +1 @@
1
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/index.d.ts","../src/types.ts","../src/operations.types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66],[60,61,64],[60],[67,68,69,70],[67,69],[67]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2343ec253c90c370449755739733f5f429f58cffdb51a50977bb4a042012fa8f","impliedFormat":99},{"version":"26f987e0668743de897c1f91f5f23d4cbe168995a1c299a40560bc7ac41a93cf","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"82ffc9a1d95766c8f6f6bb4316b1d83e9d6a1d4ec41057d1a897cca70176bfc1","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"66a0cb4d019dd780c2fb5c2942778929ec55715bb5a0f3b80aac4c0b92e35d16","impliedFormat":99},{"version":"9ddd20da27d2051bc8dee6bda8a0a575ac8d3a01ed4fbfa50df24ead73edccf4","impliedFormat":99},{"version":"33c7bb8b205730b615be1a250f0525e1c4f8cfe63ca729898ea6d16a148e8719","signature":"bfa835be956810e81785e37c82072d3de6de68f6a8bb4d16fb9e3cdf7c58ce91","impliedFormat":99},{"version":"22bc77a42e9947b8fad58a4922f6c9fdf87f33c25c8a45f3952ba182b366c09d","signature":"826a300c547f5c271b1fa694f514bcb8bd91342e76ee0ce5fc7d88044c67deb8","impliedFormat":99},{"version":"e16415bf35023a460abf371b95524d445b24ff36920dae63dff9c681d5482112","signature":"963bf25e26ee6be972a2d7ab9327e41887a44a6d395b42c088cf0e5f3eddf6b7","impliedFormat":99}],"root":[[68,71]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[63,1],[64,2],[62,1],[67,3],[66,4],[65,4],[61,5],[71,6],[70,7],[69,8],[68,8]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/index.d.ts","../src/types.ts","../src/operations.types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66],[60,61,64],[60],[67,68,69,70],[67,69],[67,68]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2343ec253c90c370449755739733f5f429f58cffdb51a50977bb4a042012fa8f","impliedFormat":99},{"version":"6cc1f17dc5454eb1112cfb4a2e2ddc93de8c3f9016c8db7bdf0328caac374ffa","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"82ffc9a1d95766c8f6f6bb4316b1d83e9d6a1d4ec41057d1a897cca70176bfc1","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"66a0cb4d019dd780c2fb5c2942778929ec55715bb5a0f3b80aac4c0b92e35d16","impliedFormat":99},{"version":"92ad928b53550398aee405105d9bf0b77e5fcb08790544a24f69d8691f06219f","signature":"90688f8f0c1d2bd6a2dcc7e16f274df1064223b6a7d0347d44fffc6c6706ee60","impliedFormat":99},{"version":"09d373500211eca8e0377136b5ffdf9c7fb061dec5a8656e65154ffc0620c8e2","signature":"1c2804982a1e1113a2dbec54c0771a766e0a0b3b95c54730abecb83daf348b9a","impliedFormat":99},{"version":"988266dda3ad6c6eec6cdb933dc34a9086f71e38e272bba0e560823928cc2730","signature":"d7e62d2b93f73f8615e0e8f10a147285b08129ce924d297fbd17ddba60a7f7f0","impliedFormat":99},{"version":"25fc9c2533437c1b8976c45c5a870b4a827d75ba5ce917503cd7d06d2325ca81","signature":"116c85cc39ef91df7e22d571dc85f76f65c44ef6bcf3775a1c8a14a4c35a125e","impliedFormat":99}],"root":[[68,71]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[63,1],[64,2],[62,1],[67,3],[66,4],[65,4],[61,5],[71,6],[70,7],[69,8],[68,7]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
package/dist/index.d.ts CHANGED
@@ -1,26 +1,56 @@
1
- import { RestResource, ServiceApi, type Identifier, type RequestOptions } from "@faiber/sdk-core";
2
- import type * as T from "./types.js";
3
- type R<E extends T.CrmEntity, C, U, L, S> = RestResource<E, C, U, L, S>;
1
+ import { ServiceApi, type Identifier, type RequestOptions } from "@faiber/sdk-core";
4
2
  import { CrmOperations } from "./operations.js";
3
+ import type * as O from "./operations.types.js";
4
+ /** Current production CRM API mounted by `infera-crm` under `/api/v1`. */
5
5
  export declare class CrmApi extends ServiceApi {
6
6
  readonly operations: CrmOperations;
7
- readonly leads: R<T.Lead, T.CreateLeadInput, T.UpdateLeadInput, T.LeadListResponse, T.LeadResponse>;
8
- readonly workflows: R<T.Workflow, T.CreateWorkflowInput, T.UpdateWorkflowInput, T.WorkflowListResponse, T.WorkflowResponse>;
9
- readonly workflowNodes: R<T.WorkflowNode, T.CreateWorkflowNodeInput, T.UpdateWorkflowNodeInput, T.WorkflowNodeListResponse, T.WorkflowNodeResponse>;
10
- readonly workflowMembers: R<T.WorkflowMember, T.CreateWorkflowMemberInput, T.UpdateWorkflowMemberInput, T.WorkflowMemberListResponse, T.WorkflowMemberResponse>;
11
- readonly teams: R<T.Team, T.CreateTeamInput, T.UpdateTeamInput, T.TeamListResponse, T.TeamResponse>;
12
- readonly teamUsers: R<T.TeamUser, T.CreateTeamUserInput, T.UpdateTeamUserInput, T.TeamUserListResponse, T.TeamUserResponse>;
13
- readonly worklogs: R<T.Worklog, T.CreateWorklogInput, T.UpdateWorklogInput, T.WorklogListResponse, T.WorklogResponse>;
14
- readonly reminders: R<T.Reminder, T.CreateReminderInput, T.UpdateReminderInput, T.ReminderListResponse, T.ReminderResponse>;
15
- readonly escalations: R<T.Escalation, T.CreateEscalationInput, T.UpdateEscalationInput, T.EscalationListResponse, T.EscalationResponse>;
16
- leadStats(options?: RequestOptions): Promise<import("axios").AxiosResponse<T.LeadStatsResponse, any, {}>>;
17
- dailyStats(options?: RequestOptions): Promise<import("axios").AxiosResponse<T.DailyStatsResponse, any, {}>>;
18
- markLeadDone(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<T.MarkLeadDoneResponse, import("@faiber/sdk-core").JsonObject, {}>>;
19
- addLeadLog(id: Identifier, data: T.LeadLogInput, options?: RequestOptions<T.LeadLogInput>): Promise<import("axios").AxiosResponse<T.LeadLogResponse, T.LeadLogInput, {}>>;
20
- addLeadTouch(id: Identifier, data: T.LeadTouchInput, options?: RequestOptions<T.LeadTouchInput>): Promise<import("axios").AxiosResponse<T.LeadTouchResponse, T.LeadTouchInput, {}>>;
7
+ context(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiContextGetResponseData>, unknown, {}>>;
8
+ listPipelines(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmPipelinesResponse, unknown, {}>>;
9
+ listTeams(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiTeamsGetResponseItem[]>, unknown, {}>>;
10
+ createTeam(data: O.ApiCreateTeamPostInput, options?: RequestOptions<O.ApiCreateTeamPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateTeamPostResponseData>, O.ApiCreateTeamPostInput, {}>>;
11
+ getTeam(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmTeamDetailResponse, unknown, {}>>;
12
+ addTeamMember(teamId: Identifier, data: O.ApiAddTeamMemberPostInput, options?: RequestOptions<O.ApiAddTeamMemberPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiAddTeamMemberPostResponseData>, O.ApiAddTeamMemberPostInput, {}>>;
13
+ listCompanies(params?: O.ApiCompaniesGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmCompanyListResponse, unknown, {}>>;
14
+ createCompany(data: O.ApiCreateCompanyPostInput, options?: RequestOptions<O.ApiCreateCompanyPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateCompanyPostResponseData>, O.ApiCreateCompanyPostInput, {}>>;
15
+ getCompany(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCompanyGetResponseData>, unknown, {}>>;
16
+ updateCompany(id: Identifier, data: O.ApiUpdateCompanyPatchInput, options?: RequestOptions<O.ApiUpdateCompanyPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateCompanyPatchResponseData>, O.ApiUpdateCompanyPatchInput, {}>>;
17
+ listContacts(params?: O.ApiContactsGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmContactListResponse, unknown, {}>>;
18
+ createContact(data: O.ApiCreateContactPostInput, options?: RequestOptions<O.ApiCreateContactPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateContactPostResponseData>, O.ApiCreateContactPostInput, {}>>;
19
+ getContact(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiContactGetResponseData>, unknown, {}>>;
20
+ updateContact(id: Identifier, data: O.ApiUpdateContactPatchInput, options?: RequestOptions<O.ApiUpdateContactPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateContactPatchResponseData>, O.ApiUpdateContactPatchInput, {}>>;
21
+ listLeads(params?: O.ApiLeadsGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmLeadListResponse, unknown, {}>>;
22
+ createLead(data: O.ApiCreateLeadPostInput, options?: RequestOptions<O.ApiCreateLeadPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateLeadPostResponseData>, O.ApiCreateLeadPostInput, {}>>;
23
+ getLead(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiLeadGetResponseData>, unknown, {}>>;
24
+ updateLead(id: Identifier, data: O.ApiUpdateLeadPatchInput, options?: RequestOptions<O.ApiUpdateLeadPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateLeadPatchResponseData>, O.ApiUpdateLeadPatchInput, {}>>;
25
+ moveLeadStage(id: Identifier, data: O.ApiMoveLeadStagePatchInput, options?: RequestOptions<O.ApiMoveLeadStagePatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiMoveLeadStagePatchResponseData>, O.ApiMoveLeadStagePatchInput, {}>>;
26
+ assignLead(id: Identifier, data: O.ApiAssignLeadPatchInput, options?: RequestOptions<O.ApiAssignLeadPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiAssignLeadPatchResponseData>, O.ApiAssignLeadPatchInput, {}>>;
27
+ listDeals(params?: O.ApiDealsGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmDealListResponse, unknown, {}>>;
28
+ createDeal(data: O.ApiCreateDealPostInput, options?: RequestOptions<O.ApiCreateDealPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateDealPostResponseData>, O.ApiCreateDealPostInput, {}>>;
29
+ getDeal(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiDealGetResponseData>, unknown, {}>>;
30
+ updateDeal(id: Identifier, data: O.ApiUpdateDealPatchInput, options?: RequestOptions<O.ApiUpdateDealPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateDealPatchResponseData>, O.ApiUpdateDealPatchInput, {}>>;
31
+ moveDealStage(id: Identifier, data: O.ApiMoveDealStagePatchInput, options?: RequestOptions<O.ApiMoveDealStagePatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiMoveDealStagePatchResponseData>, O.ApiMoveDealStagePatchInput, {}>>;
32
+ assignDeal(id: Identifier, data: O.ApiAssignDealPatchInput, options?: RequestOptions<O.ApiAssignDealPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiAssignDealPatchResponseData>, O.ApiAssignDealPatchInput, {}>>;
33
+ getBoard(entityType: "lead" | "deal", pipelineId: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmBoardResponse, unknown, {}>>;
34
+ listTasks(params?: O.ApiTasksGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmTaskListResponse, unknown, {}>>;
35
+ createTask(data: O.ApiCreateTaskPostInput, options?: RequestOptions<O.ApiCreateTaskPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateTaskPostResponseData>, O.ApiCreateTaskPostInput, {}>>;
36
+ updateTaskStatus(id: Identifier, data: O.ApiUpdateTaskStatusPatchInput, options?: RequestOptions<O.ApiUpdateTaskStatusPatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateTaskStatusPatchResponseData>, O.ApiUpdateTaskStatusPatchInput, {}>>;
37
+ listActivities(params?: O.ApiActivitiesGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmActivityListResponse, unknown, {}>>;
38
+ createActivity(data: O.ApiCreateActivityPostInput, options?: RequestOptions<O.ApiCreateActivityPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateActivityPostResponseData>, O.ApiCreateActivityPostInput, {}>>;
39
+ listSources(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiSourcesGetResponseItem[]>, unknown, {}>>;
40
+ createSource(data: O.ApiCreateSourcePostInput, options?: RequestOptions<O.ApiCreateSourcePostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateSourcePostResponseData>, O.ApiCreateSourcePostInput, {}>>;
41
+ listCampaigns(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCampaignsGetResponseItem[]>, unknown, {}>>;
42
+ createCampaign(data: O.ApiCreateCampaignPostInput, options?: RequestOptions<O.ApiCreateCampaignPostInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiCreateCampaignPostResponseData>, O.ApiCreateCampaignPostInput, {}>>;
43
+ updateWorkspace(data: O.ApiUpdateWorkspacePatchInput, options?: RequestOptions<O.ApiUpdateWorkspacePatchInput>): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiUpdateWorkspacePatchResponseData>, O.ApiUpdateWorkspacePatchInput, {}>>;
44
+ getOverview(params?: O.ApiOverviewGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmOverviewResponse, unknown, {}>>;
45
+ refreshReports(params?: O.ApiRefreshReportsPostQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmReportRefreshResponse, unknown, {}>>;
46
+ getReportCatalog(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmReportCatalogResponse, unknown, {}>>;
47
+ getReportRun(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiReportRunGetResponseData>, unknown, {}>>;
48
+ requestAgenticInsight(id: Identifier, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmAgenticInsightResponse, unknown, {}>>;
49
+ listAutomationJobs(params?: O.ApiAutomationJobsGetQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmAutomationJobListResponse, unknown, {}>>;
50
+ listAutomationWebhooks(options?: RequestOptions): Promise<import("axios").AxiosResponse<import("./types.js").CrmApiResponse<O.ApiAutomationWebhooksGetResponseItem[]>, unknown, {}>>;
21
51
  }
22
52
  export * from "./types.js";
23
- export * from "@faiber/sdk-core";
24
53
  export * from "./operations.js";
25
54
  export * from "./operations.types.js";
55
+ export * from "@faiber/sdk-core";
26
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,KAAK,CAAC,MAAM,YAAY,CAAC;AACrC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,qBAAa,MAAO,SAAQ,UAAU;IAClC,QAAQ,CAAC,UAAU,gBAAkC;IACrD,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,YAAY,CAAC,CAAgJ;IACnP,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CA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AAc;IACzC,YAAY,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,cAAc;IACrD,qBAAqB,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,cAAc;IAC9D,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc;IACjF,sBAAsB,CAAC,OAAO,CAAC,EAAE,cAAc;CAChD;AAED,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,24 +1,55 @@
1
- import { RestResource, ServiceApi } from "@faiber/sdk-core";
1
+ import { ServiceApi } from "@faiber/sdk-core";
2
2
  import { CrmOperations } from "./operations.js";
3
+ /** Current production CRM API mounted by `infera-crm` under `/api/v1`. */
3
4
  export class CrmApi extends ServiceApi {
4
5
  operations = new CrmOperations(this.client);
5
- leads = new RestResource(this.client, "/api/v1/lead", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
6
- workflows = new RestResource(this.client, "/api/v1/workflow", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
7
- workflowNodes = new RestResource(this.client, "/api/v1/workflow-node", { supported: ["list", "show", "update", "replace", "delete"], updateMethod: "PUT" });
8
- workflowMembers = new RestResource(this.client, "/api/v1/workflow-members", { supported: ["list", "show", "update", "replace", "delete"], updateMethod: "PUT" });
9
- teams = new RestResource(this.client, "/api/v1/team", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
10
- teamUsers = new RestResource(this.client, "/api/v1/team-users", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
11
- worklogs = new RestResource(this.client, "/api/v1/worklog", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
12
- reminders = new RestResource(this.client, "/api/v1/reminder", { supported: ["list", "create", "update", "replace", "delete"], updateMethod: "PUT" });
13
- escalations = new RestResource(this.client, "/api/v1/sos", { supported: ["list", "show", "create", "update", "replace", "delete"], updateMethod: "PUT" });
14
- leadStats(options) { return this.client.get("/api/v1/stats/lead", undefined, options); }
15
- dailyStats(options) { return this.client.get("/api/v1/stats/daily", undefined, options); }
16
- markLeadDone(id, options) { return this.client.put(`/api/v1/lead/${encodeURIComponent(id)}/move-to-done`, undefined, options); }
17
- addLeadLog(id, data, options) { return this.client.post(`/api/v1/lead/${encodeURIComponent(id)}/log`, data, options); }
18
- addLeadTouch(id, data, options) { return this.client.post(`/api/v1/lead/${encodeURIComponent(id)}/touch`, data, options); }
6
+ context(options) { return this.operations.apiContextGet(options); }
7
+ listPipelines(options) { return this.operations.apiPipelinesGet(options); }
8
+ listTeams(options) { return this.operations.apiTeamsGet(options); }
9
+ createTeam(data, options) { return this.operations.apiCreateTeamPost(data, options); }
10
+ getTeam(id, options) { return this.operations.apiTeamGet(id, options); }
11
+ addTeamMember(teamId, data, options) { return this.operations.apiAddTeamMemberPost(teamId, data, options); }
12
+ listCompanies(params, options) { return this.operations.apiCompaniesGet(params, options); }
13
+ createCompany(data, options) { return this.operations.apiCreateCompanyPost(data, options); }
14
+ getCompany(id, options) { return this.operations.apiCompanyGet(id, options); }
15
+ updateCompany(id, data, options) { return this.operations.apiUpdateCompanyPatch(id, data, options); }
16
+ listContacts(params, options) { return this.operations.apiContactsGet(params, options); }
17
+ createContact(data, options) { return this.operations.apiCreateContactPost(data, options); }
18
+ getContact(id, options) { return this.operations.apiContactGet(id, options); }
19
+ updateContact(id, data, options) { return this.operations.apiUpdateContactPatch(id, data, options); }
20
+ listLeads(params, options) { return this.operations.apiLeadsGet(params, options); }
21
+ createLead(data, options) { return this.operations.apiCreateLeadPost(data, options); }
22
+ getLead(id, options) { return this.operations.apiLeadGet(id, options); }
23
+ updateLead(id, data, options) { return this.operations.apiUpdateLeadPatch(id, data, options); }
24
+ moveLeadStage(id, data, options) { return this.operations.apiMoveLeadStagePatch(id, data, options); }
25
+ assignLead(id, data, options) { return this.operations.apiAssignLeadPatch(id, data, options); }
26
+ listDeals(params, options) { return this.operations.apiDealsGet(params, options); }
27
+ createDeal(data, options) { return this.operations.apiCreateDealPost(data, options); }
28
+ getDeal(id, options) { return this.operations.apiDealGet(id, options); }
29
+ updateDeal(id, data, options) { return this.operations.apiUpdateDealPatch(id, data, options); }
30
+ moveDealStage(id, data, options) { return this.operations.apiMoveDealStagePatch(id, data, options); }
31
+ assignDeal(id, data, options) { return this.operations.apiAssignDealPatch(id, data, options); }
32
+ getBoard(entityType, pipelineId, options) { return this.operations.apiBoardGet(entityType, pipelineId, options); }
33
+ listTasks(params, options) { return this.operations.apiTasksGet(params, options); }
34
+ createTask(data, options) { return this.operations.apiCreateTaskPost(data, options); }
35
+ updateTaskStatus(id, data, options) { return this.operations.apiUpdateTaskStatusPatch(id, data, options); }
36
+ listActivities(params, options) { return this.operations.apiActivitiesGet(params, options); }
37
+ createActivity(data, options) { return this.operations.apiCreateActivityPost(data, options); }
38
+ listSources(options) { return this.operations.apiSourcesGet(options); }
39
+ createSource(data, options) { return this.operations.apiCreateSourcePost(data, options); }
40
+ listCampaigns(options) { return this.operations.apiCampaignsGet(options); }
41
+ createCampaign(data, options) { return this.operations.apiCreateCampaignPost(data, options); }
42
+ updateWorkspace(data, options) { return this.operations.apiUpdateWorkspacePatch(data, options); }
43
+ getOverview(params, options) { return this.operations.apiOverviewGet(params, options); }
44
+ refreshReports(params, options) { return this.operations.apiRefreshReportsPost(params, options); }
45
+ getReportCatalog(options) { return this.operations.apiReportCatalogGet(options); }
46
+ getReportRun(id, options) { return this.operations.apiReportRunGet(id, options); }
47
+ requestAgenticInsight(id, options) { return this.operations.apiRequestAgenticInsightPost(id, options); }
48
+ listAutomationJobs(params, options) { return this.operations.apiAutomationJobsGet(params, options); }
49
+ listAutomationWebhooks(options) { return this.operations.apiAutomationWebhooksGet(options); }
19
50
  }
20
51
  export * from "./types.js";
21
- export * from "@faiber/sdk-core";
22
52
  export * from "./operations.js";
23
53
  export * from "./operations.types.js";
54
+ export * from "@faiber/sdk-core";
24
55
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAwC,MAAM,kBAAkB,CAAC;AAGlG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,MAAM,OAAO,MAAO,SAAQ,UAAU;IACzB,UAAU,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,KAAK,GAAwF,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1O,SAAS,GAA4G,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAkB,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IACtQ,aAAa,GAAgI,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IACzR,eAAe,GAA0I,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,YA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