@gymspace/sdk 1.2.5 → 1.2.9
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/.tsbuildinfo +1 -0
- package/dist/index.d.mts +269 -157
- package/dist/index.d.ts +269 -157
- package/dist/index.js +311 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +302 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/check-ins.ts +6 -4
- package/src/models/clients.ts +1 -13
- package/src/models/collaborators.ts +2 -84
- package/src/models/dashboard.ts +26 -1
- package/src/models/index.ts +4 -3
- package/src/models/invitations.ts +2 -46
- package/src/models/payment-methods.ts +15 -2
- package/src/models/roles.ts +1 -23
- package/src/models/whatsapp.ts +142 -0
- package/src/resources/admin-subscription-management.ts +1 -1
- package/src/resources/clients.ts +27 -28
- package/src/resources/collaborators.ts +14 -14
- package/src/resources/contracts.ts +27 -19
- package/src/resources/dashboard.ts +11 -1
- package/src/resources/index.ts +3 -1
- package/src/resources/invitations.ts +11 -14
- package/src/resources/roles.ts +2 -1
- package/src/resources/sales.ts +28 -25
- package/src/resources/whatsapp-templates.ts +80 -0
- package/src/resources/whatsapp.ts +97 -0
- package/src/sdk.ts +28 -3
- package/src/types.ts +2 -2
- package/src/utils/agent-fetch.ts +25 -0
|
@@ -0,0 +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.dom.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.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../node_modules/@gymspace/shared/src/enums.ts","../node_modules/@gymspace/shared/src/types.ts","../node_modules/@gymspace/shared/src/interfaces.ts","../node_modules/@gymspace/shared/src/constants.ts","../node_modules/@gymspace/shared/src/utils/rolehelpers.ts","../node_modules/@gymspace/shared/src/index.ts","../src/types.ts","../src/errors.ts","../src/client.ts","../src/utils/agent-fetch.ts","../src/models/subscriptions.ts","../src/models/auth.ts","../src/resources/base.ts","../src/resources/auth.ts","../src/models/organizations.ts","../src/resources/organizations.ts","../src/models/gyms.ts","../src/resources/gyms.ts","../src/resources/collaborators.ts","../src/models/roles.ts","../src/resources/roles.ts","../src/models/clients.ts","../src/resources/clients.ts","../src/models/membership-plans.ts","../src/resources/membership-plans.ts","../src/models/contracts.ts","../src/resources/contracts.ts","../src/models/dashboard.ts","../src/resources/dashboard.ts","../src/models/evaluations.ts","../src/resources/evaluations.ts","../src/models/check-ins.ts","../src/resources/check-ins.ts","../src/resources/invitations.ts","../src/models/leads.ts","../src/resources/leads.ts","../src/models/assets.ts","../src/resources/assets.ts","../src/models/files.ts","../src/resources/files.ts","../src/resources/public-catalog.ts","../src/resources/health.ts","../src/models/onboarding.ts","../src/resources/onboarding.ts","../src/models/products.ts","../src/resources/products.ts","../src/models/sales.ts","../src/resources/sales.ts","../src/models/suppliers.ts","../src/resources/suppliers.ts","../src/models/users.ts","../src/resources/users.ts","../src/resources/subscriptions.ts","../src/resources/subscription-plans.ts","../src/resources/admin-subscription-management.ts","../src/models/payment-methods.ts","../src/resources/payment-methods.ts","../src/models/whatsapp.ts","../src/resources/whatsapp.ts","../src/resources/whatsapp-templates.ts","../src/resources/index.ts","../src/sdk.ts","../src/models/subscription-plans.ts","../src/models/admin-subscription-management.ts","../src/models/index.ts","../src/index.ts","../src/models/collaborators.ts","../src/models/invitations.ts"],"fileIdsList":[[48,49,50,51,52],[48,49],[48],[47,54,55],[54,55,56,108,109,112],[102],[58],[54],[53,54],[58,59,62,64,67,69,71,73,75,77,79,82,84,86,90,92,94,96,98,103,105,110,111],[101],[54,60],[60,84],[54,58,59,60],[54,56],[54,60,79],[54,60,69],[53,54,60],[54,60,73],[60,75],[54,60,77],[60,86],[54,60,64],[61,63,65,66,68,70,72,74,76,78,80,81,83,85,87,88,89,91,93,95,97,99,100,101,102,104,106,107],[54,60,82],[54,60,71],[60,90],[54,60,62],[54,60,103],[54,60,92],[53,54,60,67],[54,60,94],[54,58,60],[54,60,96],[54,60,98],[54,60,105],[54,56,57,108],[53],[56]],"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":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","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":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7584239b853f690c6629ae8bb683ded6ff33104e7835778bbca5ee1b1d9a0a91","impliedFormat":99},{"version":"59447ec0c087e949aff08c7427138b630052186656ac3a59bacbf9f4f1edc51a","impliedFormat":1},{"version":"4f3dedee1045f028eb497abd7852dce698154d84bd522d8f8f0ce6746a79c82d","impliedFormat":1},{"version":"5d43729825004f65a169ceb8cb72c4a2902571ab455c380b733f79a29764a6d2","impliedFormat":1},{"version":"832b4064c21b686fc8d772ab2da33bbac48b90812cf1473a961b8f0c3c9c7902","impliedFormat":1},{"version":"c934cb299bc6f46910e61a6655ed654f00036817c3474499cb6c4ebc72c2fddc","impliedFormat":1},{"version":"404ab034c2979575815205824be53db9591fa4395ca07b1e781147379ffa0862","impliedFormat":1},"de5d423a7d7a14ed12522b42b44d13092b78d34680c316843b3fcad988b70747","122f963f839dffe02992f3c29c4f9d22c8be0bf865bd4015498e9a55b718d2ef","90bf42b7706ce86aa1abb0459070ed8a791df5a25c8cc9ff53a1a99b97368495","358f0833c081a5ba5dd957d18530f507688c922f08054c12a78e0d42534a3bbc","1f4b35f3ef5469339a539c3f9e1200317bc89280c1dcb516bc2f5e85c946c69a","149cf742da9555355188424cd94735ae7bfce96f65093bad92a680208b079e6e","5fc81afdf7085284bdd04bb7b3de97769515daa5d8b2a4cecb1d4c2300b4a510","ddcce7fd9825940c4ac822754bc8ca63086567722579b89617fe8e30c8016a43","e1f06446f9832d772b1171202840aa54d56411c7470f3e1b7736e3b95210bd0e","c15d9e507818d695186b1aec0270d313a5138af35222d30cd41f95c117065056","3d6655ae4240d80051be30efed2f9d806a65ace098fd042dd540b4a6d2cdc360","b5d21ae30bb2f3b557c1ded9fdc330cfae555c8f2beba21f0a75f98de969ace3","62eb992c4944eb724c9bc4a531f8c954a7aa94301b52f172cc69b335b738588c","2b949dc19987d2217953b362864780adabb1318bf2c6be5a76ca6a59220c7bf3","58e5f7be56dc310c730db38ab7df7bc1e17742bd54e55356f70def71cf45a847","5504dc0145d3ee6dc438af810eb98fb298fd60d9f5032efc7b1307f323f5b22e","61ec2be27c14fb6dd017426ccad9573d4195dece4182782fd36e9e584b9ba599","e980f13a6ed4125a5d9548b689c8bdc3abb89fd0e53814719471d93342ec35a8","3caa6231ff6fb326b46c622f7160201b613704084ec83cb1b2733e50bfcf9048","e8ad418077b9f77ea2fb9c21010e497f52584b48f7cc0c1fe726a86f30e8dc1e","44943bf390ded7d59f8d4ba7e55d9bafda899b6f932862d0af2adfd169615d94","8270f7d00d71bf731a659f282e937fc38c2ca7a29a6c5654cd71d1b3df2fcdb4","b51bb35f550a6eef49c0c6a1fe901e70953ce8e559b834a46180c0de9b325e7f","40fb11e476903b62932b7fc97d2b7fcf71063fa76cc79b06ab100e2ca57d0cc2","78452ee8362d95efb5e716d6fb8be3835c49bf6923736ba25203c95b1cba3461","c889229b1ef4feb8c01af26398fe92e82c8ff5035703d60a5f0e3c778e1a1250","11cb1ece5ce2685b9ca8b2d9d0d001c7a994231b29c054a87ddf4bb1fbc74808","ec85197fef597394a4c9d6d8ac026e3fb9d035af736c92cd0629ec51dec13c3a","379e1259bc7e50ee2ae24b5a50f0df0603856bfb9866a094e9411ed34ee1c325","728f310d8f2f9888130ffe274d722b9ef011dc3071aa705d86bf9175380e1608","8d5e02343427bb0f8cd07e25f13fea96f16fda4d20c4bd0bb4eb5cb950fdfb85","8ca018e6dd4960711bcfc9a62bd4dba80794d7d436a61631339054042fdcd7a1","0318a89ce8ab11333f2110b24f21182b5cbe337d633e86c2f2c8be2371d876fd","5f627cd620351e3e4ed705f0abd6d84d289dd8141a781060954f074f93036634","b3ec36923f326647ea8de2f0299b8d9247db09501df1807a688ce09a61eb5652","33253a790da4c3c4ca6fac42efe83f1f78f55d2a5d66a84a98ef2c24b92b12f8","e1496c85dd633293f609f89403886d4c113092574d7a8bbaf7f30cefcdcd2c46","84615e2a24d394d7e4dcbce62e2fdbc5b6a6320b4cae035083decd8faf93f0f2","6744a1e82c1cc00672ebee75b18b300a43fc904a17d480cef8994f4dd029db98","badf05b54c3a0a9229f2bf9dade36d15e045c3b6ac1d00d5f5daa3abeb2f637c","98b2be0257b290cd82d28207558424ccca1cbebd2f67b9d68205a2d9e3311785","738fccb61792698f202ad9902216584de09511cdd603349a1a164de9b89518f5","f81a07114fdf317c63b63299df9599f2a4f3dae2d1109d661eb3752847c8d489","63aa5ef7c1fad8d6758f25e968e57a4973582866fa08a3429761597653eb39f2","5a323df23f74a335e727b2273b69b49a93c877c930a91d59c219dd69a8361ace","05b2c94345341a306f1635d9cc7f42e2af5df9d9a5f9d8399e1560e774566e50","6ac3496933bea2ed5aa344ce23d763219b5118f3b35df3b5f671513a4323df67","f5b1cdd53d8feb4d8172786b9065bb7050f118473bee905c0380c5b9c84eb7c8","5d462ef9ef9b1c810ce4b02405053cda17356f64c2c1ca33b0917eac126b7db1","8600a3e4ecd76c9802152932260497a64114f3f0c40b721b8c2a7fbd91950dfc","8debea7ccde025344899f5ff7c4dd30c59fd41b487cf49f82bc1423209ce2903","e9a6a6067866d93271655e066539ae22687dad13aa6f864ffec2e0f06de10600","6d0f299b4c433721a61c81e7d71cd06cb5768e4f1c8879cc1c8466dc83eea7ce","038353dc059db1b2aee89acea285136ae3e6980b7a00dfa055749a8c9c69446d","36419f7e11df0fca8712eb769aae3ce93d5431716ade3ca873283e31add685c7","120e47ec10c28ef0eb48c71a813223bb2b03fdc066aea68a1415589bfceb9585","630a65d71ba7571e9880f174146ef544d2818cbcf85440869823a3c69bb13438","0f397304d0d60d06be9e49ff7d18dbfc4a3fa5b3f5d72e08d77c1bf1601bf4f6","1ae42e7d6cb510737f0d67b94f98f922b2ac8fb3347b0aa37b749e5f0ae12c9c","6581f800df7e785c8aab229f06bef765ad781f0bb353091a0f23375694c7891e","2889a5f3b6a7d9cd1dd50870cfd7d33b44fd5fb2b65a007e7324e4fcbf731981","2889a5f3b6a7d9cd1dd50870cfd7d33b44fd5fb2b65a007e7324e4fcbf731981"],"root":[[54,115]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"outDir":"./","rootDir":"../src","skipLibCheck":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[53,1],[50,2],[49,3],[56,4],[113,5],[111,6],[59,7],[79,8],[73,9],[77,8],[112,10],[82,9],[103,8],[92,8],[94,8],[110,11],[96,8],[105,8],[102,12],[85,13],[61,14],[60,15],[80,16],[70,17],[66,18],[74,19],[76,20],[78,21],[87,22],[65,23],[89,12],[108,24],[81,18],[83,25],[72,26],[91,27],[63,28],[104,29],[93,30],[88,12],[68,31],[95,32],[101,12],[100,33],[97,34],[99,35],[107,36],[106,36],[109,37],[54,38],[57,39]],"affectedFilesPendingEmit":[[56,49],[55,49],[113,49],[111,49],[84,49],[59,49],[79,49],[69,49],[114,49],[73,49],[75,49],[77,49],[86,49],[64,49],[112,49],[115,49],[82,49],[71,49],[90,49],[62,49],[103,49],[92,49],[67,49],[94,49],[110,49],[58,49],[96,49],[98,49],[105,49],[102,49],[85,49],[61,49],[60,49],[80,49],[70,49],[66,49],[74,49],[76,49],[78,49],[87,49],[65,49],[89,49],[108,49],[81,49],[83,49],[72,49],[91,49],[63,49],[104,49],[93,49],[88,49],[68,49],[95,49],[101,49],[100,49],[97,49],[99,49],[107,49],[106,49],[109,49],[54,49],[57,49]],"emitSignatures":[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"version":"5.9.3"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { PaginationParams as PaginationParams$1, ContractStatus,
|
|
2
|
+
import { PaginationParams as PaginationParams$1, ListCollaboratorsParams, Collaborator, UpdateCollaboratorDto, UpdateCollaboratorRoleDto, UpdateCollaboratorStatusDto, ActivityQueryParams, ActivityItem, StatsQueryParams, CollaboratorStats, Role, ContractStatus, CreateInvitationDto, Invitation, ValidateByCodeDto, AcceptInvitationDto, LeadStatus } from '@gymspace/shared';
|
|
3
3
|
export * from '@gymspace/shared';
|
|
4
4
|
|
|
5
5
|
interface GymSpaceConfig {
|
|
@@ -549,117 +549,17 @@ declare class GymsResource extends BaseResource {
|
|
|
549
549
|
updateGymSocialMedia(id: string, data: UpdateGymSocialMediaDto, options?: RequestOptions): Promise<Gym>;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
-
interface Collaborator {
|
|
553
|
-
id: string;
|
|
554
|
-
userId: string;
|
|
555
|
-
gymId: string;
|
|
556
|
-
roleId: string;
|
|
557
|
-
status: 'pending' | 'active' | 'inactive';
|
|
558
|
-
hiredDate?: string;
|
|
559
|
-
profilePhotoId?: string;
|
|
560
|
-
coverPhotoId?: string;
|
|
561
|
-
description?: string;
|
|
562
|
-
specialties?: any;
|
|
563
|
-
user?: {
|
|
564
|
-
id: string;
|
|
565
|
-
name: string;
|
|
566
|
-
email: string;
|
|
567
|
-
phone?: string;
|
|
568
|
-
};
|
|
569
|
-
role?: {
|
|
570
|
-
id: string;
|
|
571
|
-
name: string;
|
|
572
|
-
permissions: string[];
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
interface ListCollaboratorsParams {
|
|
576
|
-
page: number;
|
|
577
|
-
limit: number;
|
|
578
|
-
status?: 'pending' | 'active' | 'inactive';
|
|
579
|
-
roleId?: string;
|
|
580
|
-
search?: string;
|
|
581
|
-
}
|
|
582
|
-
interface UpdateCollaboratorDto {
|
|
583
|
-
hiredDate?: string;
|
|
584
|
-
profilePhotoId?: string;
|
|
585
|
-
coverPhotoId?: string;
|
|
586
|
-
description?: string;
|
|
587
|
-
specialties?: any;
|
|
588
|
-
}
|
|
589
|
-
interface UpdateStatusDto {
|
|
590
|
-
status: 'active' | 'inactive';
|
|
591
|
-
}
|
|
592
|
-
interface UpdateRoleDto {
|
|
593
|
-
roleId: string;
|
|
594
|
-
}
|
|
595
|
-
interface ActivityQueryParams {
|
|
596
|
-
startDate?: string;
|
|
597
|
-
endDate?: string;
|
|
598
|
-
limit?: number;
|
|
599
|
-
type?: string;
|
|
600
|
-
}
|
|
601
|
-
interface StatsQueryParams {
|
|
602
|
-
startDate?: string;
|
|
603
|
-
endDate?: string;
|
|
604
|
-
}
|
|
605
|
-
interface CollaboratorStats {
|
|
606
|
-
contracts: {
|
|
607
|
-
total: number;
|
|
608
|
-
totalAmount: number;
|
|
609
|
-
averageAmount: number;
|
|
610
|
-
};
|
|
611
|
-
checkIns: {
|
|
612
|
-
total: number;
|
|
613
|
-
};
|
|
614
|
-
sales: {
|
|
615
|
-
total: number;
|
|
616
|
-
totalAmount: number;
|
|
617
|
-
};
|
|
618
|
-
clients: {
|
|
619
|
-
created: number;
|
|
620
|
-
};
|
|
621
|
-
}
|
|
622
|
-
interface ActivityItem {
|
|
623
|
-
type: string;
|
|
624
|
-
timestamp: string;
|
|
625
|
-
description: string;
|
|
626
|
-
metadata: any;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
552
|
declare class CollaboratorsResource extends BaseResource {
|
|
630
553
|
private basePath;
|
|
631
554
|
list(params?: ListCollaboratorsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Collaborator>>;
|
|
632
555
|
get(id: string, options?: RequestOptions): Promise<Collaborator>;
|
|
633
556
|
update(id: string, data: UpdateCollaboratorDto, options?: RequestOptions): Promise<Collaborator>;
|
|
634
|
-
updateRole(id: string,
|
|
635
|
-
updateStatus(id: string,
|
|
557
|
+
updateRole(id: string, data: UpdateCollaboratorRoleDto, options?: RequestOptions): Promise<Collaborator>;
|
|
558
|
+
updateStatus(id: string, data: UpdateCollaboratorStatusDto, options?: RequestOptions): Promise<Collaborator>;
|
|
636
559
|
getActivity(id: string, params?: ActivityQueryParams, options?: RequestOptions): Promise<ActivityItem[]>;
|
|
637
560
|
getStats(id: string, params?: StatsQueryParams, options?: RequestOptions): Promise<CollaboratorStats>;
|
|
638
561
|
}
|
|
639
562
|
|
|
640
|
-
interface Role {
|
|
641
|
-
id: string;
|
|
642
|
-
name: string;
|
|
643
|
-
description: string | null;
|
|
644
|
-
permissions: string[];
|
|
645
|
-
canManageEvaluations: boolean;
|
|
646
|
-
organizationId: string;
|
|
647
|
-
createdByUserId: string | null;
|
|
648
|
-
updatedByUserId: string | null;
|
|
649
|
-
createdAt: string;
|
|
650
|
-
updatedAt: string;
|
|
651
|
-
deletedAt: string | null;
|
|
652
|
-
createdBy?: {
|
|
653
|
-
id: string;
|
|
654
|
-
name: string;
|
|
655
|
-
email: string;
|
|
656
|
-
};
|
|
657
|
-
updatedBy?: {
|
|
658
|
-
id: string;
|
|
659
|
-
name: string;
|
|
660
|
-
email: string;
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
563
|
interface PermissionsGroup {
|
|
664
564
|
[category: string]: string[];
|
|
665
565
|
}
|
|
@@ -799,7 +699,7 @@ interface ClientStats {
|
|
|
799
699
|
};
|
|
800
700
|
}>;
|
|
801
701
|
}
|
|
802
|
-
interface SearchClientsParams
|
|
702
|
+
interface SearchClientsParams {
|
|
803
703
|
search?: string;
|
|
804
704
|
activeOnly?: boolean;
|
|
805
705
|
clientNumber?: string;
|
|
@@ -808,20 +708,11 @@ interface SearchClientsParams extends PaginationQueryDto {
|
|
|
808
708
|
notCheckedInToday?: boolean;
|
|
809
709
|
checkedInToday?: boolean;
|
|
810
710
|
}
|
|
811
|
-
interface ClientSearchForCheckInResponse {
|
|
812
|
-
data: Client[];
|
|
813
|
-
pagination: {
|
|
814
|
-
total: number;
|
|
815
|
-
page: number;
|
|
816
|
-
limit: number;
|
|
817
|
-
totalPages: number;
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
711
|
|
|
821
712
|
declare class ClientsResource extends BaseResource {
|
|
822
713
|
private basePath;
|
|
823
714
|
createClient(data: CreateClientDto, options?: RequestOptions): Promise<Client>;
|
|
824
|
-
searchClients(params?: SearchClientsParams, options?: RequestOptions): Promise<
|
|
715
|
+
searchClients(params?: SearchClientsParams, options?: RequestOptions): Promise<Client[]>;
|
|
825
716
|
getClient(id: string, options?: RequestOptions): Promise<Client>;
|
|
826
717
|
updateClient(id: string, data: UpdateClientDto, options?: RequestOptions): Promise<Client>;
|
|
827
718
|
toggleClientStatus(id: string, options?: RequestOptions): Promise<Client>;
|
|
@@ -829,7 +720,7 @@ declare class ClientsResource extends BaseResource {
|
|
|
829
720
|
getClientStat(id: string, statKey: string, options?: RequestOptions): Promise<ClientStat>;
|
|
830
721
|
getClientStatsByCategory(id: string, category: string, options?: RequestOptions): Promise<ClientStat[]>;
|
|
831
722
|
getAvailableStats(options?: RequestOptions): Promise<ClientStat[]>;
|
|
832
|
-
searchClientsForCheckIn(params?: SearchClientsParams, options?: RequestOptions): Promise<
|
|
723
|
+
searchClientsForCheckIn(params?: SearchClientsParams, options?: RequestOptions): Promise<Client[]>;
|
|
833
724
|
}
|
|
834
725
|
|
|
835
726
|
interface CreateMembershipPlanDto {
|
|
@@ -996,6 +887,10 @@ declare class ContractsResource extends BaseResource {
|
|
|
996
887
|
cancelContract(id: string, data: {
|
|
997
888
|
reason: string;
|
|
998
889
|
}, options?: RequestOptions): Promise<Contract>;
|
|
890
|
+
resendWhatsAppNotification(contractId: string, options?: RequestOptions): Promise<{
|
|
891
|
+
success: boolean;
|
|
892
|
+
message: string;
|
|
893
|
+
}>;
|
|
999
894
|
}
|
|
1000
895
|
|
|
1001
896
|
interface DashboardStats {
|
|
@@ -1054,6 +949,29 @@ interface DateRangeParams {
|
|
|
1054
949
|
startDate?: string;
|
|
1055
950
|
endDate?: string;
|
|
1056
951
|
}
|
|
952
|
+
interface CheckInDetail {
|
|
953
|
+
id: string;
|
|
954
|
+
timestamp: string;
|
|
955
|
+
gymClientId: string;
|
|
956
|
+
client: {
|
|
957
|
+
id: string;
|
|
958
|
+
name: string;
|
|
959
|
+
clientNumber: string;
|
|
960
|
+
status: string;
|
|
961
|
+
profilePhotoId: string | null;
|
|
962
|
+
};
|
|
963
|
+
notes: string | null;
|
|
964
|
+
registeredBy: {
|
|
965
|
+
id: string;
|
|
966
|
+
name: string;
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
interface CheckInsList {
|
|
970
|
+
checkIns: CheckInDetail[];
|
|
971
|
+
total: number;
|
|
972
|
+
startDate: string;
|
|
973
|
+
endDate: string;
|
|
974
|
+
}
|
|
1057
975
|
|
|
1058
976
|
declare class DashboardResource extends BaseResource {
|
|
1059
977
|
/**
|
|
@@ -1098,6 +1016,12 @@ declare class DashboardResource extends BaseResource {
|
|
|
1098
1016
|
* @returns List of contracts expiring in the specified period
|
|
1099
1017
|
*/
|
|
1100
1018
|
getExpiringContracts(limit?: number, params?: DateRangeParams): Promise<ExpiringContract[]>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Get detailed list of check-ins within date range
|
|
1021
|
+
* @param params Optional date range parameters (defaults to current day)
|
|
1022
|
+
* @returns Detailed list of check-ins with client and registeredBy information
|
|
1023
|
+
*/
|
|
1024
|
+
getCheckInsList(params?: DateRangeParams): Promise<CheckInsList>;
|
|
1101
1025
|
}
|
|
1102
1026
|
|
|
1103
1027
|
interface CreateEvaluationDto {
|
|
@@ -1218,10 +1142,12 @@ interface CheckIn {
|
|
|
1218
1142
|
name: string;
|
|
1219
1143
|
};
|
|
1220
1144
|
}
|
|
1221
|
-
interface SearchCheckInsParams
|
|
1145
|
+
interface SearchCheckInsParams {
|
|
1222
1146
|
clientId?: string;
|
|
1223
1147
|
startDate?: string;
|
|
1224
1148
|
endDate?: string;
|
|
1149
|
+
limit?: number;
|
|
1150
|
+
offset?: number;
|
|
1225
1151
|
}
|
|
1226
1152
|
interface GetCheckInStatsParams {
|
|
1227
1153
|
period: 'day' | 'week' | 'month';
|
|
@@ -1234,7 +1160,9 @@ interface CheckInStats {
|
|
|
1234
1160
|
peakHours: Record<string, number>;
|
|
1235
1161
|
dayDistribution: Record<string, number>;
|
|
1236
1162
|
}
|
|
1237
|
-
interface GetClientCheckInHistoryParams
|
|
1163
|
+
interface GetClientCheckInHistoryParams {
|
|
1164
|
+
limit?: number;
|
|
1165
|
+
offset?: number;
|
|
1238
1166
|
}
|
|
1239
1167
|
interface CurrentlyInGymResponse {
|
|
1240
1168
|
total: number;
|
|
@@ -1269,47 +1197,9 @@ declare class CheckInsResource extends BaseResource {
|
|
|
1269
1197
|
getClientCheckInHistory(clientId: string, params?: GetClientCheckInHistoryParams, options?: RequestOptions): Promise<ClientCheckInHistory>;
|
|
1270
1198
|
}
|
|
1271
1199
|
|
|
1272
|
-
interface CreateInvitationDto {
|
|
1273
|
-
email: string;
|
|
1274
|
-
roleId: string;
|
|
1275
|
-
}
|
|
1276
|
-
interface AcceptInvitationDto {
|
|
1277
|
-
token?: string;
|
|
1278
|
-
code?: string;
|
|
1279
|
-
name: string;
|
|
1280
|
-
phone: string;
|
|
1281
|
-
password: string;
|
|
1282
|
-
}
|
|
1283
|
-
interface ValidateByCodeDto {
|
|
1284
|
-
code: string;
|
|
1285
|
-
}
|
|
1286
|
-
interface Invitation {
|
|
1287
|
-
id: string;
|
|
1288
|
-
email: string;
|
|
1289
|
-
gymId: string;
|
|
1290
|
-
roleId: string;
|
|
1291
|
-
token: string;
|
|
1292
|
-
code: string;
|
|
1293
|
-
status: InvitationStatus;
|
|
1294
|
-
invitedByUserId: string;
|
|
1295
|
-
acceptedAt?: string;
|
|
1296
|
-
expiresAt: string;
|
|
1297
|
-
createdAt: string;
|
|
1298
|
-
updatedAt: string;
|
|
1299
|
-
role?: {
|
|
1300
|
-
id: string;
|
|
1301
|
-
name: string;
|
|
1302
|
-
};
|
|
1303
|
-
invitedBy?: {
|
|
1304
|
-
id: string;
|
|
1305
|
-
name: string | null;
|
|
1306
|
-
email: string;
|
|
1307
|
-
};
|
|
1308
|
-
}
|
|
1309
1200
|
interface GetGymInvitationsParams {
|
|
1310
1201
|
gymId: string;
|
|
1311
1202
|
}
|
|
1312
|
-
|
|
1313
1203
|
declare class InvitationsResource extends BaseResource {
|
|
1314
1204
|
private basePath;
|
|
1315
1205
|
createInvitation(data: CreateInvitationDto, options?: RequestOptions): Promise<Invitation>;
|
|
@@ -2059,6 +1949,10 @@ declare class SalesResource extends BaseResource {
|
|
|
2059
1949
|
getSalesStats(startDate?: string, endDate?: string, options?: RequestOptions): Promise<SalesStats>;
|
|
2060
1950
|
getTopSellingProducts(limit?: number, startDate?: string, endDate?: string, options?: RequestOptions): Promise<TopSellingProduct[]>;
|
|
2061
1951
|
getSalesByCustomer(startDate?: string, endDate?: string, options?: RequestOptions): Promise<CustomerSalesReport>;
|
|
1952
|
+
resendWhatsAppNotification(saleId: string, options?: RequestOptions): Promise<{
|
|
1953
|
+
success: boolean;
|
|
1954
|
+
message: string;
|
|
1955
|
+
}>;
|
|
2062
1956
|
}
|
|
2063
1957
|
|
|
2064
1958
|
interface CreateSupplierDto {
|
|
@@ -2351,14 +2245,27 @@ interface UpdatePaymentMethodDto {
|
|
|
2351
2245
|
}
|
|
2352
2246
|
interface PaymentMethod {
|
|
2353
2247
|
id: string;
|
|
2354
|
-
|
|
2248
|
+
organizationId: string;
|
|
2355
2249
|
name: string;
|
|
2356
2250
|
description?: string;
|
|
2357
2251
|
code: string;
|
|
2358
2252
|
enabled: boolean;
|
|
2359
2253
|
metadata?: Record<string, any>;
|
|
2254
|
+
createdByUserId: string;
|
|
2255
|
+
updatedByUserId?: string | null;
|
|
2360
2256
|
createdAt: string;
|
|
2361
2257
|
updatedAt: string;
|
|
2258
|
+
deletedAt?: string | null;
|
|
2259
|
+
createdBy?: {
|
|
2260
|
+
id: string;
|
|
2261
|
+
name: string;
|
|
2262
|
+
email: string;
|
|
2263
|
+
};
|
|
2264
|
+
updatedBy?: {
|
|
2265
|
+
id: string;
|
|
2266
|
+
name: string;
|
|
2267
|
+
email: string;
|
|
2268
|
+
} | null;
|
|
2362
2269
|
}
|
|
2363
2270
|
interface SearchPaymentMethodsParams extends PaginationQueryDto {
|
|
2364
2271
|
search?: string;
|
|
@@ -2382,8 +2289,200 @@ declare class PaymentMethodsResource extends BaseResource {
|
|
|
2382
2289
|
getPaymentMethodStats(options?: RequestOptions): Promise<PaymentMethodStats>;
|
|
2383
2290
|
}
|
|
2384
2291
|
|
|
2292
|
+
type TemplateCode$1 = string;
|
|
2293
|
+
type TemplateType = string;
|
|
2294
|
+
interface WhatsAppConfig {
|
|
2295
|
+
id: string;
|
|
2296
|
+
gymId: string;
|
|
2297
|
+
instanceName: string;
|
|
2298
|
+
phoneNumber?: string;
|
|
2299
|
+
isActive: boolean;
|
|
2300
|
+
connectionStatus: string;
|
|
2301
|
+
lastConnectedAt?: string;
|
|
2302
|
+
settings?: Record<string, any>;
|
|
2303
|
+
createdByUserId: string;
|
|
2304
|
+
updatedByUserId?: string;
|
|
2305
|
+
createdAt: string;
|
|
2306
|
+
updatedAt: string;
|
|
2307
|
+
}
|
|
2308
|
+
interface CreateWhatsAppConfigDto {
|
|
2309
|
+
settings?: Record<string, any>;
|
|
2310
|
+
}
|
|
2311
|
+
interface UpdateWhatsAppConfigDto {
|
|
2312
|
+
settings?: Record<string, any>;
|
|
2313
|
+
}
|
|
2314
|
+
interface ConnectionStatusResponse {
|
|
2315
|
+
status: 'connected' | 'waiting_qr_scan' | 'connecting' | 'not_initialized' | 'disconnected';
|
|
2316
|
+
qrCode?: string;
|
|
2317
|
+
isActive?: boolean;
|
|
2318
|
+
connectionStatus?: string;
|
|
2319
|
+
lastConnectedAt?: string;
|
|
2320
|
+
message?: string;
|
|
2321
|
+
}
|
|
2322
|
+
interface InitializeConnectionResponse {
|
|
2323
|
+
status: 'connected' | 'waiting_qr_scan' | 'connecting' | 'not_initialized' | 'disconnected';
|
|
2324
|
+
qrCode?: string;
|
|
2325
|
+
isActive?: boolean;
|
|
2326
|
+
connectionStatus?: string;
|
|
2327
|
+
lastConnectedAt?: string;
|
|
2328
|
+
message?: string;
|
|
2329
|
+
}
|
|
2330
|
+
interface WhatsAppTemplate {
|
|
2331
|
+
id: string;
|
|
2332
|
+
gymId: string;
|
|
2333
|
+
code: TemplateCode$1;
|
|
2334
|
+
name: string;
|
|
2335
|
+
type: TemplateType;
|
|
2336
|
+
message: string;
|
|
2337
|
+
variables: string[];
|
|
2338
|
+
isActive: boolean;
|
|
2339
|
+
metadata?: Record<string, any>;
|
|
2340
|
+
createdByUserId: string;
|
|
2341
|
+
updatedByUserId?: string;
|
|
2342
|
+
createdAt: string;
|
|
2343
|
+
updatedAt: string;
|
|
2344
|
+
}
|
|
2345
|
+
interface CreateTemplateDto {
|
|
2346
|
+
code: TemplateCode$1;
|
|
2347
|
+
name: string;
|
|
2348
|
+
type: TemplateType;
|
|
2349
|
+
message: string;
|
|
2350
|
+
variables?: string[];
|
|
2351
|
+
isActive?: boolean;
|
|
2352
|
+
}
|
|
2353
|
+
interface UpdateTemplateDto {
|
|
2354
|
+
name?: string;
|
|
2355
|
+
type?: TemplateType;
|
|
2356
|
+
message?: string;
|
|
2357
|
+
variables?: string[];
|
|
2358
|
+
isActive?: boolean;
|
|
2359
|
+
}
|
|
2360
|
+
interface SearchTemplatesDto extends PaginationQueryDto {
|
|
2361
|
+
code?: TemplateCode$1;
|
|
2362
|
+
type?: TemplateType;
|
|
2363
|
+
isActive?: boolean;
|
|
2364
|
+
}
|
|
2365
|
+
interface PreviewTemplateResponse {
|
|
2366
|
+
content: string;
|
|
2367
|
+
}
|
|
2368
|
+
interface WhatsAppMessage {
|
|
2369
|
+
id: string;
|
|
2370
|
+
gymId: string;
|
|
2371
|
+
clientId?: string;
|
|
2372
|
+
templateId?: string;
|
|
2373
|
+
phoneNumber: string;
|
|
2374
|
+
content: string;
|
|
2375
|
+
direction: 'incoming' | 'outgoing';
|
|
2376
|
+
status: 'pending' | 'sent' | 'delivered' | 'read' | 'failed';
|
|
2377
|
+
externalMessageId?: string;
|
|
2378
|
+
metadata?: Record<string, any>;
|
|
2379
|
+
sentAt?: string;
|
|
2380
|
+
deliveredAt?: string;
|
|
2381
|
+
readAt?: string;
|
|
2382
|
+
failedAt?: string;
|
|
2383
|
+
failureReason?: string;
|
|
2384
|
+
createdAt: string;
|
|
2385
|
+
}
|
|
2386
|
+
interface SendWhatsAppMessageDto {
|
|
2387
|
+
clientId?: string;
|
|
2388
|
+
phoneNumber: string;
|
|
2389
|
+
content?: string;
|
|
2390
|
+
templateId?: string;
|
|
2391
|
+
variables?: Record<string, any>;
|
|
2392
|
+
}
|
|
2393
|
+
interface SearchWhatsAppMessagesDto extends PaginationQueryDto {
|
|
2394
|
+
clientId?: string;
|
|
2395
|
+
status?: string;
|
|
2396
|
+
direction?: string;
|
|
2397
|
+
phoneNumber?: string;
|
|
2398
|
+
}
|
|
2399
|
+
interface Contact {
|
|
2400
|
+
id: string;
|
|
2401
|
+
name: string;
|
|
2402
|
+
pushname: string;
|
|
2403
|
+
phoneNumber?: string;
|
|
2404
|
+
}
|
|
2405
|
+
type ListContactsResponse = Contact[];
|
|
2406
|
+
interface DisconnectResponse {
|
|
2407
|
+
success: boolean;
|
|
2408
|
+
message: string;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
declare class WhatsAppResource extends BaseResource {
|
|
2412
|
+
private basePath;
|
|
2413
|
+
/**
|
|
2414
|
+
* Get WhatsApp configuration for the current gym
|
|
2415
|
+
*/
|
|
2416
|
+
getConfig(options?: RequestOptions): Promise<WhatsAppConfig>;
|
|
2417
|
+
/**
|
|
2418
|
+
* Initialize WhatsApp connection
|
|
2419
|
+
* Returns QR code if needed
|
|
2420
|
+
*/
|
|
2421
|
+
initializeConnection(options?: RequestOptions): Promise<InitializeConnectionResponse>;
|
|
2422
|
+
/**
|
|
2423
|
+
* Update WhatsApp configuration
|
|
2424
|
+
*/
|
|
2425
|
+
updateConfig(data: UpdateWhatsAppConfigDto, options?: RequestOptions): Promise<WhatsAppConfig>;
|
|
2426
|
+
/**
|
|
2427
|
+
* Get WhatsApp connection status
|
|
2428
|
+
*/
|
|
2429
|
+
getConnectionStatus(options?: RequestOptions): Promise<ConnectionStatusResponse>;
|
|
2430
|
+
/**
|
|
2431
|
+
* Send a WhatsApp message
|
|
2432
|
+
*/
|
|
2433
|
+
sendMessage(data: SendWhatsAppMessageDto, options?: RequestOptions): Promise<WhatsAppMessage>;
|
|
2434
|
+
/**
|
|
2435
|
+
* Get WhatsApp messages with pagination and filters
|
|
2436
|
+
*/
|
|
2437
|
+
getMessages(params?: SearchWhatsAppMessagesDto, options?: RequestOptions): Promise<PaginatedResponseDto<WhatsAppMessage>>;
|
|
2438
|
+
/**
|
|
2439
|
+
* Get a specific WhatsApp message by ID
|
|
2440
|
+
*/
|
|
2441
|
+
getMessage(id: string, options?: RequestOptions): Promise<WhatsAppMessage>;
|
|
2442
|
+
listContacts(options?: RequestOptions): Promise<Contact[]>;
|
|
2443
|
+
/**
|
|
2444
|
+
* Disconnect WhatsApp instance
|
|
2445
|
+
* Logs out from WhatsApp without deleting the instance
|
|
2446
|
+
*/
|
|
2447
|
+
disconnect(options?: RequestOptions): Promise<DisconnectResponse>;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
type TemplateCode = string;
|
|
2451
|
+
declare class WhatsAppTemplatesResource extends BaseResource {
|
|
2452
|
+
private basePath;
|
|
2453
|
+
/**
|
|
2454
|
+
* Create a new WhatsApp template
|
|
2455
|
+
*/
|
|
2456
|
+
create(data: CreateTemplateDto, options?: RequestOptions): Promise<WhatsAppTemplate>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Get all WhatsApp templates with pagination and filters
|
|
2459
|
+
*/
|
|
2460
|
+
findAll(params?: SearchTemplatesDto, options?: RequestOptions): Promise<PaginatedResponseDto<WhatsAppTemplate>>;
|
|
2461
|
+
/**
|
|
2462
|
+
* Get a specific WhatsApp template by ID
|
|
2463
|
+
*/
|
|
2464
|
+
findOne(id: string, options?: RequestOptions): Promise<WhatsAppTemplate>;
|
|
2465
|
+
/**
|
|
2466
|
+
* Get a WhatsApp template by code
|
|
2467
|
+
*/
|
|
2468
|
+
findByCode(code: TemplateCode, options?: RequestOptions): Promise<WhatsAppTemplate>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Update a WhatsApp template
|
|
2471
|
+
*/
|
|
2472
|
+
update(id: string, data: UpdateTemplateDto, options?: RequestOptions): Promise<WhatsAppTemplate>;
|
|
2473
|
+
/**
|
|
2474
|
+
* Delete a WhatsApp template
|
|
2475
|
+
*/
|
|
2476
|
+
remove(id: string, options?: RequestOptions): Promise<void>;
|
|
2477
|
+
/**
|
|
2478
|
+
* Preview a template with variables
|
|
2479
|
+
*/
|
|
2480
|
+
preview(id: string, variables: Record<string, any>, options?: RequestOptions): Promise<PreviewTemplateResponse>;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2385
2483
|
declare class GymSpaceSdk {
|
|
2386
2484
|
client: ApiClient;
|
|
2485
|
+
private expoFetch?;
|
|
2387
2486
|
auth: AuthResource;
|
|
2388
2487
|
organizations: OrganizationsResource;
|
|
2389
2488
|
gyms: GymsResource;
|
|
@@ -2410,6 +2509,8 @@ declare class GymSpaceSdk {
|
|
|
2410
2509
|
subscriptionPlans: SubscriptionPlansResource;
|
|
2411
2510
|
adminSubscriptionManagement: AdminSubscriptionManagementResource;
|
|
2412
2511
|
paymentMethods: PaymentMethodsResource;
|
|
2512
|
+
whatsapp: WhatsAppResource;
|
|
2513
|
+
whatsappTemplates: WhatsAppTemplatesResource;
|
|
2413
2514
|
constructor(config: GymSpaceConfig);
|
|
2414
2515
|
/**
|
|
2415
2516
|
* Set the authentication token
|
|
@@ -2431,6 +2532,17 @@ declare class GymSpaceSdk {
|
|
|
2431
2532
|
* Clear authentication
|
|
2432
2533
|
*/
|
|
2433
2534
|
clearAuth(): void;
|
|
2535
|
+
/**
|
|
2536
|
+
* Set Expo fetch for React Native environments
|
|
2537
|
+
* Should be called once during app initialization
|
|
2538
|
+
*/
|
|
2539
|
+
setExpoFetch(fetchFn: typeof globalThis.fetch): void;
|
|
2540
|
+
/**
|
|
2541
|
+
* Create a fetch function for agent endpoints
|
|
2542
|
+
* Uses the /agent/* proxy that includes request context
|
|
2543
|
+
* Automatically uses Expo fetch if set
|
|
2544
|
+
*/
|
|
2545
|
+
createAgentFetch(): (path: string, options?: RequestInit) => Promise<Response>;
|
|
2434
2546
|
/**
|
|
2435
2547
|
* Get the underlying API client
|
|
2436
2548
|
*/
|
|
@@ -2464,4 +2576,4 @@ declare class NetworkError extends GymSpaceError {
|
|
|
2464
2576
|
constructor(message?: string);
|
|
2465
2577
|
}
|
|
2466
2578
|
|
|
2467
|
-
export { type
|
|
2579
|
+
export { type ActivateRenewalDto, AdminSubscriptionManagementResource, type AdminSubscriptionStatusDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BusinessHours, type CancelSubscriptionDto, type CatalogGym, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInDetail, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, type CheckInsList, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientStat, type ClientStats, ClientsResource, type CollaboratorRoleDto, CollaboratorsResource, type CompleteGuidedSetupData, type ConfigureFeaturesData, type ConnectionStatusResponse, type Contact, type Contract, ContractsResource, type ContractsRevenue, type CreateCheckInDto, type CreateClientDto, type CreateContractDto, type CreateEvaluationDto, type CreateGymDto, type CreateLeadDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSubscriptionPlanDto, type CreateSupplierDto, type CreateTemplateDto, type CreateWhatsAppConfigDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type DisconnectResponse, type Evaluation, type EvaluationHealthMetrics, type EvaluationMeasurements, type EvaluationPerformanceMetrics, type EvaluationReport, type EvaluationSystemFeatures, EvaluationsResource, type ExpiringContract, type FileResponseDto, FilesResource, type FreezeContractDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, type GetClientEvaluationsParams, type GetContractsParams, type GetFeaturedGymsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type Gym, type GymAmenities, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type InitializeConnectionResponse, type InvitationValidationResponse, InvitationsResource, type Lead, type LeadManagementFeatures, type LeadStats, LeadsResource, type ListContactsResponse, type LoginDto, type LoginResponseDto, type MembershipManagementFeatures, type MembershipPlan, type MembershipPlanStats, MembershipPlansResource, NetworkError, type NewClients, NotFoundError, type NotificationSettings, OnboardingResource, type OnboardingResponse, type OnboardingStatus, OnboardingStep, type Organization, type OrganizationAdminDetails, type OrganizationStats, type OrganizationWithDetails, OrganizationsResource, type PaginatedResponse, type PaginatedResponseDto, type PaginationParams, type PaginationQueryDto, type PaySaleDto, type PaymentMethod, type PaymentMethodStats, PaymentMethodsResource, type PermissionsGroup, type PreviewTemplateResponse, type PriceDto, type PricingDto, type Product, type ProductCategory, ProductsResource, PublicCatalogResource, type ReadyResponse, type RegisterCollaboratorDto, type RegisterOwnerDto, type RenewContractDto, type RequestOptions, type RequestPasswordResetDto, type RequestPasswordResetResponseDto, type ResendResetCodeDto, type ResendResetCodeResponseDto, type ResendVerificationDto, type ResetPasswordDto, type ResetPasswordResponseDto, RolesResource, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchCatalogParams, type SearchCheckInsParams, type SearchClientsParams, type SearchLeadsParams, type SearchPaymentMethodsParams, type SearchProductsParams, type SearchSalesParams, type SearchSuppliersParams, type SearchTemplatesDto, type SearchWhatsAppMessagesDto, type SendWhatsAppMessageDto, type SocialMedia, type StartOnboardingData, type StartOnboardingResponse, type StockMovement, type Subscription, type SubscriptionHistoryDto, type SubscriptionPlan, type SubscriptionPlanDto, SubscriptionPlansResource, type SubscriptionStatusDto, SubscriptionsResource, type Supplier, SuppliersResource, type SuppliersStats, type TimeSlot, type TopSellingProduct, type UpdateClientDto, type UpdateEvaluationDto, type UpdateGymDto, type UpdateGymScheduleDto, type UpdateGymSettingsData, type UpdateGymSocialMediaDto, type UpdateLeadDto, type UpdateMembershipPlanDto, type UpdateOrganizationDto, type UpdatePaymentMethodDto, type UpdatePaymentStatusDto, type UpdateProductCategoryDto, type UpdateProductDto, type UpdateProfileDto, type UpdateSaleDto, type UpdateStockDto, type UpdateSubscriptionPlanDto, type UpdateSupplierDto, type UpdateTemplateDto, type UpdateWhatsAppConfigDto, type UpgradeSubscriptionDto, type UploadAssetDto, type UploadFileDto, type UserProfileDto, UsersResource, ValidationError, type VerifyEmailDto, type VerifyResetCodeDto, type VerifyResetCodeResponseDto, type WeeklySchedule, type WhatsAppConfig, type WhatsAppMessage, WhatsAppResource, type WhatsAppTemplate, WhatsAppTemplatesResource };
|