@appconda/sdk 1.0.194 → 1.0.410

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.
Files changed (984) hide show
  1. package/.github/workflows/autoclose.yml +11 -0
  2. package/.github/workflows/publish.yml +42 -0
  3. package/.travis.yml +32 -0
  4. package/CHANGELOG.md +1 -0
  5. package/LICENSE +12 -0
  6. package/README.md +0 -0
  7. package/dist/actions/_authOptions.d.ts +5 -0
  8. package/dist/actions/_authOptions.js +235 -0
  9. package/dist/actions/actionClient.d.ts +10 -0
  10. package/dist/actions/actionClient.js +41 -0
  11. package/dist/actions/auth.d.ts +1 -0
  12. package/dist/actions/auth.js +7 -0
  13. package/dist/actions/authOptions.d.ts +5 -0
  14. package/dist/actions/authOptions.js +133 -0
  15. package/dist/actions/index.d.ts +3 -0
  16. package/dist/actions/index.js +4 -0
  17. package/dist/actions/nextAuthHandler.d.ts +1 -0
  18. package/dist/actions/nextAuthHandler.js +6 -0
  19. package/dist/client.d.ts +141 -0
  20. package/dist/client.js +335 -0
  21. package/dist/decorators/Cache.d.ts +1 -0
  22. package/dist/decorators/Cache.js +79 -0
  23. package/dist/decorators/CacheKey.d.ts +1 -0
  24. package/dist/decorators/CacheKey.js +9 -0
  25. package/dist/decorators/Invalidate.d.ts +1 -0
  26. package/dist/decorators/Invalidate.js +47 -0
  27. package/dist/enums/api-service.d.ts +13 -0
  28. package/dist/enums/api-service.js +15 -0
  29. package/dist/enums/api.d.ts +5 -0
  30. package/dist/enums/api.js +7 -0
  31. package/dist/enums/auth-method.d.ts +9 -0
  32. package/dist/enums/auth-method.js +11 -0
  33. package/dist/enums/browser.d.ts +16 -0
  34. package/dist/enums/browser.js +18 -0
  35. package/dist/enums/compression.d.ts +5 -0
  36. package/dist/enums/compression.js +7 -0
  37. package/dist/enums/credit-card.d.ts +18 -0
  38. package/dist/enums/credit-card.js +20 -0
  39. package/dist/enums/database-usage-range.d.ts +5 -0
  40. package/dist/enums/database-usage-range.js +7 -0
  41. package/dist/enums/email-template-locale.d.ts +133 -0
  42. package/dist/enums/email-template-locale.js +135 -0
  43. package/dist/enums/email-template-type.d.ts +9 -0
  44. package/dist/enums/email-template-type.js +11 -0
  45. package/dist/enums/entities/EntityLimitType.d.ts +4 -0
  46. package/dist/enums/entities/EntityLimitType.js +6 -0
  47. package/dist/enums/entities/PropertyAttributeName.d.ts +27 -0
  48. package/dist/enums/entities/PropertyAttributeName.js +29 -0
  49. package/dist/enums/entities/PropertyCondition.d.ts +7 -0
  50. package/dist/enums/entities/PropertyCondition.js +10 -0
  51. package/dist/enums/entities/PropertyType.d.ts +12 -0
  52. package/dist/enums/entities/PropertyType.js +18 -0
  53. package/dist/enums/entities/PropertyValueType.d.ts +6 -0
  54. package/dist/enums/entities/PropertyValueType.js +8 -0
  55. package/dist/enums/entities/RowAccess.d.ts +2 -0
  56. package/dist/enums/entities/RowAccess.js +2 -0
  57. package/dist/enums/entities/ViewFilterCondition.d.ts +12 -0
  58. package/dist/enums/entities/ViewFilterCondition.js +14 -0
  59. package/dist/enums/execution-method.d.ts +8 -0
  60. package/dist/enums/execution-method.js +10 -0
  61. package/dist/enums/flag.d.ts +197 -0
  62. package/dist/enums/flag.js +199 -0
  63. package/dist/enums/function-usage-range.d.ts +5 -0
  64. package/dist/enums/function-usage-range.js +7 -0
  65. package/dist/enums/image-format.d.ts +7 -0
  66. package/dist/enums/image-format.js +9 -0
  67. package/dist/enums/image-gravity.d.ts +11 -0
  68. package/dist/enums/image-gravity.js +13 -0
  69. package/dist/enums/index-type.d.ts +5 -0
  70. package/dist/enums/index-type.js +7 -0
  71. package/dist/enums/messaging-provider-type.d.ts +5 -0
  72. package/dist/enums/messaging-provider-type.js +7 -0
  73. package/dist/enums/name.d.ts +14 -0
  74. package/dist/enums/name.js +16 -0
  75. package/dist/enums/o-auth-provider copy.d.ts +41 -0
  76. package/dist/enums/o-auth-provider copy.js +43 -0
  77. package/dist/enums/password-hash.d.ts +13 -0
  78. package/dist/enums/password-hash.js +15 -0
  79. package/dist/enums/platform-type.d.ts +17 -0
  80. package/dist/enums/platform-type.js +19 -0
  81. package/dist/enums/project-usage-range.d.ts +4 -0
  82. package/dist/enums/project-usage-range.js +6 -0
  83. package/dist/enums/region.d.ts +4 -0
  84. package/dist/enums/region.js +6 -0
  85. package/dist/enums/relation-mutate.d.ts +5 -0
  86. package/dist/enums/relation-mutate.js +7 -0
  87. package/dist/enums/relationship-type.d.ts +6 -0
  88. package/dist/enums/relationship-type.js +8 -0
  89. package/dist/enums/resource-type.d.ts +4 -0
  90. package/dist/enums/resource-type.js +6 -0
  91. package/dist/enums/runtime.d.ts +48 -0
  92. package/dist/enums/runtime.js +50 -0
  93. package/dist/enums/s-m-t-p-secure.d.ts +3 -0
  94. package/dist/enums/s-m-t-p-secure.js +5 -0
  95. package/dist/enums/shared/ApplicationLayout.d.ts +4 -0
  96. package/dist/enums/shared/ApplicationLayout.js +6 -0
  97. package/dist/enums/shared/Colors.d.ts +24 -0
  98. package/dist/enums/shared/Colors.js +26 -0
  99. package/dist/enums/shared/InputType.d.ts +6 -0
  100. package/dist/enums/shared/InputType.js +8 -0
  101. package/dist/enums/shared/Periodicity.d.ts +7 -0
  102. package/dist/enums/shared/Periodicity.js +9 -0
  103. package/dist/enums/shared/SvgIcon.d.ts +37 -0
  104. package/dist/enums/shared/SvgIcon.js +39 -0
  105. package/dist/enums/shared/Theme.d.ts +4 -0
  106. package/dist/enums/shared/Theme.js +6 -0
  107. package/dist/enums/sms-template-locale.d.ts +133 -0
  108. package/dist/enums/sms-template-locale.js +135 -0
  109. package/dist/enums/sms-template-type.d.ts +6 -0
  110. package/dist/enums/sms-template-type.js +8 -0
  111. package/dist/enums/smtp-encryption.d.ts +5 -0
  112. package/dist/enums/smtp-encryption.js +7 -0
  113. package/dist/enums/storage-usage-range.d.ts +5 -0
  114. package/dist/enums/storage-usage-range.js +7 -0
  115. package/dist/enums/subscriptions/PricingModel.d.ts +11 -0
  116. package/dist/enums/subscriptions/PricingModel.js +12 -0
  117. package/dist/enums/subscriptions/SubscriptionBillingPeriod.d.ts +10 -0
  118. package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +11 -0
  119. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +10 -0
  120. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +13 -0
  121. package/dist/enums/subscriptions/SubscriptionPriceType.d.ts +7 -0
  122. package/dist/enums/subscriptions/SubscriptionPriceType.js +8 -0
  123. package/dist/enums/tenants/LinkedAccountStatus.d.ts +5 -0
  124. package/dist/enums/tenants/LinkedAccountStatus.js +7 -0
  125. package/dist/enums/tenants/TenantUserJoined.d.ts +6 -0
  126. package/dist/enums/tenants/TenantUserJoined.js +8 -0
  127. package/dist/enums/tenants/TenantUserStatus.d.ts +6 -0
  128. package/dist/enums/tenants/TenantUserStatus.js +8 -0
  129. package/dist/enums/tenants/TenantUserType.d.ts +5 -0
  130. package/dist/enums/tenants/TenantUserType.js +7 -0
  131. package/dist/enums/user-usage-range.d.ts +5 -0
  132. package/dist/enums/user-usage-range.js +7 -0
  133. package/dist/getAppcondaClient.d.ts +3 -0
  134. package/dist/getAppcondaClient.js +71 -0
  135. package/dist/getSDKForCurrentUser.d.ts +59 -0
  136. package/dist/getSDKForCurrentUser.js +100 -0
  137. package/dist/getSDKForService.d.ts +18 -0
  138. package/dist/getSDKForService.js +67 -0
  139. package/dist/getSDKForTenant.d.ts +20 -0
  140. package/dist/getSDKForTenant.js +44 -0
  141. package/dist/id.d.ts +20 -0
  142. package/dist/id.js +45 -0
  143. package/dist/index.d.ts +1 -0
  144. package/dist/index.js +2 -0
  145. package/dist/inputFile.d.ts +7 -0
  146. package/dist/inputFile.js +17 -0
  147. package/dist/lib/Cache/Adapter.d.ts +10 -0
  148. package/dist/lib/Cache/Adapter.js +2 -0
  149. package/dist/lib/Cache/Adapters/Filesystem.d.ts +16 -0
  150. package/dist/lib/Cache/Adapters/Filesystem.js +103 -0
  151. package/dist/lib/Cache/Adapters/Memory.d.ts +18 -0
  152. package/dist/lib/Cache/Adapters/Memory.js +47 -0
  153. package/dist/lib/Cache/Adapters/None.d.ts +12 -0
  154. package/dist/lib/Cache/Adapters/None.js +28 -0
  155. package/dist/lib/Cache/Adapters/Sharding.d.ts +17 -0
  156. package/dist/lib/Cache/Adapters/Sharding.js +73 -0
  157. package/dist/lib/Cache/Cache.d.ts +16 -0
  158. package/dist/lib/Cache/Cache.js +52 -0
  159. package/dist/lib/Cache/index.d.ts +4 -0
  160. package/dist/lib/Cache/index.js +5 -0
  161. package/dist/lib/Cache/test.d.ts +0 -0
  162. package/dist/lib/Cache/test.js +1 -0
  163. package/dist/lib/Registry/Registry.d.ts +38 -0
  164. package/dist/lib/Registry/Registry.js +56 -0
  165. package/dist/lib/Registry/index.d.ts +1 -0
  166. package/dist/lib/Registry/index.js +2 -0
  167. package/dist/lib/Services.d.ts +6 -0
  168. package/dist/lib/Services.js +14 -0
  169. package/dist/lib/crypto.d.ts +23 -0
  170. package/dist/lib/crypto.js +78 -0
  171. package/dist/lib/env.d.ts +1 -0
  172. package/dist/lib/env.js +137 -0
  173. package/dist/lib/errors.d.ts +70 -0
  174. package/dist/lib/errors.js +79 -0
  175. package/dist/lib/index.d.ts +0 -0
  176. package/dist/lib/index.js +1 -0
  177. package/dist/lib/jwt.d.ts +12 -0
  178. package/dist/lib/jwt.js +103 -0
  179. package/dist/lib/types.d.ts +5 -0
  180. package/dist/lib/types.js +2 -0
  181. package/dist/models.d.ts +3272 -0
  182. package/dist/models.js +2 -0
  183. package/dist/modules/account/actions.d.ts +11 -0
  184. package/dist/modules/account/actions.js +49 -0
  185. package/dist/modules/account/enums/authentication-factor.d.ts +6 -0
  186. package/dist/modules/account/enums/authentication-factor.js +8 -0
  187. package/dist/modules/account/enums/authenticator-type.d.ts +3 -0
  188. package/dist/modules/account/enums/authenticator-type.js +5 -0
  189. package/dist/modules/account/enums/o-auth-provider.d.ts +41 -0
  190. package/dist/modules/account/enums/o-auth-provider.js +43 -0
  191. package/dist/modules/account/index.d.ts +2 -0
  192. package/dist/modules/account/index.js +3 -0
  193. package/dist/modules/account/schema.d.ts +7 -0
  194. package/dist/modules/account/schema.js +8 -0
  195. package/dist/modules/account/service.d.ts +530 -0
  196. package/dist/modules/account/service.js +1263 -0
  197. package/dist/modules/account/types.d.ts +411 -0
  198. package/dist/modules/account/types.js +2 -0
  199. package/dist/modules/accounv1/action.d.ts +9 -0
  200. package/dist/modules/accounv1/action.js +88 -0
  201. package/dist/modules/accounv1/index.d.ts +3 -0
  202. package/dist/modules/accounv1/index.js +4 -0
  203. package/dist/modules/accounv1/schema.d.ts +43 -0
  204. package/dist/modules/accounv1/schema.js +44 -0
  205. package/dist/modules/accounv1/service.d.ts +14 -0
  206. package/dist/modules/accounv1/service.js +28 -0
  207. package/dist/modules/accounv1/types.d.ts +14 -0
  208. package/dist/modules/accounv1/types.js +2 -0
  209. package/dist/modules/acl/service.d.ts +26 -0
  210. package/dist/modules/acl/service.js +27 -0
  211. package/dist/modules/agent/action.d.ts +29 -0
  212. package/dist/modules/agent/action.js +53 -0
  213. package/dist/modules/agent/index.d.ts +4 -0
  214. package/dist/modules/agent/index.js +5 -0
  215. package/dist/modules/agent/schema.d.ts +20 -0
  216. package/dist/modules/agent/schema.js +21 -0
  217. package/dist/modules/agent/service.d.ts +12 -0
  218. package/dist/modules/agent/service.js +22 -0
  219. package/dist/modules/agent/types.d.ts +11 -0
  220. package/dist/modules/agent/types.js +2 -0
  221. package/dist/modules/ai/index.d.ts +1 -0
  222. package/dist/modules/ai/index.js +2 -0
  223. package/dist/modules/ai/node/actions.d.ts +4 -0
  224. package/dist/modules/ai/node/actions.js +14 -0
  225. package/dist/modules/ai/node/index.d.ts +2 -0
  226. package/dist/modules/ai/node/index.js +3 -0
  227. package/dist/modules/ai/node/service.d.ts +5 -0
  228. package/dist/modules/ai/node/service.js +12 -0
  229. package/dist/modules/bpm/action.d.ts +7 -0
  230. package/dist/modules/bpm/action.js +60 -0
  231. package/dist/modules/bpm/index.d.ts +3 -0
  232. package/dist/modules/bpm/index.js +4 -0
  233. package/dist/modules/bpm/schema.d.ts +18 -0
  234. package/dist/modules/bpm/schema.js +19 -0
  235. package/dist/modules/bpm/service.d.ts +11 -0
  236. package/dist/modules/bpm/service.js +19 -0
  237. package/dist/modules/bpm/types.d.ts +9 -0
  238. package/dist/modules/bpm/types.js +2 -0
  239. package/dist/modules/builder/action.d.ts +18 -0
  240. package/dist/modules/builder/action.js +214 -0
  241. package/dist/modules/builder/index.d.ts +4 -0
  242. package/dist/modules/builder/index.js +5 -0
  243. package/dist/modules/builder/schema.d.ts +80 -0
  244. package/dist/modules/builder/schema.js +81 -0
  245. package/dist/modules/builder/service.d.ts +22 -0
  246. package/dist/modules/builder/service.js +52 -0
  247. package/dist/modules/builder/types.d.ts +62 -0
  248. package/dist/modules/builder/types.js +2 -0
  249. package/dist/modules/datasource/action.d.ts +14 -0
  250. package/dist/modules/datasource/action.js +172 -0
  251. package/dist/modules/datasource/index.d.ts +4 -0
  252. package/dist/modules/datasource/index.js +5 -0
  253. package/dist/modules/datasource/schema.d.ts +55 -0
  254. package/dist/modules/datasource/schema.js +56 -0
  255. package/dist/modules/datasource/service.d.ts +19 -0
  256. package/dist/modules/datasource/service.js +43 -0
  257. package/dist/modules/datasource/types.d.ts +28 -0
  258. package/dist/modules/datasource/types.js +2 -0
  259. package/dist/modules/emploid/action.d.ts +73 -0
  260. package/dist/modules/emploid/action.js +984 -0
  261. package/dist/modules/emploid/index.d.ts +4 -0
  262. package/dist/modules/emploid/index.js +5 -0
  263. package/dist/modules/emploid/schema.d.ts +386 -0
  264. package/dist/modules/emploid/schema.js +331 -0
  265. package/dist/modules/emploid/service.d.ts +77 -0
  266. package/dist/modules/emploid/service.js +217 -0
  267. package/dist/modules/emploid/types.d.ts +114 -0
  268. package/dist/modules/emploid/types.js +2 -0
  269. package/dist/modules/google/action.d.ts +5 -0
  270. package/dist/modules/google/action.js +46 -0
  271. package/dist/modules/google/index.d.ts +4 -0
  272. package/dist/modules/google/index.js +5 -0
  273. package/dist/modules/google/schema.d.ts +13 -0
  274. package/dist/modules/google/schema.js +14 -0
  275. package/dist/modules/google/service.d.ts +10 -0
  276. package/dist/modules/google/service.js +16 -0
  277. package/dist/modules/google/types.d.ts +12 -0
  278. package/dist/modules/google/types.js +2 -0
  279. package/dist/modules/hooks/index.d.ts +3 -0
  280. package/dist/modules/hooks/index.js +4 -0
  281. package/dist/modules/hooks/lib/Hooks.d.ts +32 -0
  282. package/dist/modules/hooks/lib/Hooks.js +64 -0
  283. package/dist/modules/hooks/lib/handler.d.ts +3 -0
  284. package/dist/modules/hooks/lib/handler.js +23 -0
  285. package/dist/modules/hooks/lib/jobs/index.d.ts +2 -0
  286. package/dist/modules/hooks/lib/jobs/index.js +3 -0
  287. package/dist/modules/hooks/lib/jobs/job1.d.ts +1 -0
  288. package/dist/modules/hooks/lib/jobs/job1.js +16 -0
  289. package/dist/modules/hooks/lib/jobs/log-job.d.ts +1 -0
  290. package/dist/modules/hooks/lib/jobs/log-job.js +9 -0
  291. package/dist/modules/hooks/lib/wait.d.ts +8 -0
  292. package/dist/modules/hooks/lib/wait.js +13 -0
  293. package/dist/modules/index.d.ts +17 -0
  294. package/dist/modules/index.js +18 -0
  295. package/dist/modules/mail/action.d.ts +3 -0
  296. package/dist/modules/mail/action.js +18 -0
  297. package/dist/modules/mail/index.d.ts +4 -0
  298. package/dist/modules/mail/index.js +5 -0
  299. package/dist/modules/mail/schema.d.ts +6 -0
  300. package/dist/modules/mail/schema.js +7 -0
  301. package/dist/modules/mail/service.d.ts +8 -0
  302. package/dist/modules/mail/service.js +10 -0
  303. package/dist/modules/mail/types.d.ts +6 -0
  304. package/dist/modules/mail/types.js +2 -0
  305. package/dist/modules/notion/action.d.ts +5 -0
  306. package/dist/modules/notion/action.js +46 -0
  307. package/dist/modules/notion/index.d.ts +4 -0
  308. package/dist/modules/notion/index.js +5 -0
  309. package/dist/modules/notion/schema.d.ts +13 -0
  310. package/dist/modules/notion/schema.js +14 -0
  311. package/dist/modules/notion/service.d.ts +10 -0
  312. package/dist/modules/notion/service.js +19 -0
  313. package/dist/modules/notion/types.d.ts +11 -0
  314. package/dist/modules/notion/types.js +2 -0
  315. package/dist/modules/organization/action.d.ts +7 -0
  316. package/dist/modules/organization/action.js +60 -0
  317. package/dist/modules/organization/index.d.ts +4 -0
  318. package/dist/modules/organization/index.js +5 -0
  319. package/dist/modules/organization/schema.d.ts +24 -0
  320. package/dist/modules/organization/schema.js +20 -0
  321. package/dist/modules/organization/service.d.ts +11 -0
  322. package/dist/modules/organization/service.js +19 -0
  323. package/dist/modules/organization/types.d.ts +11 -0
  324. package/dist/modules/organization/types.js +2 -0
  325. package/dist/modules/scheduled-job/action.d.ts +70 -0
  326. package/dist/modules/scheduled-job/action.js +173 -0
  327. package/dist/modules/scheduled-job/index.d.ts +7 -0
  328. package/dist/modules/scheduled-job/index.js +8 -0
  329. package/dist/modules/scheduled-job/lib/Schedules.d.ts +34 -0
  330. package/dist/modules/scheduled-job/lib/Schedules.js +65 -0
  331. package/dist/modules/scheduled-job/lib/handler.d.ts +3 -0
  332. package/dist/modules/scheduled-job/lib/handler.js +23 -0
  333. package/dist/modules/scheduled-job/lib/jobs/index.d.ts +1 -0
  334. package/dist/modules/scheduled-job/lib/jobs/index.js +2 -0
  335. package/dist/modules/scheduled-job/lib/jobs/job1.d.ts +1 -0
  336. package/dist/modules/scheduled-job/lib/jobs/job1.js +10 -0
  337. package/dist/modules/scheduled-job/lib/wait.d.ts +8 -0
  338. package/dist/modules/scheduled-job/lib/wait.js +13 -0
  339. package/dist/modules/scheduled-job/schema.d.ts +39 -0
  340. package/dist/modules/scheduled-job/schema.js +40 -0
  341. package/dist/modules/scheduled-job/service.d.ts +20 -0
  342. package/dist/modules/scheduled-job/service.js +46 -0
  343. package/dist/modules/scheduled-job/types.d.ts +66 -0
  344. package/dist/modules/scheduled-job/types.js +2 -0
  345. package/dist/modules/task/action.d.ts +64 -0
  346. package/dist/modules/task/action.js +758 -0
  347. package/dist/modules/task/index.d.ts +4 -0
  348. package/dist/modules/task/index.js +5 -0
  349. package/dist/modules/task/schema.d.ts +355 -0
  350. package/dist/modules/task/schema.js +371 -0
  351. package/dist/modules/task/service.d.ts +69 -0
  352. package/dist/modules/task/service.js +193 -0
  353. package/dist/modules/task/types.d.ts +293 -0
  354. package/dist/modules/task/types.js +37 -0
  355. package/dist/modules/tenant/actions.d.ts +10 -0
  356. package/dist/modules/tenant/actions.js +160 -0
  357. package/dist/modules/tenant/index.d.ts +3 -0
  358. package/dist/modules/tenant/index.js +4 -0
  359. package/dist/modules/tenant/schema.d.ts +26 -0
  360. package/dist/modules/tenant/schema.js +28 -0
  361. package/dist/modules/tenant/service.d.ts +14 -0
  362. package/dist/modules/tenant/service.js +28 -0
  363. package/dist/modules/tenant/tenant.d.ts +32 -0
  364. package/dist/modules/tenant/tenant.js +125 -0
  365. package/dist/modules/tenant/types.d.ts +20 -0
  366. package/dist/modules/tenant/types.js +2 -0
  367. package/dist/modules/waitlist/action.d.ts +6 -0
  368. package/dist/modules/waitlist/action.js +78 -0
  369. package/dist/modules/waitlist/index.d.ts +4 -0
  370. package/dist/modules/waitlist/index.js +5 -0
  371. package/dist/modules/waitlist/schema.d.ts +17 -0
  372. package/dist/modules/waitlist/schema.js +18 -0
  373. package/dist/modules/waitlist/service.d.ts +13 -0
  374. package/dist/modules/waitlist/service.js +28 -0
  375. package/dist/modules/waitlist/types.d.ts +14 -0
  376. package/dist/modules/waitlist/types.js +2 -0
  377. package/dist/permission.d.ts +43 -0
  378. package/dist/permission.js +54 -0
  379. package/dist/query.d.ts +194 -0
  380. package/dist/query.js +204 -0
  381. package/dist/role.d.ts +70 -0
  382. package/dist/role.js +94 -0
  383. package/dist/schemas/nodes.d.ts +0 -0
  384. package/dist/schemas/nodes.js +1 -0
  385. package/dist/service-client.d.ts +8 -0
  386. package/dist/service-client.js +22 -0
  387. package/dist/service.d.ts +11 -0
  388. package/dist/service.js +23 -0
  389. package/dist/services/applets.d.ts +9 -0
  390. package/dist/services/applets.js +40 -0
  391. package/dist/services/avatars.d.ts +115 -0
  392. package/dist/services/avatars.js +251 -0
  393. package/dist/services/chat-flow.d.ts +7 -0
  394. package/dist/services/chat-flow.js +26 -0
  395. package/dist/services/community.d.ts +19 -0
  396. package/dist/services/community.js +69 -0
  397. package/dist/services/configuration.d.ts +5 -0
  398. package/dist/services/configuration.js +11 -0
  399. package/dist/services/databases.d.ts +613 -0
  400. package/dist/services/databases.js +1736 -0
  401. package/dist/services/functions.d.ts +319 -0
  402. package/dist/services/functions.js +810 -0
  403. package/dist/services/graphql.d.ts +25 -0
  404. package/dist/services/graphql.js +57 -0
  405. package/dist/services/health.d.ts +231 -0
  406. package/dist/services/health.js +463 -0
  407. package/dist/services/locale.d.ts +80 -0
  408. package/dist/services/locale.js +144 -0
  409. package/dist/services/messaging.d.ts +685 -0
  410. package/dist/services/messaging.js +1920 -0
  411. package/dist/services/permissions.d.ts +20 -0
  412. package/dist/services/permissions.js +90 -0
  413. package/dist/services/pricing.d.ts +15 -0
  414. package/dist/services/pricing.js +21 -0
  415. package/dist/services/projects.d.ts +542 -0
  416. package/dist/services/projects.js +1526 -0
  417. package/dist/services/roles.d.ts +19 -0
  418. package/dist/services/roles.js +72 -0
  419. package/dist/services/schema.d.ts +17 -0
  420. package/dist/services/schema.js +48 -0
  421. package/dist/services/storage.d.ts +189 -0
  422. package/dist/services/storage.js +474 -0
  423. package/dist/services/subscription.d.ts +15 -0
  424. package/dist/services/subscription.js +30 -0
  425. package/dist/services/teams.d.ts +167 -0
  426. package/dist/services/teams.js +395 -0
  427. package/dist/services/tenant-subscription.d.ts +12 -0
  428. package/dist/services/tenant-subscription.js +52 -0
  429. package/dist/services/users.d.ts +499 -0
  430. package/dist/services/users.js +1283 -0
  431. package/docs/examples/account/create-anonymous-session.md +11 -0
  432. package/docs/examples/account/create-email-password-session.md +14 -0
  433. package/docs/examples/account/create-email-token.md +15 -0
  434. package/docs/examples/account/create-j-w-t.md +11 -0
  435. package/docs/examples/account/create-magic-u-r-l-token.md +16 -0
  436. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  437. package/docs/examples/account/create-mfa-challenge.md +13 -0
  438. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  439. package/docs/examples/account/create-o-auth2session.md +15 -0
  440. package/docs/examples/account/create-o-auth2token.md +15 -0
  441. package/docs/examples/account/create-phone-token.md +14 -0
  442. package/docs/examples/account/create-phone-verification.md +11 -0
  443. package/docs/examples/account/create-push-target.md +15 -0
  444. package/docs/examples/account/create-recovery.md +14 -0
  445. package/docs/examples/account/create-session.md +14 -0
  446. package/docs/examples/account/create-verification.md +13 -0
  447. package/docs/examples/account/create.md +16 -0
  448. package/docs/examples/account/delete-identity.md +13 -0
  449. package/docs/examples/account/delete-mfa-authenticator.md +13 -0
  450. package/docs/examples/account/delete-push-target.md +13 -0
  451. package/docs/examples/account/delete-session.md +13 -0
  452. package/docs/examples/account/delete-sessions.md +11 -0
  453. package/docs/examples/account/delete.md +11 -0
  454. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  455. package/docs/examples/account/get-prefs.md +11 -0
  456. package/docs/examples/account/get-session.md +13 -0
  457. package/docs/examples/account/get.md +11 -0
  458. package/docs/examples/account/list-identities.md +13 -0
  459. package/docs/examples/account/list-logs.md +13 -0
  460. package/docs/examples/account/list-mfa-factors.md +11 -0
  461. package/docs/examples/account/list-sessions.md +11 -0
  462. package/docs/examples/account/update-email.md +14 -0
  463. package/docs/examples/account/update-m-f-a.md +13 -0
  464. package/docs/examples/account/update-magic-u-r-l-session.md +14 -0
  465. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  466. package/docs/examples/account/update-mfa-challenge.md +14 -0
  467. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  468. package/docs/examples/account/update-name.md +13 -0
  469. package/docs/examples/account/update-password.md +14 -0
  470. package/docs/examples/account/update-phone-session.md +14 -0
  471. package/docs/examples/account/update-phone-verification.md +14 -0
  472. package/docs/examples/account/update-phone.md +14 -0
  473. package/docs/examples/account/update-prefs.md +13 -0
  474. package/docs/examples/account/update-push-target.md +14 -0
  475. package/docs/examples/account/update-recovery.md +15 -0
  476. package/docs/examples/account/update-session.md +13 -0
  477. package/docs/examples/account/update-status.md +11 -0
  478. package/docs/examples/account/update-verification.md +14 -0
  479. package/docs/examples/assistant/chat.md +13 -0
  480. package/docs/examples/avatars/get-browser.md +16 -0
  481. package/docs/examples/avatars/get-credit-card.md +16 -0
  482. package/docs/examples/avatars/get-favicon.md +13 -0
  483. package/docs/examples/avatars/get-flag.md +16 -0
  484. package/docs/examples/avatars/get-image.md +15 -0
  485. package/docs/examples/avatars/get-initials.md +16 -0
  486. package/docs/examples/avatars/get-q-r.md +16 -0
  487. package/docs/examples/console/variables.md +11 -0
  488. package/docs/examples/databases/create-boolean-attribute.md +18 -0
  489. package/docs/examples/databases/create-collection.md +18 -0
  490. package/docs/examples/databases/create-datetime-attribute.md +18 -0
  491. package/docs/examples/databases/create-document.md +17 -0
  492. package/docs/examples/databases/create-email-attribute.md +18 -0
  493. package/docs/examples/databases/create-enum-attribute.md +19 -0
  494. package/docs/examples/databases/create-float-attribute.md +20 -0
  495. package/docs/examples/databases/create-index.md +18 -0
  496. package/docs/examples/databases/create-integer-attribute.md +20 -0
  497. package/docs/examples/databases/create-ip-attribute.md +18 -0
  498. package/docs/examples/databases/create-relationship-attribute.md +20 -0
  499. package/docs/examples/databases/create-string-attribute.md +20 -0
  500. package/docs/examples/databases/create-url-attribute.md +18 -0
  501. package/docs/examples/databases/create.md +15 -0
  502. package/docs/examples/databases/delete-attribute.md +15 -0
  503. package/docs/examples/databases/delete-collection.md +14 -0
  504. package/docs/examples/databases/delete-document.md +15 -0
  505. package/docs/examples/databases/delete-index.md +15 -0
  506. package/docs/examples/databases/delete.md +13 -0
  507. package/docs/examples/databases/get-attribute.md +15 -0
  508. package/docs/examples/databases/get-collection-usage.md +15 -0
  509. package/docs/examples/databases/get-collection.md +14 -0
  510. package/docs/examples/databases/get-database-usage.md +14 -0
  511. package/docs/examples/databases/get-document.md +16 -0
  512. package/docs/examples/databases/get-index.md +15 -0
  513. package/docs/examples/databases/get-usage.md +13 -0
  514. package/docs/examples/databases/get.md +13 -0
  515. package/docs/examples/databases/list-attributes.md +15 -0
  516. package/docs/examples/databases/list-collection-logs.md +15 -0
  517. package/docs/examples/databases/list-collections.md +15 -0
  518. package/docs/examples/databases/list-document-logs.md +16 -0
  519. package/docs/examples/databases/list-documents.md +15 -0
  520. package/docs/examples/databases/list-indexes.md +15 -0
  521. package/docs/examples/databases/list-logs.md +14 -0
  522. package/docs/examples/databases/list.md +14 -0
  523. package/docs/examples/databases/update-boolean-attribute.md +17 -0
  524. package/docs/examples/databases/update-collection.md +18 -0
  525. package/docs/examples/databases/update-datetime-attribute.md +17 -0
  526. package/docs/examples/databases/update-document.md +17 -0
  527. package/docs/examples/databases/update-email-attribute.md +17 -0
  528. package/docs/examples/databases/update-enum-attribute.md +18 -0
  529. package/docs/examples/databases/update-float-attribute.md +19 -0
  530. package/docs/examples/databases/update-integer-attribute.md +19 -0
  531. package/docs/examples/databases/update-ip-attribute.md +17 -0
  532. package/docs/examples/databases/update-relationship-attribute.md +16 -0
  533. package/docs/examples/databases/update-string-attribute.md +17 -0
  534. package/docs/examples/databases/update-url-attribute.md +17 -0
  535. package/docs/examples/databases/update.md +15 -0
  536. package/docs/examples/functions/create-build.md +15 -0
  537. package/docs/examples/functions/create-deployment.md +17 -0
  538. package/docs/examples/functions/create-execution.md +19 -0
  539. package/docs/examples/functions/create-variable.md +15 -0
  540. package/docs/examples/functions/create.md +34 -0
  541. package/docs/examples/functions/delete-deployment.md +14 -0
  542. package/docs/examples/functions/delete-execution.md +14 -0
  543. package/docs/examples/functions/delete-variable.md +14 -0
  544. package/docs/examples/functions/delete.md +13 -0
  545. package/docs/examples/functions/get-deployment-download.md +14 -0
  546. package/docs/examples/functions/get-deployment.md +14 -0
  547. package/docs/examples/functions/get-execution.md +14 -0
  548. package/docs/examples/functions/get-function-usage.md +14 -0
  549. package/docs/examples/functions/get-template.md +13 -0
  550. package/docs/examples/functions/get-usage.md +13 -0
  551. package/docs/examples/functions/get-variable.md +14 -0
  552. package/docs/examples/functions/get.md +13 -0
  553. package/docs/examples/functions/list-deployments.md +15 -0
  554. package/docs/examples/functions/list-executions.md +15 -0
  555. package/docs/examples/functions/list-runtimes.md +11 -0
  556. package/docs/examples/functions/list-specifications.md +11 -0
  557. package/docs/examples/functions/list-templates.md +16 -0
  558. package/docs/examples/functions/list-variables.md +13 -0
  559. package/docs/examples/functions/list.md +14 -0
  560. package/docs/examples/functions/update-deployment-build.md +14 -0
  561. package/docs/examples/functions/update-deployment.md +14 -0
  562. package/docs/examples/functions/update-variable.md +16 -0
  563. package/docs/examples/functions/update.md +30 -0
  564. package/docs/examples/graphql/mutation.md +13 -0
  565. package/docs/examples/graphql/query.md +13 -0
  566. package/docs/examples/health/get-antivirus.md +11 -0
  567. package/docs/examples/health/get-cache.md +11 -0
  568. package/docs/examples/health/get-certificate.md +13 -0
  569. package/docs/examples/health/get-d-b.md +11 -0
  570. package/docs/examples/health/get-failed-jobs.md +14 -0
  571. package/docs/examples/health/get-pub-sub.md +11 -0
  572. package/docs/examples/health/get-queue-builds.md +13 -0
  573. package/docs/examples/health/get-queue-certificates.md +13 -0
  574. package/docs/examples/health/get-queue-databases.md +14 -0
  575. package/docs/examples/health/get-queue-deletes.md +13 -0
  576. package/docs/examples/health/get-queue-functions.md +13 -0
  577. package/docs/examples/health/get-queue-logs.md +13 -0
  578. package/docs/examples/health/get-queue-mails.md +13 -0
  579. package/docs/examples/health/get-queue-messaging.md +13 -0
  580. package/docs/examples/health/get-queue-migrations.md +13 -0
  581. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  582. package/docs/examples/health/get-queue-usage.md +13 -0
  583. package/docs/examples/health/get-queue-webhooks.md +13 -0
  584. package/docs/examples/health/get-queue.md +11 -0
  585. package/docs/examples/health/get-storage-local.md +11 -0
  586. package/docs/examples/health/get-storage.md +11 -0
  587. package/docs/examples/health/get-time.md +11 -0
  588. package/docs/examples/health/get.md +11 -0
  589. package/docs/examples/locale/get.md +11 -0
  590. package/docs/examples/locale/list-codes.md +11 -0
  591. package/docs/examples/locale/list-continents.md +11 -0
  592. package/docs/examples/locale/list-countries-e-u.md +11 -0
  593. package/docs/examples/locale/list-countries-phones.md +11 -0
  594. package/docs/examples/locale/list-countries.md +11 -0
  595. package/docs/examples/locale/list-currencies.md +11 -0
  596. package/docs/examples/locale/list-languages.md +11 -0
  597. package/docs/examples/messaging/create-apns-provider.md +20 -0
  598. package/docs/examples/messaging/create-email.md +24 -0
  599. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  600. package/docs/examples/messaging/create-mailgun-provider.md +22 -0
  601. package/docs/examples/messaging/create-msg91provider.md +18 -0
  602. package/docs/examples/messaging/create-push.md +28 -0
  603. package/docs/examples/messaging/create-sendgrid-provider.md +20 -0
  604. package/docs/examples/messaging/create-sms.md +19 -0
  605. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  606. package/docs/examples/messaging/create-subscriber.md +15 -0
  607. package/docs/examples/messaging/create-telesign-provider.md +18 -0
  608. package/docs/examples/messaging/create-textmagic-provider.md +18 -0
  609. package/docs/examples/messaging/create-topic.md +15 -0
  610. package/docs/examples/messaging/create-twilio-provider.md +18 -0
  611. package/docs/examples/messaging/create-vonage-provider.md +18 -0
  612. package/docs/examples/messaging/delete-provider.md +13 -0
  613. package/docs/examples/messaging/delete-subscriber.md +14 -0
  614. package/docs/examples/messaging/delete-topic.md +13 -0
  615. package/docs/examples/messaging/delete.md +13 -0
  616. package/docs/examples/messaging/get-message.md +13 -0
  617. package/docs/examples/messaging/get-provider.md +13 -0
  618. package/docs/examples/messaging/get-subscriber.md +14 -0
  619. package/docs/examples/messaging/get-topic.md +13 -0
  620. package/docs/examples/messaging/list-message-logs.md +14 -0
  621. package/docs/examples/messaging/list-messages.md +14 -0
  622. package/docs/examples/messaging/list-provider-logs.md +14 -0
  623. package/docs/examples/messaging/list-providers.md +14 -0
  624. package/docs/examples/messaging/list-subscriber-logs.md +14 -0
  625. package/docs/examples/messaging/list-subscribers.md +15 -0
  626. package/docs/examples/messaging/list-targets.md +14 -0
  627. package/docs/examples/messaging/list-topic-logs.md +14 -0
  628. package/docs/examples/messaging/list-topics.md +14 -0
  629. package/docs/examples/messaging/update-apns-provider.md +20 -0
  630. package/docs/examples/messaging/update-email.md +24 -0
  631. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  632. package/docs/examples/messaging/update-mailgun-provider.md +22 -0
  633. package/docs/examples/messaging/update-msg91provider.md +18 -0
  634. package/docs/examples/messaging/update-push.md +28 -0
  635. package/docs/examples/messaging/update-sendgrid-provider.md +20 -0
  636. package/docs/examples/messaging/update-sms.md +19 -0
  637. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  638. package/docs/examples/messaging/update-telesign-provider.md +18 -0
  639. package/docs/examples/messaging/update-textmagic-provider.md +18 -0
  640. package/docs/examples/messaging/update-topic.md +15 -0
  641. package/docs/examples/messaging/update-twilio-provider.md +18 -0
  642. package/docs/examples/messaging/update-vonage-provider.md +18 -0
  643. package/docs/examples/migrations/create-appwrite-migration.md +16 -0
  644. package/docs/examples/migrations/create-firebase-migration.md +14 -0
  645. package/docs/examples/migrations/create-firebase-o-auth-migration.md +14 -0
  646. package/docs/examples/migrations/create-n-host-migration.md +20 -0
  647. package/docs/examples/migrations/create-supabase-migration.md +19 -0
  648. package/docs/examples/migrations/delete-firebase-auth.md +11 -0
  649. package/docs/examples/migrations/delete.md +13 -0
  650. package/docs/examples/migrations/get-appwrite-report.md +16 -0
  651. package/docs/examples/migrations/get-firebase-report-o-auth.md +14 -0
  652. package/docs/examples/migrations/get-firebase-report.md +14 -0
  653. package/docs/examples/migrations/get-n-host-report.md +20 -0
  654. package/docs/examples/migrations/get-supabase-report.md +19 -0
  655. package/docs/examples/migrations/get.md +13 -0
  656. package/docs/examples/migrations/list-firebase-projects.md +11 -0
  657. package/docs/examples/migrations/list.md +14 -0
  658. package/docs/examples/migrations/retry.md +13 -0
  659. package/docs/examples/project/create-variable.md +14 -0
  660. package/docs/examples/project/delete-variable.md +13 -0
  661. package/docs/examples/project/get-usage.md +15 -0
  662. package/docs/examples/project/get-variable.md +13 -0
  663. package/docs/examples/project/list-variables.md +11 -0
  664. package/docs/examples/project/update-variable.md +15 -0
  665. package/docs/examples/projects/create-j-w-t.md +15 -0
  666. package/docs/examples/projects/create-key.md +16 -0
  667. package/docs/examples/projects/create-platform.md +18 -0
  668. package/docs/examples/projects/create-smtp-test.md +22 -0
  669. package/docs/examples/projects/create-webhook.md +20 -0
  670. package/docs/examples/projects/create.md +25 -0
  671. package/docs/examples/projects/delete-email-template.md +15 -0
  672. package/docs/examples/projects/delete-key.md +14 -0
  673. package/docs/examples/projects/delete-platform.md +14 -0
  674. package/docs/examples/projects/delete-sms-template.md +15 -0
  675. package/docs/examples/projects/delete-webhook.md +14 -0
  676. package/docs/examples/projects/delete.md +13 -0
  677. package/docs/examples/projects/get-email-template.md +15 -0
  678. package/docs/examples/projects/get-key.md +14 -0
  679. package/docs/examples/projects/get-platform.md +14 -0
  680. package/docs/examples/projects/get-sms-template.md +15 -0
  681. package/docs/examples/projects/get-webhook.md +14 -0
  682. package/docs/examples/projects/get.md +13 -0
  683. package/docs/examples/projects/list-keys.md +13 -0
  684. package/docs/examples/projects/list-platforms.md +13 -0
  685. package/docs/examples/projects/list-webhooks.md +13 -0
  686. package/docs/examples/projects/list.md +14 -0
  687. package/docs/examples/projects/update-api-status-all.md +14 -0
  688. package/docs/examples/projects/update-api-status.md +15 -0
  689. package/docs/examples/projects/update-auth-duration.md +14 -0
  690. package/docs/examples/projects/update-auth-limit.md +14 -0
  691. package/docs/examples/projects/update-auth-password-dictionary.md +14 -0
  692. package/docs/examples/projects/update-auth-password-history.md +14 -0
  693. package/docs/examples/projects/update-auth-sessions-limit.md +14 -0
  694. package/docs/examples/projects/update-auth-status.md +15 -0
  695. package/docs/examples/projects/update-email-template.md +20 -0
  696. package/docs/examples/projects/update-key.md +17 -0
  697. package/docs/examples/projects/update-mock-numbers.md +14 -0
  698. package/docs/examples/projects/update-o-auth2.md +17 -0
  699. package/docs/examples/projects/update-personal-data-check.md +14 -0
  700. package/docs/examples/projects/update-platform.md +18 -0
  701. package/docs/examples/projects/update-service-status-all.md +14 -0
  702. package/docs/examples/projects/update-service-status.md +15 -0
  703. package/docs/examples/projects/update-session-alerts.md +14 -0
  704. package/docs/examples/projects/update-sms-template.md +16 -0
  705. package/docs/examples/projects/update-smtp.md +22 -0
  706. package/docs/examples/projects/update-team.md +14 -0
  707. package/docs/examples/projects/update-webhook-signature.md +14 -0
  708. package/docs/examples/projects/update-webhook.md +21 -0
  709. package/docs/examples/projects/update.md +23 -0
  710. package/docs/examples/proxy/create-rule.md +15 -0
  711. package/docs/examples/proxy/delete-rule.md +13 -0
  712. package/docs/examples/proxy/get-rule.md +13 -0
  713. package/docs/examples/proxy/list-rules.md +14 -0
  714. package/docs/examples/proxy/update-rule-verification.md +13 -0
  715. package/docs/examples/storage/create-bucket.md +22 -0
  716. package/docs/examples/storage/create-file.md +16 -0
  717. package/docs/examples/storage/delete-bucket.md +13 -0
  718. package/docs/examples/storage/delete-file.md +14 -0
  719. package/docs/examples/storage/get-bucket-usage.md +14 -0
  720. package/docs/examples/storage/get-bucket.md +13 -0
  721. package/docs/examples/storage/get-file-download.md +14 -0
  722. package/docs/examples/storage/get-file-preview.md +25 -0
  723. package/docs/examples/storage/get-file-view.md +14 -0
  724. package/docs/examples/storage/get-file.md +14 -0
  725. package/docs/examples/storage/get-usage.md +13 -0
  726. package/docs/examples/storage/list-buckets.md +14 -0
  727. package/docs/examples/storage/list-files.md +15 -0
  728. package/docs/examples/storage/update-bucket.md +22 -0
  729. package/docs/examples/storage/update-file.md +16 -0
  730. package/docs/examples/teams/create-membership.md +19 -0
  731. package/docs/examples/teams/create.md +15 -0
  732. package/docs/examples/teams/delete-membership.md +14 -0
  733. package/docs/examples/teams/delete.md +13 -0
  734. package/docs/examples/teams/get-membership.md +14 -0
  735. package/docs/examples/teams/get-prefs.md +13 -0
  736. package/docs/examples/teams/get.md +13 -0
  737. package/docs/examples/teams/list-logs.md +14 -0
  738. package/docs/examples/teams/list-memberships.md +15 -0
  739. package/docs/examples/teams/list.md +14 -0
  740. package/docs/examples/teams/update-membership-status.md +16 -0
  741. package/docs/examples/teams/update-membership.md +15 -0
  742. package/docs/examples/teams/update-name.md +14 -0
  743. package/docs/examples/teams/update-prefs.md +14 -0
  744. package/docs/examples/users/create-argon2user.md +16 -0
  745. package/docs/examples/users/create-bcrypt-user.md +16 -0
  746. package/docs/examples/users/create-j-w-t.md +15 -0
  747. package/docs/examples/users/create-m-d5user.md +16 -0
  748. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  749. package/docs/examples/users/create-p-h-pass-user.md +16 -0
  750. package/docs/examples/users/create-s-h-a-user.md +17 -0
  751. package/docs/examples/users/create-scrypt-modified-user.md +19 -0
  752. package/docs/examples/users/create-scrypt-user.md +21 -0
  753. package/docs/examples/users/create-session.md +13 -0
  754. package/docs/examples/users/create-target.md +18 -0
  755. package/docs/examples/users/create-token.md +15 -0
  756. package/docs/examples/users/create.md +17 -0
  757. package/docs/examples/users/delete-identity.md +13 -0
  758. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  759. package/docs/examples/users/delete-session.md +14 -0
  760. package/docs/examples/users/delete-sessions.md +13 -0
  761. package/docs/examples/users/delete-target.md +14 -0
  762. package/docs/examples/users/delete.md +13 -0
  763. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  764. package/docs/examples/users/get-prefs.md +13 -0
  765. package/docs/examples/users/get-target.md +14 -0
  766. package/docs/examples/users/get-usage.md +13 -0
  767. package/docs/examples/users/get.md +13 -0
  768. package/docs/examples/users/list-identities.md +14 -0
  769. package/docs/examples/users/list-logs.md +14 -0
  770. package/docs/examples/users/list-memberships.md +13 -0
  771. package/docs/examples/users/list-mfa-factors.md +13 -0
  772. package/docs/examples/users/list-sessions.md +13 -0
  773. package/docs/examples/users/list-targets.md +14 -0
  774. package/docs/examples/users/list.md +14 -0
  775. package/docs/examples/users/update-email-verification.md +14 -0
  776. package/docs/examples/users/update-email.md +14 -0
  777. package/docs/examples/users/update-labels.md +14 -0
  778. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  779. package/docs/examples/users/update-mfa.md +14 -0
  780. package/docs/examples/users/update-name.md +14 -0
  781. package/docs/examples/users/update-password.md +14 -0
  782. package/docs/examples/users/update-phone-verification.md +14 -0
  783. package/docs/examples/users/update-phone.md +14 -0
  784. package/docs/examples/users/update-prefs.md +14 -0
  785. package/docs/examples/users/update-status.md +14 -0
  786. package/docs/examples/users/update-target.md +17 -0
  787. package/docs/examples/vcs/create-repository-detection.md +15 -0
  788. package/docs/examples/vcs/create-repository.md +15 -0
  789. package/docs/examples/vcs/delete-installation.md +13 -0
  790. package/docs/examples/vcs/get-installation.md +13 -0
  791. package/docs/examples/vcs/get-repository-contents.md +15 -0
  792. package/docs/examples/vcs/get-repository.md +14 -0
  793. package/docs/examples/vcs/list-installations.md +14 -0
  794. package/docs/examples/vcs/list-repositories.md +14 -0
  795. package/docs/examples/vcs/list-repository-branches.md +14 -0
  796. package/docs/examples/vcs/update-external-deployments.md +15 -0
  797. package/package.json +29 -141
  798. package/publish.sh +4 -0
  799. package/src/client.ts +397 -0
  800. package/src/enums/api-service.ts +13 -0
  801. package/src/enums/api.ts +5 -0
  802. package/src/enums/auth-method.ts +9 -0
  803. package/src/enums/browser.ts +16 -0
  804. package/src/enums/compression.ts +5 -0
  805. package/src/enums/credit-card.ts +18 -0
  806. package/src/enums/database-usage-range.ts +5 -0
  807. package/src/enums/email-template-locale.ts +133 -0
  808. package/src/enums/email-template-type.ts +9 -0
  809. package/src/enums/entities/EntityLimitType.ts +4 -0
  810. package/src/enums/entities/PropertyAttributeName.ts +27 -0
  811. package/src/enums/entities/PropertyCondition.ts +8 -0
  812. package/src/enums/entities/PropertyType.ts +16 -0
  813. package/src/enums/entities/PropertyValueType.ts +6 -0
  814. package/src/enums/entities/RowAccess.ts +2 -0
  815. package/src/enums/entities/ViewFilterCondition.ts +12 -0
  816. package/src/enums/execution-method.ts +8 -0
  817. package/src/enums/flag.ts +197 -0
  818. package/src/enums/function-usage-range.ts +5 -0
  819. package/src/enums/image-format.ts +7 -0
  820. package/src/enums/image-gravity.ts +11 -0
  821. package/src/enums/index-type.ts +5 -0
  822. package/src/enums/messaging-provider-type.ts +5 -0
  823. package/src/enums/name.ts +14 -0
  824. package/src/enums/o-auth-provider copy.ts +41 -0
  825. package/src/enums/password-hash.ts +13 -0
  826. package/src/enums/platform-type.ts +17 -0
  827. package/src/enums/project-usage-range.ts +4 -0
  828. package/src/enums/region.ts +4 -0
  829. package/src/enums/relation-mutate.ts +5 -0
  830. package/src/enums/relationship-type.ts +6 -0
  831. package/src/enums/resource-type.ts +4 -0
  832. package/src/enums/runtime.ts +48 -0
  833. package/src/enums/s-m-t-p-secure.ts +3 -0
  834. package/src/enums/shared/ApplicationLayout.ts +4 -0
  835. package/src/enums/shared/Colors.ts +24 -0
  836. package/src/enums/shared/InputType.ts +6 -0
  837. package/src/enums/shared/Periodicity.ts +7 -0
  838. package/src/enums/shared/SvgIcon.ts +37 -0
  839. package/src/enums/shared/Theme.ts +4 -0
  840. package/src/enums/sms-template-locale.ts +133 -0
  841. package/src/enums/sms-template-type.ts +6 -0
  842. package/src/enums/smtp-encryption.ts +5 -0
  843. package/src/enums/storage-usage-range.ts +5 -0
  844. package/src/enums/subscriptions/PricingModel.ts +14 -0
  845. package/src/enums/subscriptions/SubscriptionBillingPeriod.ts +15 -0
  846. package/src/enums/subscriptions/SubscriptionFeatureLimitType.ts +16 -0
  847. package/src/enums/subscriptions/SubscriptionPriceType.ts +10 -0
  848. package/src/enums/tenants/LinkedAccountStatus.ts +5 -0
  849. package/src/enums/tenants/TenantUserJoined.ts +6 -0
  850. package/src/enums/tenants/TenantUserStatus.ts +6 -0
  851. package/src/enums/tenants/TenantUserType.ts +5 -0
  852. package/src/enums/user-usage-range.ts +5 -0
  853. package/src/getAppcondaClient.ts +75 -0
  854. package/src/getSDKForService.ts +71 -0
  855. package/src/id.ts +47 -0
  856. package/src/index.ts +3 -0
  857. package/src/inputFile.ts +23 -0
  858. package/src/lib/errors.ts +141 -0
  859. package/src/lib/index.ts +0 -0
  860. package/src/lib/types.ts +7 -0
  861. package/src/models.ts +3339 -0
  862. package/src/modules/account/enums/authentication-factor.ts +6 -0
  863. package/src/modules/account/enums/authenticator-type.ts +3 -0
  864. package/src/modules/account/enums/o-auth-provider.ts +41 -0
  865. package/src/modules/account/index.ts +3 -0
  866. package/src/modules/account/schema.ts +8 -0
  867. package/src/modules/account/service.ts +1648 -0
  868. package/src/modules/account/types.ts +426 -0
  869. package/src/modules/accounv1/index.ts +4 -0
  870. package/src/modules/accounv1/schema.ts +50 -0
  871. package/src/modules/accounv1/service.ts +43 -0
  872. package/src/modules/accounv1/types.ts +16 -0
  873. package/src/modules/acl/service.ts +55 -0
  874. package/src/modules/agent/action.ts +66 -0
  875. package/src/modules/agent/index.ts +4 -0
  876. package/src/modules/agent/schema.ts +25 -0
  877. package/src/modules/agent/service.ts +34 -0
  878. package/src/modules/agent/types.ts +15 -0
  879. package/src/modules/ai/index.ts +1 -0
  880. package/src/modules/ai/node/actions.ts +14 -0
  881. package/src/modules/ai/node/index.ts +2 -0
  882. package/src/modules/ai/node/service.ts +18 -0
  883. package/src/modules/bpm/index.ts +3 -0
  884. package/src/modules/bpm/schema.ts +23 -0
  885. package/src/modules/bpm/service.ts +28 -0
  886. package/src/modules/bpm/types.ts +11 -0
  887. package/src/modules/builder/action.ts +234 -0
  888. package/src/modules/builder/index.ts +4 -0
  889. package/src/modules/builder/schema.ts +95 -0
  890. package/src/modules/builder/service.ts +74 -0
  891. package/src/modules/builder/types.ts +68 -0
  892. package/src/modules/datasource/action.ts +189 -0
  893. package/src/modules/datasource/index.ts +4 -0
  894. package/src/modules/datasource/schema.ts +69 -0
  895. package/src/modules/datasource/service.ts +58 -0
  896. package/src/modules/datasource/types.ts +31 -0
  897. package/src/modules/emploid/action.ts +1063 -0
  898. package/src/modules/emploid/index.ts +4 -0
  899. package/src/modules/emploid/schema.ts +405 -0
  900. package/src/modules/emploid/service.ts +295 -0
  901. package/src/modules/emploid/types.ts +132 -0
  902. package/src/modules/google/action.ts +54 -0
  903. package/src/modules/google/index.ts +4 -0
  904. package/src/modules/google/schema.ts +19 -0
  905. package/src/modules/google/service.ts +23 -0
  906. package/src/modules/google/types.ts +15 -0
  907. package/src/modules/hooks/index.ts +5 -0
  908. package/src/modules/hooks/lib/Hooks.ts +103 -0
  909. package/src/modules/hooks/lib/handler.ts +27 -0
  910. package/src/modules/hooks/lib/jobs/index.ts +2 -0
  911. package/src/modules/hooks/lib/jobs/job1.ts +20 -0
  912. package/src/modules/hooks/lib/jobs/log-job.ts +10 -0
  913. package/src/modules/hooks/lib/wait.ts +17 -0
  914. package/src/modules/index.ts +17 -0
  915. package/src/modules/mail/action.ts +22 -0
  916. package/src/modules/mail/index.ts +4 -0
  917. package/src/modules/mail/schema.ts +9 -0
  918. package/src/modules/mail/service.ts +15 -0
  919. package/src/modules/mail/types.ts +11 -0
  920. package/src/modules/notion/action.ts +53 -0
  921. package/src/modules/notion/index.ts +4 -0
  922. package/src/modules/notion/schema.ts +21 -0
  923. package/src/modules/notion/service.ts +26 -0
  924. package/src/modules/notion/types.ts +14 -0
  925. package/src/modules/organization/action.ts +71 -0
  926. package/src/modules/organization/index.ts +4 -0
  927. package/src/modules/organization/schema.ts +23 -0
  928. package/src/modules/organization/service.ts +32 -0
  929. package/src/modules/organization/types.ts +15 -0
  930. package/src/modules/scheduled-job/action.ts +212 -0
  931. package/src/modules/scheduled-job/index.ts +8 -0
  932. package/src/modules/scheduled-job/lib/Schedules.ts +105 -0
  933. package/src/modules/scheduled-job/lib/handler.ts +27 -0
  934. package/src/modules/scheduled-job/lib/jobs/index.ts +2 -0
  935. package/src/modules/scheduled-job/lib/jobs/job1.ts +12 -0
  936. package/src/modules/scheduled-job/lib/wait.ts +17 -0
  937. package/src/modules/scheduled-job/schema.ts +62 -0
  938. package/src/modules/scheduled-job/service.ts +63 -0
  939. package/src/modules/scheduled-job/types.ts +79 -0
  940. package/src/modules/task/action.ts +819 -0
  941. package/src/modules/task/index.ts +4 -0
  942. package/src/modules/task/schema.ts +455 -0
  943. package/src/modules/task/service.ts +268 -0
  944. package/src/modules/task/types.ts +325 -0
  945. package/src/modules/tenant/actions.ts +173 -0
  946. package/src/modules/tenant/index.ts +3 -0
  947. package/src/modules/tenant/schema.ts +32 -0
  948. package/src/modules/tenant/service.ts +43 -0
  949. package/src/modules/tenant/tenant.ts +193 -0
  950. package/src/modules/tenant/types.ts +22 -0
  951. package/src/modules/waitlist/action.ts +93 -0
  952. package/src/modules/waitlist/index.ts +4 -0
  953. package/src/modules/waitlist/schema.ts +24 -0
  954. package/src/modules/waitlist/service.ts +41 -0
  955. package/src/modules/waitlist/types.ts +18 -0
  956. package/src/permission.ts +57 -0
  957. package/src/query.ts +261 -0
  958. package/src/role.ts +100 -0
  959. package/src/service-client.ts +40 -0
  960. package/src/service.ts +30 -0
  961. package/src/services/applets.ts +75 -0
  962. package/src/services/avatars.ts +314 -0
  963. package/src/services/chat-flow.ts +32 -0
  964. package/src/services/community.ts +102 -0
  965. package/src/services/configuration.ts +15 -0
  966. package/src/services/databases.ts +2037 -0
  967. package/src/services/functions.ts +986 -0
  968. package/src/services/graphql.ts +75 -0
  969. package/src/services/health.ts +629 -0
  970. package/src/services/locale.ts +205 -0
  971. package/src/services/messaging.ts +2247 -0
  972. package/src/services/permissions.ts +131 -0
  973. package/src/services/pricing.ts +30 -0
  974. package/src/services/projects.ts +1901 -0
  975. package/src/services/roles.ts +101 -0
  976. package/src/services/schema.ts +65 -0
  977. package/src/services/storage.ts +576 -0
  978. package/src/services/subscription.ts +39 -0
  979. package/src/services/teams.ts +490 -0
  980. package/src/services/tenant-subscription.ts +93 -0
  981. package/src/services/users.ts +1584 -0
  982. package/tsconfig.json +32 -0
  983. package/index.d.ts +0 -3367
  984. package/index.js +0 -407
package/index.js DELETED
@@ -1,407 +0,0 @@
1
- /*
2
- * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
- * This devtool is neither made for production nor for readable output files.
4
- * It uses "eval()" calls to create a separate source file in the browser devtools.
5
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
- * or disable the default devtool with "devtool: false".
7
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
- */
9
- (function webpackUniversalModuleDefinition(root, factory) {
10
- if(typeof exports === 'object' && typeof module === 'object')
11
- module.exports = factory();
12
- else if(typeof define === 'function' && define.amd)
13
- define([], factory);
14
- else {
15
- var a = factory();
16
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
- }
18
- })(self, function() {
19
- return /******/ (() => { // webpackBootstrap
20
- /******/ var __webpack_modules__ = ({
21
-
22
- /***/ "./node_modules/cross-fetch/dist/browser-ponyfill.js":
23
- /*!***********************************************************!*\
24
- !*** ./node_modules/cross-fetch/dist/browser-ponyfill.js ***!
25
- \***********************************************************/
26
- /***/ ((module, exports, __webpack_require__) => {
27
-
28
- eval("// Save global object in a variable\nvar __global__ =\n(typeof globalThis !== 'undefined' && globalThis) ||\n(typeof self !== 'undefined' && self) ||\n(typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g);\n// Create an object that extends from __global__ without the fetch function\nvar __globalThis__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = __global__.DOMException\n}\nF.prototype = __global__; // Needed for feature detection on whatwg-fetch's code\nreturn new F();\n})();\n// Wraps whatwg-fetch with a function scope to hijack the global object\n// \"globalThis\" that's going to be patched\n(function(globalThis) {\n\nvar irrelevant = (function (exports) {\n\n var global =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n (typeof global !== 'undefined' && global);\n\n var support = {\n searchParams: 'URLSearchParams' in global,\n iterable: 'Symbol' in global && 'iterator' in Symbol,\n blob:\n 'FileReader' in global &&\n 'Blob' in global &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in global,\n arrayBuffer: 'ArrayBuffer' in global\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n this.bodyUsed = this.bodyUsed;\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this);\n if (isConsumed) {\n return isConsumed\n }\n if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/;\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/;\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();\n }\n }\n }\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText;\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = global.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n setTimeout(function() {\n resolve(new Response(body, options));\n }, 0);\n };\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n }, 0);\n };\n\n function fixUrl(url) {\n try {\n return url === '' && global.location.href ? global.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob';\n } else if (\n support.arrayBuffer &&\n request.headers.get('Content-Type') &&\n request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1\n ) {\n xhr.responseType = 'arraybuffer';\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]));\n });\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!global.fetch) {\n global.fetch = fetch;\n global.Headers = Headers;\n global.Request = Request;\n global.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n return exports;\n\n})({});\n})(__globalThis__);\n// This is a ponyfill, so...\n__globalThis__.fetch.ponyfill = true;\ndelete __globalThis__.fetch.polyfill;\n// Choose between native implementation (__global__) or custom implementation (__globalThis__)\nvar ctx = __global__.fetch ? __global__ : __globalThis__;\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n\n\n//# sourceURL=webpack://@appconda/sdk/./node_modules/cross-fetch/dist/browser-ponyfill.js?");
29
-
30
- /***/ }),
31
-
32
- /***/ "./node_modules/isomorphic-form-data/lib/browser.js":
33
- /*!**********************************************************!*\
34
- !*** ./node_modules/isomorphic-form-data/lib/browser.js ***!
35
- \**********************************************************/
36
- /***/ ((module) => {
37
-
38
- eval("module.exports = window.FormData\n\n\n//# sourceURL=webpack://@appconda/sdk/./node_modules/isomorphic-form-data/lib/browser.js?");
39
-
40
- /***/ }),
41
-
42
- /***/ "./src/client.ts":
43
- /*!***********************!*\
44
- !*** ./src/client.ts ***!
45
- \***********************/
46
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
47
-
48
- "use strict";
49
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AppcondaException\": () => (/* binding */ AppcondaException),\n/* harmony export */ \"Client\": () => (/* binding */ Client),\n/* harmony export */ \"Query\": () => (/* reexport safe */ _query__WEBPACK_IMPORTED_MODULE_3__.Query)\n/* harmony export */ });\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! isomorphic-form-data */ \"./node_modules/isomorphic-form-data/lib/browser.js\");\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var cross_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! cross-fetch */ \"./node_modules/cross-fetch/dist/browser-ponyfill.js\");\n/* harmony import */ var cross_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cross_fetch__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./service */ \"./src/service.ts\");\n/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./query */ \"./src/query.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nfunction jsonToUrlEncoded(obj) {\n const formBody = [];\n for (const property in obj) {\n const encodedKey = encodeURIComponent(property);\n let encodedValue;\n if (typeof obj[property] === 'object') {\n encodedValue = encodeURIComponent(JSON.stringify(obj[property]));\n }\n else {\n encodedValue = encodeURIComponent(obj[property]);\n }\n formBody.push(encodedKey + \"=\" + encodedValue);\n }\n return formBody.join(\"&\");\n}\nclass AppcondaException extends Error {\n constructor(message, code = 0, type = '', response = '') {\n super(message);\n this.name = 'RealmoceanException';\n this.message = message;\n this.code = code;\n this.type = type;\n this.response = response;\n }\n}\nclass Client {\n constructor() {\n this.config = {\n endpoint: 'https://HOSTNAME/v1',\n endpointRealtime: '',\n project: '',\n key: '',\n jwt: '',\n locale: '',\n mode: '',\n };\n this.headers = {\n 'x-sdk-name': 'Console',\n 'x-sdk-platform': 'console',\n 'x-sdk-language': 'web',\n 'x-sdk-version': '0.1.0',\n 'X-Realmocean-Response-Format': '1.4.0',\n };\n this.realtime = {\n socket: undefined,\n timeout: undefined,\n url: '',\n channels: new Set(),\n subscriptions: new Map(),\n subscriptionsCounter: 0,\n reconnect: true,\n reconnectAttempts: 0,\n lastMessage: undefined,\n connect: () => {\n clearTimeout(this.realtime.timeout);\n this.realtime.timeout = window === null || window === void 0 ? void 0 : window.setTimeout(() => {\n this.realtime.createSocket();\n }, 50);\n },\n getTimeout: () => {\n switch (true) {\n case this.realtime.reconnectAttempts < 5:\n return 1000;\n case this.realtime.reconnectAttempts < 15:\n return 5000;\n case this.realtime.reconnectAttempts < 100:\n return 10000;\n default:\n return 60000;\n }\n },\n createSocket: () => {\n var _a, _b;\n if (this.realtime.channels.size < 1)\n return;\n const channels = new URLSearchParams();\n channels.set('project', this.config.project);\n this.realtime.channels.forEach(channel => {\n channels.append('channels[]', channel);\n });\n const url = this.config.endpointRealtime + '/realtime?' + channels.toString();\n if (url !== this.realtime.url || // Check if URL is present\n !this.realtime.socket || // Check if WebSocket has not been created\n ((_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)\n ) {\n if (this.realtime.socket &&\n ((_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)\n ) {\n this.realtime.reconnect = false;\n this.realtime.socket.close();\n }\n this.realtime.url = url;\n this.realtime.socket = new WebSocket(url);\n this.realtime.socket.addEventListener('message', this.realtime.onMessage);\n this.realtime.socket.addEventListener('open', _event => {\n this.realtime.reconnectAttempts = 0;\n });\n this.realtime.socket.addEventListener('close', event => {\n var _a, _b, _c;\n if (!this.realtime.reconnect ||\n (((_b = (_a = this.realtime) === null || _a === void 0 ? void 0 : _a.lastMessage) === null || _b === void 0 ? void 0 : _b.type) === 'error' && // Check if last message was of type error\n ((_c = this.realtime) === null || _c === void 0 ? void 0 : _c.lastMessage.data).code === 1008 // Check for policy violation 1008\n )) {\n this.realtime.reconnect = true;\n return;\n }\n const timeout = this.realtime.getTimeout();\n console.error(`Realtime got disconnected. Reconnect will be attempted in ${timeout / 1000} seconds.`, event.reason);\n setTimeout(() => {\n this.realtime.reconnectAttempts++;\n this.realtime.createSocket();\n }, timeout);\n });\n }\n },\n onMessage: (event) => {\n var _a, _b;\n try {\n const message = JSON.parse(event.data);\n this.realtime.lastMessage = message;\n switch (message.type) {\n case 'connected':\n const cookie = JSON.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');\n const session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];\n const messageData = message.data;\n if (session && !messageData.user) {\n (_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSON.stringify({\n type: 'authentication',\n data: {\n session\n }\n }));\n }\n break;\n case 'event':\n let data = message.data;\n if (data === null || data === void 0 ? void 0 : data.channels) {\n const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));\n if (!isSubscribed)\n return;\n this.realtime.subscriptions.forEach(subscription => {\n if (data.channels.some(channel => subscription.channels.includes(channel))) {\n setTimeout(() => subscription.callback(data));\n }\n });\n }\n break;\n case 'error':\n throw message.data;\n default:\n break;\n }\n }\n catch (e) {\n console.error(e);\n }\n },\n cleanUp: channels => {\n this.realtime.channels.forEach(channel => {\n if (channels.includes(channel)) {\n let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {\n return subscription.channels.includes(channel);\n });\n if (!found) {\n this.realtime.channels.delete(channel);\n }\n }\n });\n }\n };\n }\n /**\n * Set Endpoint\n *\n * Your project endpoint\n *\n * @param {string} endpoint\n *\n * @returns {this}\n */\n setEndpoint(endpoint) {\n this.config.endpoint = endpoint;\n this.config.endpointRealtime = this.config.endpointRealtime || this.config.endpoint.replace('https://', 'wss://').replace('http://', 'ws://');\n return this;\n }\n /**\n * Set Realtime Endpoint\n *\n * @param {string} endpointRealtime\n *\n * @returns {this}\n */\n setEndpointRealtime(endpointRealtime) {\n this.config.endpointRealtime = endpointRealtime;\n return this;\n }\n /**\n * Set Project\n *\n * Your project ID\n *\n * @param value string\n *\n * @return {this}\n */\n setProject(value) {\n this.headers['X-Realmocean-Realm'] = value;\n this.config.project = value;\n return this;\n }\n /**\n * Set Key\n *\n * Your secret API key\n *\n * @param value string\n *\n * @return {this}\n */\n setKey(value) {\n this.headers['X-Realmocean-Key'] = value;\n this.config.key = value;\n return this;\n }\n /**\n * Set JWT\n *\n * Your secret JSON Web Token\n *\n * @param value string\n *\n * @return {this}\n */\n setJWT(value) {\n this.headers['X-Realmocean-JWT'] = value;\n this.config.jwt = value;\n return this;\n }\n /**\n * Set Locale\n *\n * @param value string\n *\n * @return {this}\n */\n setLocale(value) {\n this.headers['X-Realmocean-Locale'] = value;\n this.config.locale = value;\n return this;\n }\n /**\n * Set Mode\n *\n * @param value string\n *\n * @return {this}\n */\n setMode(value) {\n if (value === undefined) {\n delete this.headers['X-Realmocean-Mode'];\n this.config.mode = undefined;\n }\n else {\n this.headers['X-Realmocean-Mode'] = value;\n this.config.mode = value;\n }\n return this;\n }\n /**\n * Subscribes to Realmocean events and passes you the payload in realtime.\n *\n * @param {string|string[]} channels\n * Channel to subscribe - pass a single channel as a string or multiple with an array of strings.\n *\n * Possible channels are:\n * - account\n * - collections\n * - collections.[ID]\n * - collections.[ID].documents\n * - documents\n * - documents.[ID]\n * - files\n * - files.[ID]\n * - executions\n * - executions.[ID]\n * - functions.[ID]\n * - teams\n * - teams.[ID]\n * - memberships\n * - memberships.[ID]\n * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.\n * @returns {() => void} Unsubscribes from events.\n */\n subscribe(channels, callback) {\n let channelArray = typeof channels === 'string' ? [channels] : channels;\n channelArray.forEach(channel => this.realtime.channels.add(channel));\n const counter = this.realtime.subscriptionsCounter++;\n this.realtime.subscriptions.set(counter, {\n channels: channelArray,\n callback\n });\n this.realtime.connect();\n return () => {\n this.realtime.subscriptions.delete(counter);\n this.realtime.cleanUp(channelArray);\n this.realtime.connect();\n };\n }\n call(method_1, url_1) {\n return __awaiter(this, arguments, void 0, function* (method, url, headers = {}, params = {}) {\n var _a, _b;\n method = method.toUpperCase();\n headers = Object.assign({}, this.headers, headers);\n let options = {\n method,\n headers,\n credentials: 'include'\n };\n if (typeof window !== 'undefined' && window.localStorage) {\n headers['X-Fallback-Cookies'] = (_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '';\n }\n if (method === 'GET') {\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_2__.Service.flatten(params))) {\n url.searchParams.append(key, value);\n }\n }\n else {\n switch (headers['content-type']) {\n case 'application/json':\n options.body = JSON.stringify(params);\n break;\n case 'multipart/form-data':\n let formData = new FormData();\n for (const key in params) {\n if (Array.isArray(params[key])) {\n params[key].forEach((value) => {\n formData.append(key + '[]', value);\n });\n }\n else {\n formData.append(key, params[key]);\n }\n }\n options.body = formData;\n delete headers['content-type'];\n break;\n case 'application/x-www-form-urlencoded':\n options.body = jsonToUrlEncoded(params);\n delete headers['content-type'];\n break;\n }\n }\n try {\n let data = null;\n const response = yield (0,cross_fetch__WEBPACK_IMPORTED_MODULE_1__.fetch)(url.toString(), options);\n if ((_b = response.headers.get('content-type')) === null || _b === void 0 ? void 0 : _b.includes('application/json')) {\n data = yield response.json();\n }\n else {\n data = {\n message: yield response.text()\n };\n }\n if (400 <= response.status) {\n throw new AppcondaException(data === null || data === void 0 ? void 0 : data.message, response.status, data === null || data === void 0 ? void 0 : data.type, data);\n }\n const cookieFallback = response.headers.get('X-Fallback-Cookies');\n if (typeof window !== 'undefined' && window.localStorage && cookieFallback) {\n window.console.warn('Realmocean is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.');\n window.localStorage.setItem('cookieFallback', cookieFallback);\n }\n return data;\n }\n catch (e) {\n if (e instanceof AppcondaException) {\n throw e;\n }\n throw new AppcondaException(e.message, e.code, e.type, e.response);\n }\n });\n }\n}\n\n\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/client.ts?");
50
-
51
- /***/ }),
52
-
53
- /***/ "./src/enums/authentication-factor.ts":
54
- /*!********************************************!*\
55
- !*** ./src/enums/authentication-factor.ts ***!
56
- \********************************************/
57
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58
-
59
- "use strict";
60
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AuthenticationFactor\": () => (/* binding */ AuthenticationFactor)\n/* harmony export */ });\nvar AuthenticationFactor;\n(function (AuthenticationFactor) {\n AuthenticationFactor[\"Email\"] = \"email\";\n AuthenticationFactor[\"Phone\"] = \"phone\";\n AuthenticationFactor[\"Totp\"] = \"totp\";\n AuthenticationFactor[\"Recoverycode\"] = \"recoverycode\";\n})(AuthenticationFactor || (AuthenticationFactor = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/authentication-factor.ts?");
61
-
62
- /***/ }),
63
-
64
- /***/ "./src/enums/authenticator-type.ts":
65
- /*!*****************************************!*\
66
- !*** ./src/enums/authenticator-type.ts ***!
67
- \*****************************************/
68
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
69
-
70
- "use strict";
71
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AuthenticatorType\": () => (/* binding */ AuthenticatorType)\n/* harmony export */ });\nvar AuthenticatorType;\n(function (AuthenticatorType) {\n AuthenticatorType[\"Totp\"] = \"totp\";\n})(AuthenticatorType || (AuthenticatorType = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/authenticator-type.ts?");
72
-
73
- /***/ }),
74
-
75
- /***/ "./src/enums/browser.ts":
76
- /*!******************************!*\
77
- !*** ./src/enums/browser.ts ***!
78
- \******************************/
79
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
80
-
81
- "use strict";
82
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Browser\": () => (/* binding */ Browser)\n/* harmony export */ });\nvar Browser;\n(function (Browser) {\n Browser[\"AvantBrowser\"] = \"aa\";\n Browser[\"AndroidWebViewBeta\"] = \"an\";\n Browser[\"GoogleChrome\"] = \"ch\";\n Browser[\"GoogleChromeIOS\"] = \"ci\";\n Browser[\"GoogleChromeMobile\"] = \"cm\";\n Browser[\"Chromium\"] = \"cr\";\n Browser[\"MozillaFirefox\"] = \"ff\";\n Browser[\"Safari\"] = \"sf\";\n Browser[\"MobileSafari\"] = \"mf\";\n Browser[\"MicrosoftEdge\"] = \"ps\";\n Browser[\"MicrosoftEdgeIOS\"] = \"oi\";\n Browser[\"OperaMini\"] = \"om\";\n Browser[\"Opera\"] = \"op\";\n Browser[\"OperaNext\"] = \"on\";\n})(Browser || (Browser = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/browser.ts?");
83
-
84
- /***/ }),
85
-
86
- /***/ "./src/enums/credit-card.ts":
87
- /*!**********************************!*\
88
- !*** ./src/enums/credit-card.ts ***!
89
- \**********************************/
90
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
91
-
92
- "use strict";
93
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CreditCard\": () => (/* binding */ CreditCard)\n/* harmony export */ });\nvar CreditCard;\n(function (CreditCard) {\n CreditCard[\"AmericanExpress\"] = \"amex\";\n CreditCard[\"Argencard\"] = \"argencard\";\n CreditCard[\"Cabal\"] = \"cabal\";\n CreditCard[\"Cencosud\"] = \"cencosud\";\n CreditCard[\"DinersClub\"] = \"diners\";\n CreditCard[\"Discover\"] = \"discover\";\n CreditCard[\"Elo\"] = \"elo\";\n CreditCard[\"Hipercard\"] = \"hipercard\";\n CreditCard[\"JCB\"] = \"jcb\";\n CreditCard[\"Mastercard\"] = \"mastercard\";\n CreditCard[\"Naranja\"] = \"naranja\";\n CreditCard[\"TarjetaShopping\"] = \"targeta-shopping\";\n CreditCard[\"UnionChinaPay\"] = \"union-china-pay\";\n CreditCard[\"Visa\"] = \"visa\";\n CreditCard[\"MIR\"] = \"mir\";\n CreditCard[\"Maestro\"] = \"maestro\";\n})(CreditCard || (CreditCard = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/credit-card.ts?");
94
-
95
- /***/ }),
96
-
97
- /***/ "./src/enums/execution-method.ts":
98
- /*!***************************************!*\
99
- !*** ./src/enums/execution-method.ts ***!
100
- \***************************************/
101
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
102
-
103
- "use strict";
104
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExecutionMethod\": () => (/* binding */ ExecutionMethod)\n/* harmony export */ });\nvar ExecutionMethod;\n(function (ExecutionMethod) {\n ExecutionMethod[\"GET\"] = \"GET\";\n ExecutionMethod[\"POST\"] = \"POST\";\n ExecutionMethod[\"PUT\"] = \"PUT\";\n ExecutionMethod[\"PATCH\"] = \"PATCH\";\n ExecutionMethod[\"DELETE\"] = \"DELETE\";\n ExecutionMethod[\"OPTIONS\"] = \"OPTIONS\";\n})(ExecutionMethod || (ExecutionMethod = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/execution-method.ts?");
105
-
106
- /***/ }),
107
-
108
- /***/ "./src/enums/flag.ts":
109
- /*!***************************!*\
110
- !*** ./src/enums/flag.ts ***!
111
- \***************************/
112
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
113
-
114
- "use strict";
115
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Flag\": () => (/* binding */ Flag)\n/* harmony export */ });\nvar Flag;\n(function (Flag) {\n Flag[\"Afghanistan\"] = \"af\";\n Flag[\"Angola\"] = \"ao\";\n Flag[\"Albania\"] = \"al\";\n Flag[\"Andorra\"] = \"ad\";\n Flag[\"UnitedArabEmirates\"] = \"ae\";\n Flag[\"Argentina\"] = \"ar\";\n Flag[\"Armenia\"] = \"am\";\n Flag[\"AntiguaAndBarbuda\"] = \"ag\";\n Flag[\"Australia\"] = \"au\";\n Flag[\"Austria\"] = \"at\";\n Flag[\"Azerbaijan\"] = \"az\";\n Flag[\"Burundi\"] = \"bi\";\n Flag[\"Belgium\"] = \"be\";\n Flag[\"Benin\"] = \"bj\";\n Flag[\"BurkinaFaso\"] = \"bf\";\n Flag[\"Bangladesh\"] = \"bd\";\n Flag[\"Bulgaria\"] = \"bg\";\n Flag[\"Bahrain\"] = \"bh\";\n Flag[\"Bahamas\"] = \"bs\";\n Flag[\"BosniaAndHerzegovina\"] = \"ba\";\n Flag[\"Belarus\"] = \"by\";\n Flag[\"Belize\"] = \"bz\";\n Flag[\"Bolivia\"] = \"bo\";\n Flag[\"Brazil\"] = \"br\";\n Flag[\"Barbados\"] = \"bb\";\n Flag[\"BruneiDarussalam\"] = \"bn\";\n Flag[\"Bhutan\"] = \"bt\";\n Flag[\"Botswana\"] = \"bw\";\n Flag[\"CentralAfricanRepublic\"] = \"cf\";\n Flag[\"Canada\"] = \"ca\";\n Flag[\"Switzerland\"] = \"ch\";\n Flag[\"Chile\"] = \"cl\";\n Flag[\"China\"] = \"cn\";\n Flag[\"CoteDIvoire\"] = \"ci\";\n Flag[\"Cameroon\"] = \"cm\";\n Flag[\"DemocraticRepublicOfTheCongo\"] = \"cd\";\n Flag[\"RepublicOfTheCongo\"] = \"cg\";\n Flag[\"Colombia\"] = \"co\";\n Flag[\"Comoros\"] = \"km\";\n Flag[\"CapeVerde\"] = \"cv\";\n Flag[\"CostaRica\"] = \"cr\";\n Flag[\"Cuba\"] = \"cu\";\n Flag[\"Cyprus\"] = \"cy\";\n Flag[\"CzechRepublic\"] = \"cz\";\n Flag[\"Germany\"] = \"de\";\n Flag[\"Djibouti\"] = \"dj\";\n Flag[\"Dominica\"] = \"dm\";\n Flag[\"Denmark\"] = \"dk\";\n Flag[\"DominicanRepublic\"] = \"do\";\n Flag[\"Algeria\"] = \"dz\";\n Flag[\"Ecuador\"] = \"ec\";\n Flag[\"Egypt\"] = \"eg\";\n Flag[\"Eritrea\"] = \"er\";\n Flag[\"Spain\"] = \"es\";\n Flag[\"Estonia\"] = \"ee\";\n Flag[\"Ethiopia\"] = \"et\";\n Flag[\"Finland\"] = \"fi\";\n Flag[\"Fiji\"] = \"fj\";\n Flag[\"France\"] = \"fr\";\n Flag[\"MicronesiaFederatedStatesOf\"] = \"fm\";\n Flag[\"Gabon\"] = \"ga\";\n Flag[\"UnitedKingdom\"] = \"gb\";\n Flag[\"Georgia\"] = \"ge\";\n Flag[\"Ghana\"] = \"gh\";\n Flag[\"Guinea\"] = \"gn\";\n Flag[\"Gambia\"] = \"gm\";\n Flag[\"GuineaBissau\"] = \"gw\";\n Flag[\"EquatorialGuinea\"] = \"gq\";\n Flag[\"Greece\"] = \"gr\";\n Flag[\"Grenada\"] = \"gd\";\n Flag[\"Guatemala\"] = \"gt\";\n Flag[\"Guyana\"] = \"gy\";\n Flag[\"Honduras\"] = \"hn\";\n Flag[\"Croatia\"] = \"hr\";\n Flag[\"Haiti\"] = \"ht\";\n Flag[\"Hungary\"] = \"hu\";\n Flag[\"Indonesia\"] = \"id\";\n Flag[\"India\"] = \"in\";\n Flag[\"Ireland\"] = \"ie\";\n Flag[\"IranIslamicRepublicOf\"] = \"ir\";\n Flag[\"Iraq\"] = \"iq\";\n Flag[\"Iceland\"] = \"is\";\n Flag[\"Israel\"] = \"il\";\n Flag[\"Italy\"] = \"it\";\n Flag[\"Jamaica\"] = \"jm\";\n Flag[\"Jordan\"] = \"jo\";\n Flag[\"Japan\"] = \"jp\";\n Flag[\"Kazakhstan\"] = \"kz\";\n Flag[\"Kenya\"] = \"ke\";\n Flag[\"Kyrgyzstan\"] = \"kg\";\n Flag[\"Cambodia\"] = \"kh\";\n Flag[\"Kiribati\"] = \"ki\";\n Flag[\"SaintKittsAndNevis\"] = \"kn\";\n Flag[\"SouthKorea\"] = \"kr\";\n Flag[\"Kuwait\"] = \"kw\";\n Flag[\"LaoPeopleSDemocraticRepublic\"] = \"la\";\n Flag[\"Lebanon\"] = \"lb\";\n Flag[\"Liberia\"] = \"lr\";\n Flag[\"Libya\"] = \"ly\";\n Flag[\"SaintLucia\"] = \"lc\";\n Flag[\"Liechtenstein\"] = \"li\";\n Flag[\"SriLanka\"] = \"lk\";\n Flag[\"Lesotho\"] = \"ls\";\n Flag[\"Lithuania\"] = \"lt\";\n Flag[\"Luxembourg\"] = \"lu\";\n Flag[\"Latvia\"] = \"lv\";\n Flag[\"Morocco\"] = \"ma\";\n Flag[\"Monaco\"] = \"mc\";\n Flag[\"Moldova\"] = \"md\";\n Flag[\"Madagascar\"] = \"mg\";\n Flag[\"Maldives\"] = \"mv\";\n Flag[\"Mexico\"] = \"mx\";\n Flag[\"MarshallIslands\"] = \"mh\";\n Flag[\"NorthMacedonia\"] = \"mk\";\n Flag[\"Mali\"] = \"ml\";\n Flag[\"Malta\"] = \"mt\";\n Flag[\"Myanmar\"] = \"mm\";\n Flag[\"Montenegro\"] = \"me\";\n Flag[\"Mongolia\"] = \"mn\";\n Flag[\"Mozambique\"] = \"mz\";\n Flag[\"Mauritania\"] = \"mr\";\n Flag[\"Mauritius\"] = \"mu\";\n Flag[\"Malawi\"] = \"mw\";\n Flag[\"Malaysia\"] = \"my\";\n Flag[\"Namibia\"] = \"na\";\n Flag[\"Niger\"] = \"ne\";\n Flag[\"Nigeria\"] = \"ng\";\n Flag[\"Nicaragua\"] = \"ni\";\n Flag[\"Netherlands\"] = \"nl\";\n Flag[\"Norway\"] = \"no\";\n Flag[\"Nepal\"] = \"np\";\n Flag[\"Nauru\"] = \"nr\";\n Flag[\"NewZealand\"] = \"nz\";\n Flag[\"Oman\"] = \"om\";\n Flag[\"Pakistan\"] = \"pk\";\n Flag[\"Panama\"] = \"pa\";\n Flag[\"Peru\"] = \"pe\";\n Flag[\"Philippines\"] = \"ph\";\n Flag[\"Palau\"] = \"pw\";\n Flag[\"PapuaNewGuinea\"] = \"pg\";\n Flag[\"Poland\"] = \"pl\";\n Flag[\"FrenchPolynesia\"] = \"pf\";\n Flag[\"NorthKorea\"] = \"kp\";\n Flag[\"Portugal\"] = \"pt\";\n Flag[\"Paraguay\"] = \"py\";\n Flag[\"Qatar\"] = \"qa\";\n Flag[\"Romania\"] = \"ro\";\n Flag[\"Russia\"] = \"ru\";\n Flag[\"Rwanda\"] = \"rw\";\n Flag[\"SaudiArabia\"] = \"sa\";\n Flag[\"Sudan\"] = \"sd\";\n Flag[\"Senegal\"] = \"sn\";\n Flag[\"Singapore\"] = \"sg\";\n Flag[\"SolomonIslands\"] = \"sb\";\n Flag[\"SierraLeone\"] = \"sl\";\n Flag[\"ElSalvador\"] = \"sv\";\n Flag[\"SanMarino\"] = \"sm\";\n Flag[\"Somalia\"] = \"so\";\n Flag[\"Serbia\"] = \"rs\";\n Flag[\"SouthSudan\"] = \"ss\";\n Flag[\"SaoTomeAndPrincipe\"] = \"st\";\n Flag[\"Suriname\"] = \"sr\";\n Flag[\"Slovakia\"] = \"sk\";\n Flag[\"Slovenia\"] = \"si\";\n Flag[\"Sweden\"] = \"se\";\n Flag[\"Eswatini\"] = \"sz\";\n Flag[\"Seychelles\"] = \"sc\";\n Flag[\"Syria\"] = \"sy\";\n Flag[\"Chad\"] = \"td\";\n Flag[\"Togo\"] = \"tg\";\n Flag[\"Thailand\"] = \"th\";\n Flag[\"Tajikistan\"] = \"tj\";\n Flag[\"Turkmenistan\"] = \"tm\";\n Flag[\"TimorLeste\"] = \"tl\";\n Flag[\"Tonga\"] = \"to\";\n Flag[\"TrinidadAndTobago\"] = \"tt\";\n Flag[\"Tunisia\"] = \"tn\";\n Flag[\"Turkey\"] = \"tr\";\n Flag[\"Tuvalu\"] = \"tv\";\n Flag[\"Tanzania\"] = \"tz\";\n Flag[\"Uganda\"] = \"ug\";\n Flag[\"Ukraine\"] = \"ua\";\n Flag[\"Uruguay\"] = \"uy\";\n Flag[\"UnitedStates\"] = \"us\";\n Flag[\"Uzbekistan\"] = \"uz\";\n Flag[\"VaticanCity\"] = \"va\";\n Flag[\"SaintVincentAndTheGrenadines\"] = \"vc\";\n Flag[\"Venezuela\"] = \"ve\";\n Flag[\"Vietnam\"] = \"vn\";\n Flag[\"Vanuatu\"] = \"vu\";\n Flag[\"Samoa\"] = \"ws\";\n Flag[\"Yemen\"] = \"ye\";\n Flag[\"SouthAfrica\"] = \"za\";\n Flag[\"Zambia\"] = \"zm\";\n Flag[\"Zimbabwe\"] = \"zw\";\n})(Flag || (Flag = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/flag.ts?");
116
-
117
- /***/ }),
118
-
119
- /***/ "./src/enums/image-format.ts":
120
- /*!***********************************!*\
121
- !*** ./src/enums/image-format.ts ***!
122
- \***********************************/
123
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
124
-
125
- "use strict";
126
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ImageFormat\": () => (/* binding */ ImageFormat)\n/* harmony export */ });\nvar ImageFormat;\n(function (ImageFormat) {\n ImageFormat[\"Jpg\"] = \"jpg\";\n ImageFormat[\"Jpeg\"] = \"jpeg\";\n ImageFormat[\"Gif\"] = \"gif\";\n ImageFormat[\"Png\"] = \"png\";\n ImageFormat[\"Webp\"] = \"webp\";\n})(ImageFormat || (ImageFormat = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/image-format.ts?");
127
-
128
- /***/ }),
129
-
130
- /***/ "./src/enums/image-gravity.ts":
131
- /*!************************************!*\
132
- !*** ./src/enums/image-gravity.ts ***!
133
- \************************************/
134
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
135
-
136
- "use strict";
137
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ImageGravity\": () => (/* binding */ ImageGravity)\n/* harmony export */ });\nvar ImageGravity;\n(function (ImageGravity) {\n ImageGravity[\"Center\"] = \"center\";\n ImageGravity[\"Topleft\"] = \"top-left\";\n ImageGravity[\"Top\"] = \"top\";\n ImageGravity[\"Topright\"] = \"top-right\";\n ImageGravity[\"Left\"] = \"left\";\n ImageGravity[\"Right\"] = \"right\";\n ImageGravity[\"Bottomleft\"] = \"bottom-left\";\n ImageGravity[\"Bottom\"] = \"bottom\";\n ImageGravity[\"Bottomright\"] = \"bottom-right\";\n})(ImageGravity || (ImageGravity = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/image-gravity.ts?");
138
-
139
- /***/ }),
140
-
141
- /***/ "./src/enums/o-auth-provider.ts":
142
- /*!**************************************!*\
143
- !*** ./src/enums/o-auth-provider.ts ***!
144
- \**************************************/
145
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
146
-
147
- "use strict";
148
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OAuthProvider\": () => (/* binding */ OAuthProvider)\n/* harmony export */ });\nvar OAuthProvider;\n(function (OAuthProvider) {\n OAuthProvider[\"Amazon\"] = \"amazon\";\n OAuthProvider[\"Apple\"] = \"apple\";\n OAuthProvider[\"Auth0\"] = \"auth0\";\n OAuthProvider[\"Authentik\"] = \"authentik\";\n OAuthProvider[\"Autodesk\"] = \"autodesk\";\n OAuthProvider[\"Bitbucket\"] = \"bitbucket\";\n OAuthProvider[\"Bitly\"] = \"bitly\";\n OAuthProvider[\"Box\"] = \"box\";\n OAuthProvider[\"Dailymotion\"] = \"dailymotion\";\n OAuthProvider[\"Discord\"] = \"discord\";\n OAuthProvider[\"Disqus\"] = \"disqus\";\n OAuthProvider[\"Dropbox\"] = \"dropbox\";\n OAuthProvider[\"Etsy\"] = \"etsy\";\n OAuthProvider[\"Facebook\"] = \"facebook\";\n OAuthProvider[\"Github\"] = \"github\";\n OAuthProvider[\"Gitlab\"] = \"gitlab\";\n OAuthProvider[\"Google\"] = \"google\";\n OAuthProvider[\"Linkedin\"] = \"linkedin\";\n OAuthProvider[\"Microsoft\"] = \"microsoft\";\n OAuthProvider[\"Notion\"] = \"notion\";\n OAuthProvider[\"Oidc\"] = \"oidc\";\n OAuthProvider[\"Okta\"] = \"okta\";\n OAuthProvider[\"Paypal\"] = \"paypal\";\n OAuthProvider[\"PaypalSandbox\"] = \"paypalSandbox\";\n OAuthProvider[\"Podio\"] = \"podio\";\n OAuthProvider[\"Salesforce\"] = \"salesforce\";\n OAuthProvider[\"Slack\"] = \"slack\";\n OAuthProvider[\"Spotify\"] = \"spotify\";\n OAuthProvider[\"Stripe\"] = \"stripe\";\n OAuthProvider[\"Tradeshift\"] = \"tradeshift\";\n OAuthProvider[\"TradeshiftBox\"] = \"tradeshiftBox\";\n OAuthProvider[\"Twitch\"] = \"twitch\";\n OAuthProvider[\"Wordpress\"] = \"wordpress\";\n OAuthProvider[\"Yahoo\"] = \"yahoo\";\n OAuthProvider[\"Yammer\"] = \"yammer\";\n OAuthProvider[\"Yandex\"] = \"yandex\";\n OAuthProvider[\"Zoho\"] = \"zoho\";\n OAuthProvider[\"Zoom\"] = \"zoom\";\n OAuthProvider[\"Mock\"] = \"mock\";\n})(OAuthProvider || (OAuthProvider = {}));\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/enums/o-auth-provider.ts?");
149
-
150
- /***/ }),
151
-
152
- /***/ "./src/id.ts":
153
- /*!*******************!*\
154
- !*** ./src/id.ts ***!
155
- \*******************/
156
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
157
-
158
- "use strict";
159
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ID\": () => (/* binding */ ID)\n/* harmony export */ });\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _a, _ID_hexTimestamp;\n/**\n * Helper class to generate ID strings for resources.\n */\nclass ID {\n /**\n * Uses the provided ID as the ID for the resource.\n *\n * @param {string} id\n * @returns {string}\n */\n static custom(id) {\n return id;\n }\n /**\n * Have Appconda generate a unique ID for you.\n *\n * @param {number} padding. Default is 7.\n * @returns {string}\n */\n static unique(padding = 7) {\n // Generate a unique ID with padding to have a longer ID\n const baseId = __classPrivateFieldGet(_a, _a, \"m\", _ID_hexTimestamp).call(_a);\n let randomPadding = '';\n for (let i = 0; i < padding; i++) {\n const randomHexDigit = Math.floor(Math.random() * 16).toString(16);\n randomPadding += randomHexDigit;\n }\n return baseId + randomPadding;\n }\n}\n_a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {\n const now = new Date();\n const sec = Math.floor(now.getTime() / 1000);\n const msec = now.getMilliseconds();\n // Convert to hexadecimal\n const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0');\n return hexTimestamp;\n};\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/id.ts?");
160
-
161
- /***/ }),
162
-
163
- /***/ "./src/index.ts":
164
- /*!**********************!*\
165
- !*** ./src/index.ts ***!
166
- \**********************/
167
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
168
-
169
- "use strict";
170
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Client\": () => (/* reexport safe */ _client__WEBPACK_IMPORTED_MODULE_0__.Client),\n/* harmony export */ \"Query\": () => (/* reexport safe */ _client__WEBPACK_IMPORTED_MODULE_0__.Query),\n/* harmony export */ \"AppcondaException\": () => (/* reexport safe */ _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException),\n/* harmony export */ \"Account\": () => (/* reexport safe */ _services_account__WEBPACK_IMPORTED_MODULE_1__.Account),\n/* harmony export */ \"Avatars\": () => (/* reexport safe */ _services_avatars__WEBPACK_IMPORTED_MODULE_2__.Avatars),\n/* harmony export */ \"Databases\": () => (/* reexport safe */ _services_databases__WEBPACK_IMPORTED_MODULE_3__.Databases),\n/* harmony export */ \"Functions\": () => (/* reexport safe */ _services_functions__WEBPACK_IMPORTED_MODULE_4__.Functions),\n/* harmony export */ \"Graphql\": () => (/* reexport safe */ _services_graphql__WEBPACK_IMPORTED_MODULE_5__.Graphql),\n/* harmony export */ \"Locale\": () => (/* reexport safe */ _services_locale__WEBPACK_IMPORTED_MODULE_6__.Locale),\n/* harmony export */ \"Messaging\": () => (/* reexport safe */ _services_messaging__WEBPACK_IMPORTED_MODULE_7__.Messaging),\n/* harmony export */ \"Storage\": () => (/* reexport safe */ _services_storage__WEBPACK_IMPORTED_MODULE_8__.Storage),\n/* harmony export */ \"Teams\": () => (/* reexport safe */ _services_teams__WEBPACK_IMPORTED_MODULE_9__.Teams),\n/* harmony export */ \"Permission\": () => (/* reexport safe */ _permission__WEBPACK_IMPORTED_MODULE_10__.Permission),\n/* harmony export */ \"Role\": () => (/* reexport safe */ _role__WEBPACK_IMPORTED_MODULE_11__.Role),\n/* harmony export */ \"ID\": () => (/* reexport safe */ _id__WEBPACK_IMPORTED_MODULE_12__.ID),\n/* harmony export */ \"AuthenticatorType\": () => (/* reexport safe */ _enums_authenticator_type__WEBPACK_IMPORTED_MODULE_13__.AuthenticatorType),\n/* harmony export */ \"AuthenticationFactor\": () => (/* reexport safe */ _enums_authentication_factor__WEBPACK_IMPORTED_MODULE_14__.AuthenticationFactor),\n/* harmony export */ \"OAuthProvider\": () => (/* reexport safe */ _enums_o_auth_provider__WEBPACK_IMPORTED_MODULE_15__.OAuthProvider),\n/* harmony export */ \"Browser\": () => (/* reexport safe */ _enums_browser__WEBPACK_IMPORTED_MODULE_16__.Browser),\n/* harmony export */ \"CreditCard\": () => (/* reexport safe */ _enums_credit_card__WEBPACK_IMPORTED_MODULE_17__.CreditCard),\n/* harmony export */ \"Flag\": () => (/* reexport safe */ _enums_flag__WEBPACK_IMPORTED_MODULE_18__.Flag),\n/* harmony export */ \"ExecutionMethod\": () => (/* reexport safe */ _enums_execution_method__WEBPACK_IMPORTED_MODULE_19__.ExecutionMethod),\n/* harmony export */ \"ImageGravity\": () => (/* reexport safe */ _enums_image_gravity__WEBPACK_IMPORTED_MODULE_20__.ImageGravity),\n/* harmony export */ \"ImageFormat\": () => (/* reexport safe */ _enums_image_format__WEBPACK_IMPORTED_MODULE_21__.ImageFormat)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./client */ \"./src/client.ts\");\n/* harmony import */ var _services_account__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/account */ \"./src/services/account.ts\");\n/* harmony import */ var _services_avatars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/avatars */ \"./src/services/avatars.ts\");\n/* harmony import */ var _services_databases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/databases */ \"./src/services/databases.ts\");\n/* harmony import */ var _services_functions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/functions */ \"./src/services/functions.ts\");\n/* harmony import */ var _services_graphql__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./services/graphql */ \"./src/services/graphql.ts\");\n/* harmony import */ var _services_locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/locale */ \"./src/services/locale.ts\");\n/* harmony import */ var _services_messaging__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./services/messaging */ \"./src/services/messaging.ts\");\n/* harmony import */ var _services_storage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./services/storage */ \"./src/services/storage.ts\");\n/* harmony import */ var _services_teams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./services/teams */ \"./src/services/teams.ts\");\n/* harmony import */ var _permission__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./permission */ \"./src/permission.ts\");\n/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./role */ \"./src/role.ts\");\n/* harmony import */ var _id__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./id */ \"./src/id.ts\");\n/* harmony import */ var _enums_authenticator_type__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./enums/authenticator-type */ \"./src/enums/authenticator-type.ts\");\n/* harmony import */ var _enums_authentication_factor__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./enums/authentication-factor */ \"./src/enums/authentication-factor.ts\");\n/* harmony import */ var _enums_o_auth_provider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./enums/o-auth-provider */ \"./src/enums/o-auth-provider.ts\");\n/* harmony import */ var _enums_browser__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./enums/browser */ \"./src/enums/browser.ts\");\n/* harmony import */ var _enums_credit_card__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./enums/credit-card */ \"./src/enums/credit-card.ts\");\n/* harmony import */ var _enums_flag__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./enums/flag */ \"./src/enums/flag.ts\");\n/* harmony import */ var _enums_execution_method__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./enums/execution-method */ \"./src/enums/execution-method.ts\");\n/* harmony import */ var _enums_image_gravity__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./enums/image-gravity */ \"./src/enums/image-gravity.ts\");\n/* harmony import */ var _enums_image_format__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./enums/image-format */ \"./src/enums/image-format.ts\");\n/**\n * Appconda Web SDK\n *\n * This SDK is compatible with Appconda server version 1.6.x.\n * For older versions, please check\n * [previous releases](https://github.com/appconda/sdk-for-web/releases).\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/index.ts?");
171
-
172
- /***/ }),
173
-
174
- /***/ "./src/permission.ts":
175
- /*!***************************!*\
176
- !*** ./src/permission.ts ***!
177
- \***************************/
178
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
179
-
180
- "use strict";
181
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Permission\": () => (/* binding */ Permission)\n/* harmony export */ });\n/**\n * Helper class to generate permission strings for resources.\n */\nclass Permission {\n}\n/**\n * Generate read permission string for the provided role.\n *\n * @param {string} role\n * @returns {string}\n */\nPermission.read = (role) => {\n return `read(\"${role}\")`;\n};\n/**\n * Generate write permission string for the provided role.\n *\n * This is an alias of update, delete, and possibly create.\n * Don't use write in combination with update, delete, or create.\n *\n * @param {string} role\n * @returns {string}\n */\nPermission.write = (role) => {\n return `write(\"${role}\")`;\n};\n/**\n * Generate create permission string for the provided role.\n *\n * @param {string} role\n * @returns {string}\n */\nPermission.create = (role) => {\n return `create(\"${role}\")`;\n};\n/**\n * Generate update permission string for the provided role.\n *\n * @param {string} role\n * @returns {string}\n */\nPermission.update = (role) => {\n return `update(\"${role}\")`;\n};\n/**\n * Generate delete permission string for the provided role.\n *\n * @param {string} role\n * @returns {string}\n */\nPermission.delete = (role) => {\n return `delete(\"${role}\")`;\n};\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/permission.ts?");
182
-
183
- /***/ }),
184
-
185
- /***/ "./src/query.ts":
186
- /*!**********************!*\
187
- !*** ./src/query.ts ***!
188
- \**********************/
189
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
190
-
191
- "use strict";
192
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Query\": () => (/* binding */ Query)\n/* harmony export */ });\n/**\n * Helper class to generate query strings.\n */\nclass Query {\n /**\n * Constructor for Query class.\n *\n * @param {string} method\n * @param {AttributesTypes} attribute\n * @param {QueryTypes} values\n */\n constructor(method, attribute, values) {\n this.method = method;\n this.attribute = attribute;\n if (values !== undefined) {\n if (Array.isArray(values)) {\n this.values = values;\n }\n else {\n this.values = [values];\n }\n }\n }\n /**\n * Convert the query object to a JSON string.\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify({\n method: this.method,\n attribute: this.attribute,\n values: this.values,\n });\n }\n}\n/**\n * Filter resources where attribute is equal to value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.equal = (attribute, value) => new Query(\"equal\", attribute, value).toString();\n/**\n * Filter resources where attribute is not equal to value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.notEqual = (attribute, value) => new Query(\"notEqual\", attribute, value).toString();\n/**\n * Filter resources where attribute is less than value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.lessThan = (attribute, value) => new Query(\"lessThan\", attribute, value).toString();\n/**\n * Filter resources where attribute is less than or equal to value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.lessThanEqual = (attribute, value) => new Query(\"lessThanEqual\", attribute, value).toString();\n/**\n * Filter resources where attribute is greater than value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.greaterThan = (attribute, value) => new Query(\"greaterThan\", attribute, value).toString();\n/**\n * Filter resources where attribute is greater than or equal to value.\n *\n * @param {string} attribute\n * @param {QueryTypes} value\n * @returns {string}\n */\nQuery.greaterThanEqual = (attribute, value) => new Query(\"greaterThanEqual\", attribute, value).toString();\n/**\n * Filter resources where attribute is null.\n *\n * @param {string} attribute\n * @returns {string}\n */\nQuery.isNull = (attribute) => new Query(\"isNull\", attribute).toString();\n/**\n * Filter resources where attribute is not null.\n *\n * @param {string} attribute\n * @returns {string}\n */\nQuery.isNotNull = (attribute) => new Query(\"isNotNull\", attribute).toString();\n/**\n * Filter resources where attribute is between start and end (inclusive).\n *\n * @param {string} attribute\n * @param {string | number} start\n * @param {string | number} end\n * @returns {string}\n */\nQuery.between = (attribute, start, end) => new Query(\"between\", attribute, [start, end]).toString();\n/**\n * Filter resources where attribute starts with value.\n *\n * @param {string} attribute\n * @param {string} value\n * @returns {string}\n */\nQuery.startsWith = (attribute, value) => new Query(\"startsWith\", attribute, value).toString();\n/**\n * Filter resources where attribute ends with value.\n *\n * @param {string} attribute\n * @param {string} value\n * @returns {string}\n */\nQuery.endsWith = (attribute, value) => new Query(\"endsWith\", attribute, value).toString();\n/**\n * Specify which attributes should be returned by the API call.\n *\n * @param {string[]} attributes\n * @returns {string}\n */\nQuery.select = (attributes) => new Query(\"select\", undefined, attributes).toString();\n/**\n * Filter resources by searching attribute for value.\n * A fulltext index on attribute is required for this query to work.\n *\n * @param {string} attribute\n * @param {string} value\n * @returns {string}\n */\nQuery.search = (attribute, value) => new Query(\"search\", attribute, value).toString();\n/**\n * Sort results by attribute descending.\n *\n * @param {string} attribute\n * @returns {string}\n */\nQuery.orderDesc = (attribute) => new Query(\"orderDesc\", attribute).toString();\n/**\n * Sort results by attribute ascending.\n *\n * @param {string} attribute\n * @returns {string}\n */\nQuery.orderAsc = (attribute) => new Query(\"orderAsc\", attribute).toString();\n/**\n * Return results after documentId.\n *\n * @param {string} documentId\n * @returns {string}\n */\nQuery.cursorAfter = (documentId) => new Query(\"cursorAfter\", undefined, documentId).toString();\n/**\n * Return results before documentId.\n *\n * @param {string} documentId\n * @returns {string}\n */\nQuery.cursorBefore = (documentId) => new Query(\"cursorBefore\", undefined, documentId).toString();\n/**\n * Return only limit results.\n *\n * @param {number} limit\n * @returns {string}\n */\nQuery.limit = (limit) => new Query(\"limit\", undefined, limit).toString();\n/**\n * Filter resources by skipping the first offset results.\n *\n * @param {number} offset\n * @returns {string}\n */\nQuery.offset = (offset) => new Query(\"offset\", undefined, offset).toString();\n/**\n * Filter resources where attribute contains the specified value.\n *\n * @param {string} attribute\n * @param {string | string[]} value\n * @returns {string}\n */\nQuery.contains = (attribute, value) => new Query(\"contains\", attribute, value).toString();\n/**\n * Combine multiple queries using logical OR operator.\n *\n * @param {string[]} queries\n * @returns {string}\n */\nQuery.or = (queries) => new Query(\"or\", undefined, queries.map((query) => JSON.parse(query))).toString();\n/**\n * Combine multiple queries using logical AND operator.\n *\n * @param {string[]} queries\n * @returns {string}\n */\nQuery.and = (queries) => new Query(\"and\", undefined, queries.map((query) => JSON.parse(query))).toString();\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/query.ts?");
193
-
194
- /***/ }),
195
-
196
- /***/ "./src/role.ts":
197
- /*!*********************!*\
198
- !*** ./src/role.ts ***!
199
- \*********************/
200
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
201
-
202
- "use strict";
203
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Role\": () => (/* binding */ Role)\n/* harmony export */ });\n/**\n * Helper class to generate role strings for `Permission`.\n */\nclass Role {\n /**\n * Grants access to anyone.\n *\n * This includes authenticated and unauthenticated users.\n *\n * @returns {string}\n */\n static any() {\n return 'any';\n }\n /**\n * Grants access to a specific user by user ID.\n *\n * You can optionally pass verified or unverified for\n * `status` to target specific types of users.\n *\n * @param {string} id\n * @param {string} status\n * @returns {string}\n */\n static user(id, status = '') {\n if (status === '') {\n return `user:${id}`;\n }\n return `user:${id}/${status}`;\n }\n /**\n * Grants access to any authenticated or anonymous user.\n *\n * You can optionally pass verified or unverified for\n * `status` to target specific types of users.\n *\n * @param {string} status\n * @returns {string}\n */\n static users(status = '') {\n if (status === '') {\n return 'users';\n }\n return `users/${status}`;\n }\n /**\n * Grants access to any guest user without a session.\n *\n * Authenticated users don't have access to this role.\n *\n * @returns {string}\n */\n static guests() {\n return 'guests';\n }\n /**\n * Grants access to a team by team ID.\n *\n * You can optionally pass a role for `role` to target\n * team members with the specified role.\n *\n * @param {string} id\n * @param {string} role\n * @returns {string}\n */\n static team(id, role = '') {\n if (role === '') {\n return `team:${id}`;\n }\n return `team:${id}/${role}`;\n }\n /**\n * Grants access to a specific member of a team.\n *\n * When the member is removed from the team, they will\n * no longer have access.\n *\n * @param {string} id\n * @returns {string}\n */\n static member(id) {\n return `member:${id}`;\n }\n /**\n * Grants access to a user with the specified label.\n *\n * @param {string} name\n * @returns {string}\n */\n static label(name) {\n return `label:${name}`;\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/role.ts?");
204
-
205
- /***/ }),
206
-
207
- /***/ "./src/service.ts":
208
- /*!************************!*\
209
- !*** ./src/service.ts ***!
210
- \************************/
211
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
212
-
213
- "use strict";
214
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Service\": () => (/* binding */ Service)\n/* harmony export */ });\nclass Service {\n constructor(client) {\n this.client = client;\n }\n static flatten(data, prefix = '') {\n let output = {};\n for (const [key, value] of Object.entries(data)) {\n let finalKey = prefix ? prefix + '[' + key + ']' : key;\n if (Array.isArray(value)) {\n output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));\n }\n else {\n output[finalKey] = value;\n }\n }\n return output;\n }\n}\n/**\n * The size for chunked uploads in bytes.\n */\nService.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/service.ts?");
215
-
216
- /***/ }),
217
-
218
- /***/ "./src/services/account.ts":
219
- /*!*********************************!*\
220
- !*** ./src/services/account.ts ***!
221
- \*********************************/
222
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
223
-
224
- "use strict";
225
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Account\": () => (/* binding */ Account)\n/* harmony export */ });\n/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../service */ \"./src/service.ts\");\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\nclass Account extends _service__WEBPACK_IMPORTED_MODULE_0__.Service {\n constructor(client) {\n super(client);\n }\n /**\n * Get account\n *\n * Get the currently logged in user.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n get() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create account\n *\n * Use this endpoint to allow a new user to register a new account in your\n * project. After the user registration completes successfully, you can use\n * the\n * [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification)\n * route to start verifying the user email address. To allow the new user to\n * login to their new account, you need to create a new [account\n * session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).\n *\n * @param {string} userId\n * @param {string} email\n * @param {string} password\n * @param {string} name\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n create(userId, email, password, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update email\n *\n * Update currently logged in user account email address. After changing user\n * address, the user confirmation status will get reset. A new confirmation\n * email is not sent automatically however you can use the send confirmation\n * email endpoint again to send the confirmation email. For security measures,\n * user password is required to complete this request.\n * This endpoint can also be used to convert an anonymous account to a normal\n * one, by passing an email address and a new password.\n *\n *\n * @param {string} email\n * @param {string} password\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateEmail(email, password) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/email';\n const payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * List Identities\n *\n * Get the list of identities for the currently logged in user.\n *\n * @param {string[]} queries\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n listIdentities(queries) {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/identities';\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete identity\n *\n * Delete an identity by its unique ID.\n *\n * @param {string} identityId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deleteIdentity(identityId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof identityId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"identityId\"');\n }\n const apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create JWT\n *\n * Use this endpoint to create a JSON Web Token. You can use the resulting JWT\n * to authenticate on behalf of the current user when working with the\n * Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes\n * from its creation and will be invalid if the user will logout in that time\n * frame.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createJWT() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/jwt';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * List logs\n *\n * Get the list of latest security activity logs for the currently logged in\n * user. Each log returns user IP address, location and date and time of log.\n *\n * @param {string[]} queries\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n listLogs(queries) {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/logs';\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update MFA\n *\n * Enable or disable MFA on an account.\n *\n * @param {boolean} mfa\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateMFA(mfa) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof mfa === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"mfa\"');\n }\n const apiPath = '/account/mfa';\n const payload = {};\n if (typeof mfa !== 'undefined') {\n payload['mfa'] = mfa;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Add Authenticator\n *\n * Add an authenticator app to be used as an MFA factor. Verify the\n * authenticator using the [verify\n * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)\n * method.\n *\n * @param {AuthenticatorType} type\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createMfaAuthenticator(type) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof type === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"type\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Verify Authenticator\n *\n * Verify an authenticator app after adding it using the [add\n * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)\n * method.\n *\n * @param {AuthenticatorType} type\n * @param {string} otp\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateMfaAuthenticator(type, otp) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof type === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"type\"');\n }\n if (typeof otp === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"otp\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\n const payload = {};\n if (typeof otp !== 'undefined') {\n payload['otp'] = otp;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete Authenticator\n *\n * Delete an authenticator for a user by ID.\n *\n * @param {AuthenticatorType} type\n * @param {string} otp\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deleteMfaAuthenticator(type, otp) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof type === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"type\"');\n }\n if (typeof otp === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"otp\"');\n }\n const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);\n const payload = {};\n if (typeof otp !== 'undefined') {\n payload['otp'] = otp;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create 2FA Challenge\n *\n * Begin the process of MFA verification after sign-in. Finish the flow with\n * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)\n * method.\n *\n * @param {AuthenticationFactor} factor\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createMfaChallenge(factor) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof factor === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"factor\"');\n }\n const apiPath = '/account/mfa/challenge';\n const payload = {};\n if (typeof factor !== 'undefined') {\n payload['factor'] = factor;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create MFA Challenge (confirmation)\n *\n * Complete the MFA challenge by providing the one-time password. Finish the\n * process of MFA verification by providing the one-time password. To begin\n * the flow, use\n * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)\n * method.\n *\n * @param {string} challengeId\n * @param {string} otp\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateMfaChallenge(challengeId, otp) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof challengeId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"challengeId\"');\n }\n if (typeof otp === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"otp\"');\n }\n const apiPath = '/account/mfa/challenge';\n const payload = {};\n if (typeof challengeId !== 'undefined') {\n payload['challengeId'] = challengeId;\n }\n if (typeof otp !== 'undefined') {\n payload['otp'] = otp;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * List Factors\n *\n * List the factors available on the account to be used as a MFA challange.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n listMfaFactors() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/mfa/factors';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Get MFA Recovery Codes\n *\n * Get recovery codes that can be used as backup for MFA flow. Before getting\n * codes, they must be generated using\n * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)\n * method. An OTP challenge is required to read recovery codes.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n getMfaRecoveryCodes() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/mfa/recovery-codes';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create MFA Recovery Codes\n *\n * Generate recovery codes as backup for MFA flow. It's recommended to\n * generate and show then immediately after user successfully adds their\n * authehticator. Recovery codes can be used as a MFA verification type in\n * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)\n * method.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createMfaRecoveryCodes() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/mfa/recovery-codes';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Regenerate MFA Recovery Codes\n *\n * Regenerate recovery codes that can be used as backup for MFA flow. Before\n * regenerating codes, they must be first generated using\n * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)\n * method. An OTP challenge is required to regenreate recovery codes.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateMfaRecoveryCodes() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/mfa/recovery-codes';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update name\n *\n * Update currently logged in user account name.\n *\n * @param {string} name\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateName(name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof name === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"name\"');\n }\n const apiPath = '/account/name';\n const payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update password\n *\n * Update currently logged in user password. For validation, user is required\n * to pass in the new password, and the old password. For users created with\n * OAuth, Team Invites and Magic URL, oldPassword is optional.\n *\n * @param {string} password\n * @param {string} oldPassword\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePassword(password, oldPassword) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/password';\n const payload = {};\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n if (typeof oldPassword !== 'undefined') {\n payload['oldPassword'] = oldPassword;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update phone\n *\n * Update the currently logged in user's phone number. After updating the\n * phone number, the phone verification status will be reset. A confirmation\n * SMS is not sent automatically, however you can use the [POST\n * /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)\n * endpoint to send a confirmation SMS.\n *\n * @param {string} phone\n * @param {string} password\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePhone(phone, password) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof phone === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"phone\"');\n }\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/phone';\n const payload = {};\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Get account preferences\n *\n * Get the preferences as a key-value object for the currently logged in user.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n getPrefs() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/prefs';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update preferences\n *\n * Update currently logged in user account preferences. The object you pass is\n * stored as is, and replaces any previous value. The maximum allowed prefs\n * size is 64kB and throws error if exceeded.\n *\n * @param {Partial<Preferences>} prefs\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePrefs(prefs) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof prefs === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"prefs\"');\n }\n const apiPath = '/account/prefs';\n const payload = {};\n if (typeof prefs !== 'undefined') {\n payload['prefs'] = prefs;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create password recovery\n *\n * Sends the user an email with a temporary secret key for password reset.\n * When the user clicks the confirmation link he is redirected back to your\n * app password reset URL with the secret key and email address values\n * attached to the URL query string. Use the query string params to submit a\n * request to the [PUT\n * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery)\n * endpoint to complete the process. The verification link sent to the user's\n * email address is valid for 1 hour.\n *\n * @param {string} email\n * @param {string} url\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createRecovery(email, url) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n if (typeof url === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"url\"');\n }\n const apiPath = '/account/recovery';\n const payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create password recovery (confirmation)\n *\n * Use this endpoint to complete the user account password reset. Both the\n * **userId** and **secret** arguments will be passed as query parameters to\n * the redirect URL you have provided when sending your request to the [POST\n * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery)\n * endpoint.\n *\n * Please note that in order to avoid a [Redirect\n * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)\n * the only valid redirect URLs are the ones from domains you have set when\n * adding your platforms in the console interface.\n *\n * @param {string} userId\n * @param {string} secret\n * @param {string} password\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateRecovery(userId, secret, password) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/recovery';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * List sessions\n *\n * Get the list of active sessions across different devices for the currently\n * logged in user.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n listSessions() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/sessions';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete sessions\n *\n * Delete all sessions from the user account and remove any sessions cookies\n * from the end client.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deleteSessions() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/sessions';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create anonymous session\n *\n * Use this endpoint to allow a new user to register an anonymous account in\n * your project. This route will also create a new session for the user. To\n * allow the new user to convert an anonymous account to a normal account, you\n * need to update its [email and\n * password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail)\n * or create an [OAuth2\n * session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createAnonymousSession() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/sessions/anonymous';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create email password session\n *\n * Allow the user to login into their account by providing a valid email and\n * password combination. This route will create a new session for the user.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n * @param {string} email\n * @param {string} password\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createEmailPasswordSession(email, password) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n if (typeof password === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"password\"');\n }\n const apiPath = '/account/sessions/email';\n const payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof password !== 'undefined') {\n payload['password'] = password;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update magic URL session\n *\n * Use this endpoint to create a session from token. Provide the **userId**\n * and **secret** parameters from the successful response of authentication\n * flows initiated by token creation. For example, magic URL and phone login.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateMagicURLSession(userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/sessions/magic-url';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create OAuth2 session\n *\n * Allow the user to login to their account using the OAuth2 provider of their\n * choice. Each OAuth2 provider should be enabled from the Appwrite console\n * first. Use the success and failure arguments to provide a redirect URL's\n * back to your app when login is completed.\n *\n * If there is already an active session, the new session will be attached to\n * the logged-in account. If there are no active sessions, the server will\n * attempt to look for a user with the same email address as the email\n * received from the OAuth2 provider and attach the new session to the\n * existing user. If no matching user is found - the server will create a new\n * user.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n *\n * @param {OAuthProvider} provider\n * @param {string} success\n * @param {string} failure\n * @param {string[]} scopes\n * @throws {AppcondaException}\n * @returns {void|string}\n */\n createOAuth2Session(provider, success, failure, scopes) {\n if (typeof provider === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"provider\"');\n }\n const apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', provider);\n const payload = {};\n if (typeof success !== 'undefined') {\n payload['success'] = success;\n }\n if (typeof failure !== 'undefined') {\n payload['failure'] = failure;\n }\n if (typeof scopes !== 'undefined') {\n payload['scopes'] = scopes;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {\n window.location.href = uri.toString();\n }\n else {\n return uri;\n }\n }\n /**\n * Update phone session\n *\n * Use this endpoint to create a session from token. Provide the **userId**\n * and **secret** parameters from the successful response of authentication\n * flows initiated by token creation. For example, magic URL and phone login.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePhoneSession(userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/sessions/phone';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create session\n *\n * Use this endpoint to create a session from token. Provide the **userId**\n * and **secret** parameters from the successful response of authentication\n * flows initiated by token creation. For example, magic URL and phone login.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createSession(userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/sessions/token';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Get session\n *\n * Use this endpoint to get a logged in user's session using a Session ID.\n * Inputting 'current' will return the current session being used.\n *\n * @param {string} sessionId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n getSession(sessionId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof sessionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"sessionId\"');\n }\n const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update session\n *\n * Use this endpoint to extend a session's length. Extending a session is\n * useful when session expiry is short. If the session was created using an\n * OAuth provider, this endpoint refreshes the access token from the provider.\n *\n * @param {string} sessionId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateSession(sessionId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof sessionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"sessionId\"');\n }\n const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete session\n *\n * Logout the user. Use 'current' as the session ID to logout on this device,\n * use a session ID to logout on another device. If you're looking to logout\n * the user on all devices, use [Delete\n * Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions)\n * instead.\n *\n * @param {string} sessionId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deleteSession(sessionId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof sessionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"sessionId\"');\n }\n const apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update status\n *\n * Block the currently logged in user account. Behind the scene, the user\n * record is not deleted but permanently blocked from any access. To\n * completely delete a user, use the Users API instead.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateStatus() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/status';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('patch', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create push target\n *\n *\n * @param {string} targetId\n * @param {string} identifier\n * @param {string} providerId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createPushTarget(targetId, identifier, providerId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof targetId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"targetId\"');\n }\n if (typeof identifier === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"identifier\"');\n }\n const apiPath = '/account/targets/push';\n const payload = {};\n if (typeof targetId !== 'undefined') {\n payload['targetId'] = targetId;\n }\n if (typeof identifier !== 'undefined') {\n payload['identifier'] = identifier;\n }\n if (typeof providerId !== 'undefined') {\n payload['providerId'] = providerId;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update push target\n *\n *\n * @param {string} targetId\n * @param {string} identifier\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePushTarget(targetId, identifier) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof targetId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"targetId\"');\n }\n if (typeof identifier === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"identifier\"');\n }\n const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);\n const payload = {};\n if (typeof identifier !== 'undefined') {\n payload['identifier'] = identifier;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete push target\n *\n *\n * @param {string} targetId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deletePushTarget(targetId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof targetId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"targetId\"');\n }\n const apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create email token (OTP)\n *\n * Sends the user an email with a secret key for creating a session. If the\n * provided user ID has not be registered, a new user will be created. Use the\n * returned user ID and secret and submit a request to the [POST\n * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)\n * endpoint to complete the login process. The secret sent to the user's email\n * is valid for 15 minutes.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n * @param {string} userId\n * @param {string} email\n * @param {boolean} phrase\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createEmailToken(userId, email, phrase) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n const apiPath = '/account/tokens/email';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof phrase !== 'undefined') {\n payload['phrase'] = phrase;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create magic URL token\n *\n * Sends the user an email with a secret key for creating a session. If the\n * provided user ID has not been registered, a new user will be created. When\n * the user clicks the link in the email, the user is redirected back to the\n * URL you provided with the secret key and userId values attached to the URL\n * query string. Use the query string parameters to submit a request to the\n * [POST\n * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)\n * endpoint to complete the login process. The link sent to the user's email\n * address is valid for 1 hour. If you are on a mobile device you can leave\n * the URL parameter empty, so that the login completion will be handled by\n * your Appwrite instance by default.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n *\n * @param {string} userId\n * @param {string} email\n * @param {string} url\n * @param {boolean} phrase\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createMagicURLToken(userId, email, url, phrase) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof email === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"email\"');\n }\n const apiPath = '/account/tokens/magic-url';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof phrase !== 'undefined') {\n payload['phrase'] = phrase;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create OAuth2 token\n *\n * Allow the user to login to their account using the OAuth2 provider of their\n * choice. Each OAuth2 provider should be enabled from the Appwrite console\n * first. Use the success and failure arguments to provide a redirect URL's\n * back to your app when login is completed.\n *\n * If authentication succeeds, `userId` and `secret` of a token will be\n * appended to the success URL as query parameters. These can be used to\n * create a new session using the [Create\n * session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)\n * endpoint.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n * @param {OAuthProvider} provider\n * @param {string} success\n * @param {string} failure\n * @param {string[]} scopes\n * @throws {AppcondaException}\n * @returns {void|string}\n */\n createOAuth2Token(provider, success, failure, scopes) {\n if (typeof provider === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"provider\"');\n }\n const apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);\n const payload = {};\n if (typeof success !== 'undefined') {\n payload['success'] = success;\n }\n if (typeof failure !== 'undefined') {\n payload['failure'] = failure;\n }\n if (typeof scopes !== 'undefined') {\n payload['scopes'] = scopes;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {\n window.location.href = uri.toString();\n }\n else {\n return uri;\n }\n }\n /**\n * Create phone token\n *\n * Sends the user an SMS with a secret key for creating a session. If the\n * provided user ID has not be registered, a new user will be created. Use the\n * returned user ID and secret and submit a request to the [POST\n * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)\n * endpoint to complete the login process. The secret sent to the user's phone\n * is valid for 15 minutes.\n *\n * A user is limited to 10 active sessions at a time by default. [Learn more\n * about session\n * limits](https://appwrite.io/docs/authentication-security#limits).\n *\n * @param {string} userId\n * @param {string} phone\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createPhoneToken(userId, phone) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof phone === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"phone\"');\n }\n const apiPath = '/account/tokens/phone';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create email verification\n *\n * Use this endpoint to send a verification message to your user email address\n * to confirm they are the valid owners of that address. Both the **userId**\n * and **secret** arguments will be passed as query parameters to the URL you\n * have provided to be attached to the verification email. The provided URL\n * should redirect the user back to your app and allow you to complete the\n * verification process by verifying both the **userId** and **secret**\n * parameters. Learn more about how to [complete the verification\n * process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).\n * The verification link sent to the user's email address is valid for 7 days.\n *\n * Please note that in order to avoid a [Redirect\n * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),\n * the only valid redirect URLs are the ones from domains you have set when\n * adding your platforms in the console interface.\n *\n *\n * @param {string} url\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createVerification(url) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof url === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"url\"');\n }\n const apiPath = '/account/verification';\n const payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create email verification (confirmation)\n *\n * Use this endpoint to complete the user email verification process. Use both\n * the **userId** and **secret** parameters that were attached to your app URL\n * to verify the user email ownership. If confirmed this route will return a\n * 200 status code.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateVerification(userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/verification';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create phone verification\n *\n * Use this endpoint to send a verification SMS to the currently logged in\n * user. This endpoint is meant for use after updating a user's phone number\n * using the\n * [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone)\n * endpoint. Learn more about how to [complete the verification\n * process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification).\n * The verification code sent to the user's phone number is valid for 15\n * minutes.\n *\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createPhoneVerification() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/account/verification/phone';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('post', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create phone verification (confirmation)\n *\n * Use this endpoint to complete the user phone verification process. Use the\n * **userId** and **secret** that were sent to your user's phone number to\n * verify the user email ownership. If confirmed this route will return a 200\n * status code.\n *\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updatePhoneVerification(userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/account/verification/phone';\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n}\n;\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/account.ts?");
226
-
227
- /***/ }),
228
-
229
- /***/ "./src/services/avatars.ts":
230
- /*!*********************************!*\
231
- !*** ./src/services/avatars.ts ***!
232
- \*********************************/
233
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
234
-
235
- "use strict";
236
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Avatars\": () => (/* binding */ Avatars)\n/* harmony export */ });\n/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../service */ \"./src/service.ts\");\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\n\n\nclass Avatars extends _service__WEBPACK_IMPORTED_MODULE_0__.Service {\n constructor(client) {\n super(client);\n }\n /**\n * Get browser icon\n *\n * You can use this endpoint to show different browser icons to your users.\n * The code argument receives the browser code as it appears in your user [GET\n * /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions)\n * endpoint. Use width, height and quality arguments to change the output\n * settings.\n *\n * When one dimension is specified and the other is 0, the image is scaled\n * with preserved aspect ratio. If both dimensions are 0, the API provides an\n * image at source quality. If dimensions are not specified, the default size\n * of image returned is 100x100px.\n *\n * @param {Browser} code\n * @param {number} width\n * @param {number} height\n * @param {number} quality\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getBrowser(code, width, height, quality) {\n if (typeof code === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"code\"');\n }\n const apiPath = '/avatars/browsers/{code}'.replace('{code}', code);\n const payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get credit card icon\n *\n * The credit card endpoint will return you the icon of the credit card\n * provider you need. Use width, height and quality arguments to change the\n * output settings.\n *\n * When one dimension is specified and the other is 0, the image is scaled\n * with preserved aspect ratio. If both dimensions are 0, the API provides an\n * image at source quality. If dimensions are not specified, the default size\n * of image returned is 100x100px.\n *\n *\n * @param {CreditCard} code\n * @param {number} width\n * @param {number} height\n * @param {number} quality\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getCreditCard(code, width, height, quality) {\n if (typeof code === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"code\"');\n }\n const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);\n const payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get favicon\n *\n * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote\n * website URL.\n *\n *\n * @param {string} url\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getFavicon(url) {\n if (typeof url === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"url\"');\n }\n const apiPath = '/avatars/favicon';\n const payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get country flag\n *\n * You can use this endpoint to show different country flags icons to your\n * users. The code argument receives the 2 letter country code. Use width,\n * height and quality arguments to change the output settings. Country codes\n * follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n *\n * When one dimension is specified and the other is 0, the image is scaled\n * with preserved aspect ratio. If both dimensions are 0, the API provides an\n * image at source quality. If dimensions are not specified, the default size\n * of image returned is 100x100px.\n *\n *\n * @param {Flag} code\n * @param {number} width\n * @param {number} height\n * @param {number} quality\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getFlag(code, width, height, quality) {\n if (typeof code === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"code\"');\n }\n const apiPath = '/avatars/flags/{code}'.replace('{code}', code);\n const payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get image from URL\n *\n * Use this endpoint to fetch a remote image URL and crop it to any image size\n * you want. This endpoint is very useful if you need to crop and display\n * remote images in your app or in case you want to make sure a 3rd party\n * image is properly served using a TLS protocol.\n *\n * When one dimension is specified and the other is 0, the image is scaled\n * with preserved aspect ratio. If both dimensions are 0, the API provides an\n * image at source quality. If dimensions are not specified, the default size\n * of image returned is 400x400px.\n *\n *\n * @param {string} url\n * @param {number} width\n * @param {number} height\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getImage(url, width, height) {\n if (typeof url === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"url\"');\n }\n const apiPath = '/avatars/image';\n const payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get user initials\n *\n * Use this endpoint to show your user initials avatar icon on your website or\n * app. By default, this route will try to print your logged-in user name or\n * email initials. You can also overwrite the user name if you pass the 'name'\n * parameter. If no name is given and no user is logged, an empty avatar will\n * be returned.\n *\n * You can use the color and background params to change the avatar colors. By\n * default, a random theme will be selected. The random theme will persist for\n * the user's initials when reloading the same theme will always return for\n * the same initials.\n *\n * When one dimension is specified and the other is 0, the image is scaled\n * with preserved aspect ratio. If both dimensions are 0, the API provides an\n * image at source quality. If dimensions are not specified, the default size\n * of image returned is 100x100px.\n *\n *\n * @param {string} name\n * @param {number} width\n * @param {number} height\n * @param {string} background\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getInitials(name, width, height, background) {\n const apiPath = '/avatars/initials';\n const payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get QR code\n *\n * Converts a given plain text to a QR code image. You can use the query\n * parameters to change the size and style of the resulting image.\n *\n *\n * @param {string} text\n * @param {number} size\n * @param {number} margin\n * @param {boolean} download\n * @throws {AppwriteException}\n * @returns {URL}\n */\n getQR(text, size, margin, download) {\n if (typeof text === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"text\"');\n }\n const apiPath = '/avatars/qr';\n const payload = {};\n if (typeof text !== 'undefined') {\n payload['text'] = text;\n }\n if (typeof size !== 'undefined') {\n payload['size'] = size;\n }\n if (typeof margin !== 'undefined') {\n payload['margin'] = margin;\n }\n if (typeof download !== 'undefined') {\n payload['download'] = download;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n}\n;\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/avatars.ts?");
237
-
238
- /***/ }),
239
-
240
- /***/ "./src/services/databases.ts":
241
- /*!***********************************!*\
242
- !*** ./src/services/databases.ts ***!
243
- \***********************************/
244
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
245
-
246
- "use strict";
247
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Databases\": () => (/* binding */ Databases)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nclass Databases {\n constructor(client) {\n this.client = client;\n }\n /**\n * List documents\n *\n * Get a list of all the user&#039;s documents in a given collection. You can use the query params to filter your results.\n *\n * @param {string} databaseId\n * @param {string} collectionId\n * @param {string[]} queries\n * @throws {AppcondaException}\n * @returns {Promise<Models.DocumentList<Document>>}\n */\n listDocuments(databaseId, collectionId, queries) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof databaseId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"databaseId\"');\n }\n if (typeof collectionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"collectionId\"');\n }\n const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Create document\n *\n * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appconda.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.\n *\n * @param {string} databaseId\n * @param {string} collectionId\n * @param {string} documentId\n * @param {Omit<Document, keyof Models.Document>} data\n * @param {string[]} permissions\n * @throws {AppcondaException}\n * @returns {Promise<Document>}\n */\n createDocument(databaseId, collectionId, documentId, data, permissions) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof databaseId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"databaseId\"');\n }\n if (typeof collectionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"collectionId\"');\n }\n if (typeof documentId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"documentId\"');\n }\n if (typeof data === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"data\"');\n }\n const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);\n const payload = {};\n if (typeof documentId !== 'undefined') {\n payload['documentId'] = documentId;\n }\n if (typeof data !== 'undefined') {\n payload['data'] = data;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * Get document\n *\n * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.\n *\n * @param {string} databaseId\n * @param {string} collectionId\n * @param {string} documentId\n * @param {string[]} queries\n * @throws {AppcondaException}\n * @returns {Promise<Document>}\n */\n getDocument(databaseId, collectionId, documentId, queries) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof databaseId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"databaseId\"');\n }\n if (typeof collectionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"collectionId\"');\n }\n if (typeof documentId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"documentId\"');\n }\n const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Update document\n *\n * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n *\n * @param {string} databaseId\n * @param {string} collectionId\n * @param {string} documentId\n * @param {Partial<Omit<Document, keyof Models.Document>>} data\n * @param {string[]} permissions\n * @throws {AppcondaException}\n * @returns {Promise<Document>}\n */\n updateDocument(databaseId, collectionId, documentId, data, permissions) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof databaseId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"databaseId\"');\n }\n if (typeof collectionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"collectionId\"');\n }\n if (typeof documentId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"documentId\"');\n }\n const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);\n const payload = {};\n if (typeof data !== 'undefined') {\n payload['data'] = data;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('patch', uri, apiHeaders, payload);\n });\n }\n /**\n * Delete document\n *\n * Delete a document by its unique ID.\n *\n * @param {string} databaseId\n * @param {string} collectionId\n * @param {string} documentId\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n deleteDocument(databaseId, collectionId, documentId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof databaseId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"databaseId\"');\n }\n if (typeof collectionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"collectionId\"');\n }\n if (typeof documentId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"documentId\"');\n }\n const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('delete', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/databases.ts?");
248
-
249
- /***/ }),
250
-
251
- /***/ "./src/services/functions.ts":
252
- /*!***********************************!*\
253
- !*** ./src/services/functions.ts ***!
254
- \***********************************/
255
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
256
-
257
- "use strict";
258
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Functions\": () => (/* binding */ Functions)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nclass Functions {\n constructor(client) {\n this.client = client;\n }\n /**\n * List executions\n *\n * Get a list of all the current user function execution logs. You can use the query params to filter your results.\n *\n * @param {string} functionId\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppcondaException}\n * @returns {Promise<Models.ExecutionList>}\n */\n listExecutions(functionId, queries, search) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof functionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"functionId\"');\n }\n const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Create execution\n *\n * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.\n *\n * @param {string} functionId\n * @param {string} body\n * @param {boolean} async\n * @param {string} xpath\n * @param {ExecutionMethod} method\n * @param {object} headers\n * @param {string} scheduledAt\n * @throws {AppcondaException}\n * @returns {Promise<Models.Execution>}\n */\n createExecution(functionId, body, async, xpath, method, headers, scheduledAt) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof functionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"functionId\"');\n }\n const apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);\n const payload = {};\n if (typeof body !== 'undefined') {\n payload['body'] = body;\n }\n if (typeof async !== 'undefined') {\n payload['async'] = async;\n }\n if (typeof xpath !== 'undefined') {\n payload['path'] = xpath;\n }\n if (typeof method !== 'undefined') {\n payload['method'] = method;\n }\n if (typeof headers !== 'undefined') {\n payload['headers'] = headers;\n }\n if (typeof scheduledAt !== 'undefined') {\n payload['scheduledAt'] = scheduledAt;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * Get execution\n *\n * Get a function execution log by its unique ID.\n *\n * @param {string} functionId\n * @param {string} executionId\n * @throws {AppcondaException}\n * @returns {Promise<Models.Execution>}\n */\n getExecution(functionId, executionId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof functionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"functionId\"');\n }\n if (typeof executionId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"executionId\"');\n }\n const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/functions.ts?");
259
-
260
- /***/ }),
261
-
262
- /***/ "./src/services/graphql.ts":
263
- /*!*********************************!*\
264
- !*** ./src/services/graphql.ts ***!
265
- \*********************************/
266
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
267
-
268
- "use strict";
269
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Graphql\": () => (/* binding */ Graphql)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nclass Graphql {\n constructor(client) {\n this.client = client;\n }\n /**\n * GraphQL endpoint\n *\n * Execute a GraphQL mutation.\n *\n * @param {object} query\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n query(query) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof query === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"query\"');\n }\n const apiPath = '/graphql';\n const payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * GraphQL endpoint\n *\n * Execute a GraphQL mutation.\n *\n * @param {object} query\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n mutation(query) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof query === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"query\"');\n }\n const apiPath = '/graphql/mutation';\n const payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/graphql.ts?");
270
-
271
- /***/ }),
272
-
273
- /***/ "./src/services/locale.ts":
274
- /*!********************************!*\
275
- !*** ./src/services/locale.ts ***!
276
- \********************************/
277
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
278
-
279
- "use strict";
280
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Locale\": () => (/* binding */ Locale)\n/* harmony export */ });\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nclass Locale {\n constructor(client) {\n this.client = client;\n }\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.Locale>}\n */\n get() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List Locale Codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n listCodes() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/codes';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.ContinentList>}\n */\n listContinents() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/continents';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.CountryList>}\n */\n listCountries() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/countries';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.CountryList>}\n */\n listCountriesEU() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/countries/eu';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.PhoneList>}\n */\n listCountriesPhones() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/countries/phones';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.CurrencyList>}\n */\n listCurrencies() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/currencies';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppcondaException}\n * @returns {Promise<Models.LanguageList>}\n */\n listLanguages() {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/locale/languages';\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/locale.ts?");
281
-
282
- /***/ }),
283
-
284
- /***/ "./src/services/messaging.ts":
285
- /*!***********************************!*\
286
- !*** ./src/services/messaging.ts ***!
287
- \***********************************/
288
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
289
-
290
- "use strict";
291
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Messaging\": () => (/* binding */ Messaging)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nclass Messaging {\n constructor(client) {\n this.client = client;\n }\n /**\n * Create subscriber\n *\n * Create a new subscriber.\n *\n * @param {string} topicId\n * @param {string} subscriberId\n * @param {string} targetId\n * @throws {AppcondaException}\n * @returns {Promise<Models.Subscriber>}\n */\n createSubscriber(topicId, subscriberId, targetId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof topicId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"topicId\"');\n }\n if (typeof subscriberId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"subscriberId\"');\n }\n if (typeof targetId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"targetId\"');\n }\n const apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);\n const payload = {};\n if (typeof subscriberId !== 'undefined') {\n payload['subscriberId'] = subscriberId;\n }\n if (typeof targetId !== 'undefined') {\n payload['targetId'] = targetId;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * Delete subscriber\n *\n * Delete a subscriber by its unique ID.\n *\n * @param {string} topicId\n * @param {string} subscriberId\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n deleteSubscriber(topicId, subscriberId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof topicId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"topicId\"');\n }\n if (typeof subscriberId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"subscriberId\"');\n }\n const apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('delete', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/messaging.ts?");
292
-
293
- /***/ }),
294
-
295
- /***/ "./src/services/storage.ts":
296
- /*!*********************************!*\
297
- !*** ./src/services/storage.ts ***!
298
- \*********************************/
299
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
300
-
301
- "use strict";
302
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Storage\": () => (/* binding */ Storage)\n/* harmony export */ });\n/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../service */ \"./src/service.ts\");\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\nclass Storage extends _service__WEBPACK_IMPORTED_MODULE_0__.Service {\n constructor(client) {\n super(client);\n }\n /**\n * List files\n *\n * Get a list of all the user files. You can use the query params to filter\n * your results.\n *\n * @param {string} bucketId\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n listFiles(bucketId, queries, search) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Create file\n *\n * Create a new file. Before using this route, you should create a new bucket\n * resource using either a [server\n * integration](https://appwrite.io/docs/server/storage#storageCreateBucket)\n * API or directly from your Appwrite console.\n *\n * Larger files should be uploaded using multiple requests with the\n * [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)\n * header to send a partial request with a maximum supported chunk of `5MB`.\n * The `content-range` header values should always be in bytes.\n *\n * When the first request is sent, the server will return the **File** object,\n * and the subsequent part request must include the file's **id** in\n * `x-appwrite-id` header to allow the server to know that the partial upload\n * is for the existing file and not for a new one.\n *\n * If you're creating a new file using one of the Appwrite SDKs, all the\n * chunking logic will be managed by the SDK internally.\n *\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @param {File} file\n * @param {string[]} permissions\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n createFile(bucketId_1, fileId_1, file_1, permissions_1) {\n return __awaiter(this, arguments, void 0, function* (bucketId, fileId, file, permissions, onProgress = (progress) => { }) {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"file\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n if (!(file instanceof File)) {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Parameter \"file\" has to be a File.');\n }\n const size = file.size;\n if (size <= _service__WEBPACK_IMPORTED_MODULE_0__.Service.CHUNK_SIZE) {\n return yield this.client.call('post', uri, {\n 'content-type': 'multipart/form-data',\n }, payload);\n }\n const apiHeaders = {\n 'content-type': 'multipart/form-data',\n };\n let offset = 0;\n let response = undefined;\n if (fileId != 'unique()') {\n try {\n response = yield this.client.call('GET', new URL(this.client.config.endpoint + apiPath + '/' + fileId), apiHeaders);\n offset = response.chunksUploaded * _service__WEBPACK_IMPORTED_MODULE_0__.Service.CHUNK_SIZE;\n }\n catch (e) {\n }\n }\n while (offset < size) {\n let end = Math.min(offset + _service__WEBPACK_IMPORTED_MODULE_0__.Service.CHUNK_SIZE - 1, size - 1);\n apiHeaders['content-range'] = 'bytes ' + offset + '-' + end + '/' + size;\n if (response && response.$id) {\n apiHeaders['x-appwrite-id'] = response.$id;\n }\n const chunk = file.slice(offset, end + 1);\n payload['file'] = new File([chunk], file.name);\n response = yield this.client.call('post', uri, apiHeaders, payload);\n if (onProgress) {\n onProgress({\n $id: response.$id,\n progress: (offset / size) * 100,\n sizeUploaded: offset,\n chunksTotal: response.chunksTotal,\n chunksUploaded: response.chunksUploaded\n });\n }\n offset += _service__WEBPACK_IMPORTED_MODULE_0__.Service.CHUNK_SIZE;\n }\n return response;\n });\n }\n /**\n * Get file\n *\n * Get a file by its unique ID. This endpoint response returns a JSON object\n * with the file metadata.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n getFile(bucketId, fileId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('get', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Update file\n *\n * Update a file by its unique ID. Only users with write permissions have\n * access to update this resource.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @param {string} name\n * @param {string[]} permissions\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n updateFile(bucketId, fileId, name, permissions) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('put', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Delete File\n *\n * Delete a file by its unique ID. Only users with write permissions have\n * access to delete this resource.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @throws {AppcondaException}\n * @returns {Promise}\n */\n deleteFile(bucketId, fileId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n return yield this.client.call('delete', uri, {\n 'content-type': 'application/json',\n }, payload);\n });\n }\n /**\n * Get file for download\n *\n * Get a file content by its unique ID. The endpoint response return with a\n * 'Content-Disposition: attachment' header that tells the browser to start\n * downloading the file to user downloads directory.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @throws {AppcondaException}\n * @returns {URL}\n */\n getFileDownload(bucketId, fileId) {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get file preview\n *\n * Get a file preview image. Currently, this method supports preview for image\n * files (jpg, png, and gif), other supported formats, like pdf, docs, slides,\n * and spreadsheets, will return the file icon image. You can also pass query\n * string arguments for cutting and resizing your preview image. Preview is\n * supported only for image files smaller than 10MB.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @param {number} width\n * @param {number} height\n * @param {ImageGravity} gravity\n * @param {number} quality\n * @param {number} borderWidth\n * @param {string} borderColor\n * @param {number} borderRadius\n * @param {number} opacity\n * @param {number} rotation\n * @param {string} background\n * @param {ImageFormat} output\n * @throws {AppcondaException}\n * @returns {URL}\n */\n getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output) {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n /**\n * Get file for view\n *\n * Get a file content by its unique ID. This endpoint is similar to the\n * download method but returns with no 'Content-Disposition: attachment'\n * header.\n *\n * @param {string} bucketId\n * @param {string} fileId\n * @throws {AppcondaException}\n * @returns {URL}\n */\n getFileView(bucketId, fileId) {\n if (typeof bucketId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_1__.AppcondaException('Missing required parameter: \"fileId\"');\n }\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n payload['project'] = this.client.config.project;\n for (const [key, value] of Object.entries(_service__WEBPACK_IMPORTED_MODULE_0__.Service.flatten(payload))) {\n uri.searchParams.append(key, value);\n }\n return uri;\n }\n}\n;\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/storage.ts?");
303
-
304
- /***/ }),
305
-
306
- /***/ "./src/services/teams.ts":
307
- /*!*******************************!*\
308
- !*** ./src/services/teams.ts ***!
309
- \*******************************/
310
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
311
-
312
- "use strict";
313
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Teams\": () => (/* binding */ Teams)\n/* harmony export */ });\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ \"./src/client.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nclass Teams {\n constructor(client) {\n this.client = client;\n }\n /**\n * List teams\n *\n * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\n *\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppcondaException}\n * @returns {Promise<Models.TeamList<Preferences>>}\n */\n list(queries, search) {\n return __awaiter(this, void 0, void 0, function* () {\n const apiPath = '/teams';\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Create team\n *\n * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.\n *\n * @param {string} teamId\n * @param {string} name\n * @param {string[]} roles\n * @throws {AppcondaException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n create(teamId, name, roles) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"name\"');\n }\n const apiPath = '/teams';\n const payload = {};\n if (typeof teamId !== 'undefined') {\n payload['teamId'] = teamId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * Get team\n *\n * Get a team by its ID. All team members have read access for this resource.\n *\n * @param {string} teamId\n * @throws {AppcondaException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n get(teamId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Update name\n *\n * Update the team&#039;s name by its unique ID.\n *\n * @param {string} teamId\n * @param {string} name\n * @throws {AppcondaException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n updateName(teamId, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"name\"');\n }\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('put', uri, apiHeaders, payload);\n });\n }\n /**\n * Delete team\n *\n * Delete a team using its ID. Only team members with the owner role can delete the team.\n *\n * @param {string} teamId\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n delete(teamId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('delete', uri, apiHeaders, payload);\n });\n }\n /**\n * List team memberships\n *\n * Use this endpoint to list a team&#039;s members using the team&#039;s ID. All team members have read access to this endpoint.\n *\n * @param {string} teamId\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppcondaException}\n * @returns {Promise<Models.MembershipList>}\n */\n listMemberships(teamId, queries, search) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Create team membership\n *\n * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appconda will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appconda will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appconda.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.\n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appconda will accept the only redirect URLs under the domains you have added as a platform on the Appconda Console.\n\n *\n * @param {string} teamId\n * @param {string[]} roles\n * @param {string} email\n * @param {string} userId\n * @param {string} phone\n * @param {string} url\n * @param {string} name\n * @throws {AppcondaException}\n * @returns {Promise<Models.Membership>}\n */\n createMembership(teamId, roles, email, userId, phone, url, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof roles === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"roles\"');\n }\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('post', uri, apiHeaders, payload);\n });\n }\n /**\n * Get team membership\n *\n * Get a team member by the membership unique id. All team members have read access for this resource.\n *\n * @param {string} teamId\n * @param {string} membershipId\n * @throws {AppcondaException}\n * @returns {Promise<Models.Membership>}\n */\n getMembership(teamId, membershipId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"membershipId\"');\n }\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Update membership\n *\n * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appconda.io/docs/permissions).\n\n *\n * @param {string} teamId\n * @param {string} membershipId\n * @param {string[]} roles\n * @throws {AppcondaException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembership(teamId, membershipId, roles) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"membershipId\"');\n }\n if (typeof roles === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"roles\"');\n }\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload = {};\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('patch', uri, apiHeaders, payload);\n });\n }\n /**\n * Delete team membership\n *\n * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.\n *\n * @param {string} teamId\n * @param {string} membershipId\n * @throws {AppcondaException}\n * @returns {Promise<{}>}\n */\n deleteMembership(teamId, membershipId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"membershipId\"');\n }\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('delete', uri, apiHeaders, payload);\n });\n }\n /**\n * Update team membership status\n *\n * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n\n *\n * @param {string} teamId\n * @param {string} membershipId\n * @param {string} userId\n * @param {string} secret\n * @throws {AppcondaException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembershipStatus(teamId, membershipId, userId, secret) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"membershipId\"');\n }\n if (typeof userId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"secret\"');\n }\n const apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('patch', uri, apiHeaders, payload);\n });\n }\n /**\n * Get team preferences\n *\n * Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;t need to be shared by all team members, prefer storing them in [user preferences](https://appconda.io/docs/references/cloud/client-web/account#getPrefs).\n *\n * @param {string} teamId\n * @throws {AppcondaException}\n * @returns {Promise<Preferences>}\n */\n getPrefs(teamId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('get', uri, apiHeaders, payload);\n });\n }\n /**\n * Update preferences\n *\n * Update the team&#039;s preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.\n *\n * @param {string} teamId\n * @param {object} prefs\n * @throws {AppcondaException}\n * @returns {Promise<Preferences>}\n */\n updatePrefs(teamId, prefs) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof teamId === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"teamId\"');\n }\n if (typeof prefs === 'undefined') {\n throw new _client__WEBPACK_IMPORTED_MODULE_0__.AppcondaException('Missing required parameter: \"prefs\"');\n }\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload = {};\n if (typeof prefs !== 'undefined') {\n payload['prefs'] = prefs;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n const apiHeaders = {\n 'content-type': 'application/json',\n };\n return yield this.client.call('put', uri, apiHeaders, payload);\n });\n }\n}\n\n\n//# sourceURL=webpack://@appconda/sdk/./src/services/teams.ts?");
314
-
315
- /***/ })
316
-
317
- /******/ });
318
- /************************************************************************/
319
- /******/ // The module cache
320
- /******/ var __webpack_module_cache__ = {};
321
- /******/
322
- /******/ // The require function
323
- /******/ function __webpack_require__(moduleId) {
324
- /******/ // Check if module is in cache
325
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
326
- /******/ if (cachedModule !== undefined) {
327
- /******/ return cachedModule.exports;
328
- /******/ }
329
- /******/ // Create a new module (and put it into the cache)
330
- /******/ var module = __webpack_module_cache__[moduleId] = {
331
- /******/ // no module.id needed
332
- /******/ // no module.loaded needed
333
- /******/ exports: {}
334
- /******/ };
335
- /******/
336
- /******/ // Execute the module function
337
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
338
- /******/
339
- /******/ // Return the exports of the module
340
- /******/ return module.exports;
341
- /******/ }
342
- /******/
343
- /************************************************************************/
344
- /******/ /* webpack/runtime/compat get default export */
345
- /******/ (() => {
346
- /******/ // getDefaultExport function for compatibility with non-harmony modules
347
- /******/ __webpack_require__.n = (module) => {
348
- /******/ var getter = module && module.__esModule ?
349
- /******/ () => (module['default']) :
350
- /******/ () => (module);
351
- /******/ __webpack_require__.d(getter, { a: getter });
352
- /******/ return getter;
353
- /******/ };
354
- /******/ })();
355
- /******/
356
- /******/ /* webpack/runtime/define property getters */
357
- /******/ (() => {
358
- /******/ // define getter functions for harmony exports
359
- /******/ __webpack_require__.d = (exports, definition) => {
360
- /******/ for(var key in definition) {
361
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
362
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
363
- /******/ }
364
- /******/ }
365
- /******/ };
366
- /******/ })();
367
- /******/
368
- /******/ /* webpack/runtime/global */
369
- /******/ (() => {
370
- /******/ __webpack_require__.g = (function() {
371
- /******/ if (typeof globalThis === 'object') return globalThis;
372
- /******/ try {
373
- /******/ return this || new Function('return this')();
374
- /******/ } catch (e) {
375
- /******/ if (typeof window === 'object') return window;
376
- /******/ }
377
- /******/ })();
378
- /******/ })();
379
- /******/
380
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
381
- /******/ (() => {
382
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
383
- /******/ })();
384
- /******/
385
- /******/ /* webpack/runtime/make namespace object */
386
- /******/ (() => {
387
- /******/ // define __esModule on exports
388
- /******/ __webpack_require__.r = (exports) => {
389
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
390
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
391
- /******/ }
392
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
393
- /******/ };
394
- /******/ })();
395
- /******/
396
- /************************************************************************/
397
- /******/
398
- /******/ // startup
399
- /******/ // Load entry module and return exports
400
- /******/ // This entry module can't be inlined because the eval devtool is used.
401
- /******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
402
- /******/
403
- /******/ return __webpack_exports__;
404
- /******/ })()
405
- ;
406
- });
407
- // console.log('forms-core module loaded.');