diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index 1be340b5ec..a539e26f03 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -18,6 +18,9 @@ "servers": [ { "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/.cloud.appwrite.io\/v1" } ], "paths": { @@ -43,6 +46,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -91,6 +95,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -175,6 +180,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -250,6 +256,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -308,6 +315,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -370,6 +378,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -418,6 +427,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -483,6 +493,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -552,6 +563,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -597,7 +609,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "tags": [ "account" @@ -617,6 +629,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -694,6 +707,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -761,6 +775,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -814,7 +829,7 @@ } }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "tags": [ "account" @@ -834,6 +849,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -909,6 +925,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -939,7 +956,7 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", "tags": [ "account" @@ -959,6 +976,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1007,6 +1025,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1035,7 +1054,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "tags": [ "account" @@ -1055,6 +1074,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1105,6 +1125,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1174,6 +1195,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1248,6 +1270,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1323,6 +1346,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1371,6 +1395,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1440,6 +1465,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1496,7 +1522,7 @@ } }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "tags": [ "account" @@ -1516,6 +1542,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1597,6 +1624,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1638,6 +1666,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1688,6 +1717,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1736,6 +1766,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1809,6 +1840,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -1875,6 +1907,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", + "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", @@ -1902,7 +1935,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -1922,6 +1955,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2015,6 +2049,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -2088,6 +2123,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2161,6 +2197,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2221,6 +2258,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2274,6 +2312,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2336,6 +2375,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2386,6 +2426,7 @@ }, "x-appwrite": { "method": "createPushTarget", + "group": "pushTargets", "weight": 55, "cookies": false, "type": "", @@ -2464,6 +2505,7 @@ }, "x-appwrite": { "method": "updatePushTarget", + "group": "pushTargets", "weight": 56, "cookies": false, "type": "", @@ -2534,6 +2576,7 @@ }, "x-appwrite": { "method": "deletePushTarget", + "group": "pushTargets", "weight": 57, "cookies": false, "type": "", @@ -2594,6 +2637,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2672,6 +2716,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2751,6 +2796,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2778,7 +2824,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -2798,6 +2844,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2891,6 +2938,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -2967,6 +3015,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -3014,7 +3063,7 @@ } }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "tags": [ "account" @@ -3034,6 +3083,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -3109,6 +3159,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -3160,6 +3211,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -3228,6 +3280,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3353,6 +3406,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3484,6 +3538,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3541,6 +3596,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -4028,6 +4084,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -4109,6 +4166,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -4200,6 +4258,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4298,6 +4357,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -4382,6 +4442,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -4488,6 +4549,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -4582,6 +4644,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -4680,6 +4743,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -4763,7 +4827,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -4837,7 +4902,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -4951,7 +5017,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5091,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -5075,7 +5143,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -5126,6 +5195,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -5177,6 +5247,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -5228,6 +5299,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -5279,6 +5351,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -5330,6 +5403,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -5381,6 +5455,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -5432,6 +5507,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -5483,6 +5559,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -5534,7 +5611,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5616,7 +5694,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5690,7 +5769,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -5775,7 +5855,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -5872,7 +5953,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +6025,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6031,7 +6114,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6097,7 +6181,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6163,7 +6248,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6379,7 +6465,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6452,7 +6539,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6527,7 +6615,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6611,7 +6700,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6672,7 +6762,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6745,7 +6836,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6808,7 +6900,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -6893,7 +6986,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7003,7 +7097,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7074,7 +7169,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7160,7 +7256,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7233,7 +7330,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7330,7 +7428,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7390,7 +7489,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7471,7 +7571,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -7552,7 +7653,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -7650,7 +7752,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -7711,7 +7814,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -7790,7 +7894,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -7853,7 +7958,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 6c999d047a..4b9334cd68 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -18,6 +18,9 @@ "servers": [ { "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/.cloud.appwrite.io\/v1" } ], "paths": { @@ -43,6 +46,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -90,6 +94,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -165,6 +170,7 @@ }, "x-appwrite": { "method": "delete", + "group": "account", "weight": 11, "cookies": false, "type": "", @@ -212,6 +218,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -286,6 +293,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -343,6 +351,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -404,6 +413,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -452,6 +462,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -516,6 +527,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -584,6 +596,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -628,7 +641,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "tags": [ "account" @@ -648,6 +661,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -724,6 +738,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -790,6 +805,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -843,7 +859,7 @@ } }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "tags": [ "account" @@ -863,6 +879,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -937,6 +954,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -966,7 +984,7 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", "tags": [ "account" @@ -986,6 +1004,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1033,6 +1052,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1060,7 +1080,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "tags": [ "account" @@ -1080,6 +1100,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1129,6 +1150,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1197,6 +1219,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1270,6 +1293,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1344,6 +1368,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1391,6 +1416,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1459,6 +1485,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1514,7 +1541,7 @@ } }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "tags": [ "account" @@ -1534,6 +1561,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1614,6 +1642,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1654,6 +1683,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1703,6 +1733,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1751,6 +1782,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1824,6 +1856,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -1890,6 +1923,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", + "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", @@ -1917,7 +1951,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -1937,6 +1971,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2030,6 +2065,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -2103,6 +2139,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2176,6 +2213,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2235,6 +2273,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2287,6 +2326,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2348,6 +2388,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2397,6 +2438,7 @@ }, "x-appwrite": { "method": "createPushTarget", + "group": "pushTargets", "weight": 55, "cookies": false, "type": "", @@ -2474,6 +2516,7 @@ }, "x-appwrite": { "method": "updatePushTarget", + "group": "pushTargets", "weight": 56, "cookies": false, "type": "", @@ -2543,6 +2586,7 @@ }, "x-appwrite": { "method": "deletePushTarget", + "group": "pushTargets", "weight": 57, "cookies": false, "type": "", @@ -2602,6 +2646,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2680,6 +2725,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2759,6 +2805,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2786,7 +2833,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -2806,6 +2853,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2899,6 +2947,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -2975,6 +3024,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -3021,7 +3071,7 @@ } }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "tags": [ "account" @@ -3041,6 +3091,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -3115,6 +3166,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -3165,6 +3217,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -3232,6 +3285,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3357,6 +3411,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3488,6 +3543,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3545,6 +3601,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -4032,6 +4089,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -4113,6 +4171,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -4204,6 +4263,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4282,7 +4342,7 @@ }, "\/console\/assistant": { "post": { - "summary": "Ask query", + "summary": "Create assistant query", "operationId": "assistantChat", "tags": [ "assistant" @@ -4295,7 +4355,8 @@ }, "x-appwrite": { "method": "chat", - "weight": 305, + "group": "console", + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -4354,7 +4415,8 @@ }, "x-appwrite": { "method": "getResource", - "weight": 424, + "group": null, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -4428,7 +4490,8 @@ }, "x-appwrite": { "method": "variables", - "weight": 304, + "group": "console", + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -4475,6 +4538,7 @@ }, "x-appwrite": { "method": "list", + "group": "databases", "weight": 71, "cookies": false, "type": "", @@ -4547,6 +4611,7 @@ }, "x-appwrite": { "method": "create", + "group": "databases", "weight": 70, "cookies": false, "type": "", @@ -4625,6 +4690,7 @@ }, "x-appwrite": { "method": "getUsage", + "group": null, "weight": 115, "cookies": false, "type": "", @@ -4696,6 +4762,7 @@ }, "x-appwrite": { "method": "get", + "group": "databases", "weight": 72, "cookies": false, "type": "", @@ -4754,6 +4821,7 @@ }, "x-appwrite": { "method": "update", + "group": "databases", "weight": 74, "cookies": false, "type": "", @@ -4829,6 +4897,7 @@ }, "x-appwrite": { "method": "delete", + "group": "databases", "weight": 75, "cookies": false, "type": "", @@ -4889,6 +4958,7 @@ }, "x-appwrite": { "method": "listCollections", + "group": "collections", "weight": 77, "cookies": false, "type": "", @@ -4971,6 +5041,7 @@ }, "x-appwrite": { "method": "createCollection", + "group": "collections", "weight": 76, "cookies": false, "type": "", @@ -5074,6 +5145,7 @@ }, "x-appwrite": { "method": "getCollection", + "group": "collections", "weight": 78, "cookies": false, "type": "", @@ -5142,6 +5214,7 @@ }, "x-appwrite": { "method": "updateCollection", + "group": "collections", "weight": 80, "cookies": false, "type": "", @@ -5240,6 +5313,7 @@ }, "x-appwrite": { "method": "deleteCollection", + "group": "collections", "weight": 81, "cookies": false, "type": "", @@ -5310,6 +5384,7 @@ }, "x-appwrite": { "method": "listAttributes", + "group": "attributes", "weight": 92, "cookies": false, "type": "", @@ -5393,6 +5468,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", + "group": "attributes", "weight": 89, "cookies": false, "type": "", @@ -5498,6 +5574,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", + "group": "attributes", "weight": 101, "cookies": false, "type": "", @@ -5608,6 +5685,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", + "group": "attributes", "weight": 90, "cookies": false, "type": "", @@ -5713,6 +5791,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", + "group": "attributes", "weight": 102, "cookies": false, "type": "", @@ -5823,6 +5902,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", + "group": "attributes", "weight": 83, "cookies": false, "type": "", @@ -5928,6 +6008,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", + "group": "attributes", "weight": 95, "cookies": false, "type": "", @@ -6038,6 +6119,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", + "group": "attributes", "weight": 84, "cookies": false, "type": "", @@ -6152,6 +6234,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", + "group": "attributes", "weight": 96, "cookies": false, "type": "", @@ -6271,6 +6354,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", + "group": "attributes", "weight": 88, "cookies": false, "type": "", @@ -6386,6 +6470,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", + "group": "attributes", "weight": 100, "cookies": false, "type": "", @@ -6506,6 +6591,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", + "group": "attributes", "weight": 87, "cookies": false, "type": "", @@ -6621,6 +6707,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", + "group": "attributes", "weight": 99, "cookies": false, "type": "", @@ -6741,6 +6828,7 @@ }, "x-appwrite": { "method": "createIpAttribute", + "group": "attributes", "weight": 85, "cookies": false, "type": "", @@ -6846,6 +6934,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", + "group": "attributes", "weight": 97, "cookies": false, "type": "", @@ -6956,6 +7045,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", + "group": "attributes", "weight": 91, "cookies": false, "type": "", @@ -7086,6 +7176,7 @@ }, "x-appwrite": { "method": "createStringAttribute", + "group": "attributes", "weight": 82, "cookies": false, "type": "", @@ -7202,6 +7293,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", + "group": "attributes", "weight": 94, "cookies": false, "type": "", @@ -7317,6 +7409,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", + "group": "attributes", "weight": 86, "cookies": false, "type": "", @@ -7422,6 +7515,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", + "group": "attributes", "weight": 98, "cookies": false, "type": "", @@ -7563,6 +7657,7 @@ }, "x-appwrite": { "method": "getAttribute", + "group": "attributes", "weight": 93, "cookies": false, "type": "", @@ -7633,6 +7728,7 @@ }, "x-appwrite": { "method": "deleteAttribute", + "group": "attributes", "weight": 104, "cookies": false, "type": "", @@ -7712,6 +7808,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", + "group": "attributes", "weight": 103, "cookies": false, "type": "", @@ -7819,6 +7916,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -7903,6 +8001,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -8009,6 +8108,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -8103,6 +8203,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -8201,6 +8302,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -8284,6 +8386,7 @@ }, "x-appwrite": { "method": "listDocumentLogs", + "group": "logs", "weight": 112, "cookies": false, "type": "", @@ -8376,6 +8479,7 @@ }, "x-appwrite": { "method": "listIndexes", + "group": "indexes", "weight": 106, "cookies": false, "type": "", @@ -8457,6 +8561,7 @@ }, "x-appwrite": { "method": "createIndex", + "group": "collections", "weight": 105, "cookies": false, "type": "", @@ -8576,6 +8681,7 @@ }, "x-appwrite": { "method": "getIndex", + "group": "indexes", "weight": 107, "cookies": false, "type": "", @@ -8646,6 +8752,7 @@ }, "x-appwrite": { "method": "deleteIndex", + "group": "indexes", "weight": 108, "cookies": false, "type": "", @@ -8725,6 +8832,7 @@ }, "x-appwrite": { "method": "listCollectionLogs", + "group": "collections", "weight": 79, "cookies": false, "type": "", @@ -8807,6 +8915,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", + "group": null, "weight": 117, "cookies": false, "type": "", @@ -8898,6 +9007,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 73, "cookies": false, "type": "", @@ -8970,6 +9080,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", + "group": null, "weight": 116, "cookies": false, "type": "", @@ -9051,7 +9162,8 @@ }, "x-appwrite": { "method": "list", - "weight": 368, + "group": "functions", + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9123,7 +9235,8 @@ }, "x-appwrite": { "method": "create", - "weight": 365, + "group": "functions", + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9353,7 +9466,8 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 370, + "group": "runtimes", + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9401,7 +9515,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 371, + "group": "runtimes", + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9450,7 +9565,8 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 394, + "group": "templates", + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -9549,7 +9665,8 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 393, + "group": "templates", + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -9608,7 +9725,8 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 387, + "group": null, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -9679,7 +9797,8 @@ }, "x-appwrite": { "method": "get", - "weight": 366, + "group": "functions", + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9737,7 +9856,8 @@ }, "x-appwrite": { "method": "update", - "weight": 367, + "group": "functions", + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9964,7 +10084,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 369, + "group": "functions", + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10024,7 +10145,8 @@ }, "x-appwrite": { "method": "updateFunctionDeployment", - "weight": 374, + "group": "functions", + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -10103,7 +10225,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 375, + "group": "deployments", + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10185,7 +10308,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 372, + "group": "deployments", + "weight": 376, "cookies": false, "type": "upload", "deprecated": false, @@ -10280,7 +10404,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 380, + "group": "deployments", + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10364,7 +10489,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 377, + "group": "deployments", + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10466,7 +10592,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 378, + "group": "deployments", + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10562,7 +10689,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 373, + "group": "deployments", + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10623,7 +10751,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 376, + "group": "deployments", + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10673,7 +10802,7 @@ }, "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "functionsGetDeploymentDownload", "tags": [ "functions" @@ -10686,7 +10815,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 379, + "group": "deployments", + "weight": 383, "cookies": false, "type": "location", "deprecated": false, @@ -10775,7 +10905,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 381, + "group": "deployments", + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10845,7 +10976,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10919,7 +11051,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11033,7 +11166,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11097,7 +11231,8 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 385, + "group": "executions", + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11167,7 +11302,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 386, + "group": null, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11248,7 +11384,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 390, + "group": "variables", + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11306,7 +11443,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 388, + "group": "variables", + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11396,7 +11534,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 389, + "group": "variables", + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11464,7 +11603,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 391, + "group": "variables", + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11554,7 +11694,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 392, + "group": "variables", + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11624,7 +11765,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -11675,7 +11817,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -11726,6 +11869,7 @@ }, "x-appwrite": { "method": "get", + "group": "health", "weight": 126, "cookies": false, "type": "", @@ -11774,7 +11918,8 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "group": "health", + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11822,6 +11967,7 @@ }, "x-appwrite": { "method": "getCache", + "group": "health", "weight": 129, "cookies": false, "type": "", @@ -11870,6 +12016,7 @@ }, "x-appwrite": { "method": "getCertificate", + "group": "health", "weight": 134, "cookies": false, "type": "", @@ -11929,6 +12076,7 @@ }, "x-appwrite": { "method": "getDB", + "group": "health", "weight": 128, "cookies": false, "type": "", @@ -11977,6 +12125,7 @@ }, "x-appwrite": { "method": "getPubSub", + "group": "health", "weight": 130, "cookies": false, "type": "", @@ -12025,6 +12174,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", + "group": "queue", "weight": 136, "cookies": false, "type": "", @@ -12086,6 +12236,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", + "group": "queue", "weight": 135, "cookies": false, "type": "", @@ -12147,6 +12298,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", + "group": "queue", "weight": 137, "cookies": false, "type": "", @@ -12219,6 +12371,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", + "group": "queue", "weight": 138, "cookies": false, "type": "", @@ -12280,7 +12433,8 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "group": "queue", + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12320,7 +12474,6 @@ "v1-functions", "v1-stats-resources", "v1-stats-usage", - "v1-stats-usage-dump", "v1-webhooks", "v1-certificates", "v1-builds", @@ -12368,6 +12521,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", + "group": "queue", "weight": 142, "cookies": false, "type": "", @@ -12429,6 +12583,7 @@ }, "x-appwrite": { "method": "getQueueLogs", + "group": "queue", "weight": 133, "cookies": false, "type": "", @@ -12490,6 +12645,7 @@ }, "x-appwrite": { "method": "getQueueMails", + "group": "queue", "weight": 139, "cookies": false, "type": "", @@ -12551,6 +12707,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", + "group": "queue", "weight": 140, "cookies": false, "type": "", @@ -12612,6 +12769,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", + "group": "queue", "weight": 141, "cookies": false, "type": "", @@ -12673,6 +12831,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", + "group": "queue", "weight": 143, "cookies": false, "type": "", @@ -12734,6 +12893,7 @@ }, "x-appwrite": { "method": "getQueueUsage", + "group": "queue", "weight": 144, "cookies": false, "type": "", @@ -12773,67 +12933,6 @@ ] } }, - "\/health\/queue\/stats-usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueStatsUsageDump", - "tags": [ - "health" - ], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "x-appwrite": { - "method": "getQueueStatsUsageDump", - "weight": 145, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health\/get-queue-stats-usage-dump.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, "\/health\/queue\/webhooks": { "get": { "summary": "Get webhooks queue", @@ -12856,6 +12955,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", + "group": "queue", "weight": 132, "cookies": false, "type": "", @@ -12917,7 +13017,8 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "group": "storage", + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12965,7 +13066,8 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "group": "storage", + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13013,6 +13115,7 @@ }, "x-appwrite": { "method": "getTime", + "group": "health", "weight": 131, "cookies": false, "type": "", @@ -13061,6 +13164,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -13112,6 +13216,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -13163,6 +13268,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -13214,6 +13320,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -13265,6 +13372,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -13316,6 +13424,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -13367,6 +13476,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -13418,6 +13528,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -13469,7 +13580,8 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 357, + "group": "messages", + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -13544,7 +13656,8 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 354, + "group": "messages", + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -13687,7 +13800,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 361, + "group": "messages", + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -13832,7 +13946,8 @@ }, "x-appwrite": { "method": "createPush", - "weight": 356, + "group": "messages", + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14005,7 +14120,8 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 363, + "group": "messages", + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14182,7 +14298,8 @@ }, "x-appwrite": { "method": "createSms", - "weight": 355, + "group": "messages", + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14290,7 +14407,8 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 362, + "group": "messages", + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14401,7 +14519,8 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 360, + "group": "messages", + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14453,7 +14572,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 364, + "group": "messages", + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14514,7 +14634,8 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 358, + "group": "logs", + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14588,7 +14709,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 359, + "group": "messages", + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14662,7 +14784,8 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 329, + "group": "providers", + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -14737,7 +14860,8 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 328, + "group": "providers", + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -14841,7 +14965,8 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 341, + "group": "providers", + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -14948,7 +15073,8 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 327, + "group": "providers", + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15032,7 +15158,8 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 340, + "group": "providers", + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15119,7 +15246,8 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 319, + "group": "providers", + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -15233,7 +15361,8 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 332, + "group": "providers", + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15350,7 +15479,8 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 322, + "group": "providers", + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -15444,7 +15574,8 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 335, + "group": "providers", + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -15541,7 +15672,8 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 320, + "group": "providers", + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -15645,7 +15777,8 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 333, + "group": "providers", + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15752,7 +15885,8 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 321, + "group": "providers", + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -15894,7 +16028,8 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 334, + "group": "providers", + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16038,7 +16173,8 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 323, + "group": "providers", + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -16132,7 +16268,8 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 336, + "group": "providers", + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -16229,7 +16366,8 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 324, + "group": "providers", + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16323,7 +16461,8 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 337, + "group": "providers", + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16420,7 +16559,8 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 325, + "group": "providers", + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16514,7 +16654,8 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 338, + "group": "providers", + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -16611,7 +16752,8 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 326, + "group": "providers", + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -16705,7 +16847,8 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 339, + "group": "providers", + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16802,7 +16945,8 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 331, + "group": "providers", + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -16854,7 +16998,8 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 342, + "group": "providers", + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -16915,7 +17060,8 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 330, + "group": "providers", + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16989,7 +17135,8 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 351, + "group": "subscribers", + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17063,7 +17210,8 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 344, + "group": "topics", + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -17136,7 +17284,8 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 343, + "group": "topics", + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17218,7 +17367,8 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 346, + "group": "topics", + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17277,7 +17427,8 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 347, + "group": "topics", + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17353,7 +17504,8 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 348, + "group": "topics", + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17414,7 +17566,8 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 345, + "group": "topics", + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -17488,7 +17641,8 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 350, + "group": "subscribers", + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -17571,7 +17725,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -17660,7 +17815,8 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 352, + "group": "subscribers", + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17722,7 +17878,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17796,7 +17953,8 @@ }, "x-appwrite": { "method": "list", - "weight": 311, + "group": null, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -17849,7 +18007,7 @@ }, "\/migrations\/appwrite": { "post": { - "summary": "Migrate Appwrite data", + "summary": "Create Appwrite migration", "operationId": "migrationsCreateAppwriteMigration", "tags": [ "migrations" @@ -17869,7 +18027,8 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 306, + "group": null, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17936,7 +18095,7 @@ }, "\/migrations\/appwrite\/report": { "get": { - "summary": "Generate a report on Appwrite data", + "summary": "Get Appwrite migration report", "operationId": "migrationsGetAppwriteReport", "tags": [ "migrations" @@ -17956,7 +18115,8 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 313, + "group": null, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18048,7 +18208,8 @@ }, "x-appwrite": { "method": "createCsvMigration", - "weight": 310, + "group": null, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18106,7 +18267,7 @@ }, "\/migrations\/firebase": { "post": { - "summary": "Migrate Firebase data", + "summary": "Create Firebase migration", "operationId": "migrationsCreateFirebaseMigration", "tags": [ "migrations" @@ -18126,7 +18287,8 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 307, + "group": null, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18181,7 +18343,7 @@ }, "\/migrations\/firebase\/report": { "get": { - "summary": "Generate a report on Firebase data", + "summary": "Get Firebase migration report", "operationId": "migrationsGetFirebaseReport", "tags": [ "migrations" @@ -18201,7 +18363,8 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 314, + "group": null, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18252,7 +18415,7 @@ }, "\/migrations\/nhost": { "post": { - "summary": "Migrate NHost data", + "summary": "Create NHost migration", "operationId": "migrationsCreateNHostMigration", "tags": [ "migrations" @@ -18272,7 +18435,8 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 309, + "group": null, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -18362,7 +18526,7 @@ }, "\/migrations\/nhost\/report": { "get": { - "summary": "Generate a report on NHost Data", + "summary": "Get NHost migration report", "operationId": "migrationsGetNHostReport", "tags": [ "migrations" @@ -18382,7 +18546,8 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 316, + "group": null, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18494,7 +18659,7 @@ }, "\/migrations\/supabase": { "post": { - "summary": "Migrate Supabase data", + "summary": "Create Supabase migration", "operationId": "migrationsCreateSupabaseMigration", "tags": [ "migrations" @@ -18514,7 +18679,8 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 308, + "group": null, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -18598,7 +18764,7 @@ }, "\/migrations\/supabase\/report": { "get": { - "summary": "Generate a report on Supabase Data", + "summary": "Get Supabase migration report", "operationId": "migrationsGetSupabaseReport", "tags": [ "migrations" @@ -18618,7 +18784,8 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 315, + "group": null, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18741,7 +18908,8 @@ }, "x-appwrite": { "method": "get", - "weight": 312, + "group": null, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -18778,7 +18946,7 @@ ] }, "patch": { - "summary": "Retry migration", + "summary": "Update retry migration", "operationId": "migrationsRetry", "tags": [ "migrations" @@ -18798,7 +18966,8 @@ }, "x-appwrite": { "method": "retry", - "weight": 317, + "group": null, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -18848,7 +19017,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 318, + "group": null, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -18907,7 +19077,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 197, + "group": null, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -18994,7 +19165,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 199, + "group": null, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19039,7 +19211,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 198, + "group": null, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -19116,7 +19289,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 200, + "group": null, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19173,7 +19347,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 201, + "group": null, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19252,7 +19427,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 202, + "group": null, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19311,7 +19487,8 @@ }, "x-appwrite": { "method": "list", - "weight": 152, + "group": "projects", + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19382,7 +19559,8 @@ }, "x-appwrite": { "method": "create", - "weight": 151, + "group": "projects", + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19515,7 +19693,8 @@ }, "x-appwrite": { "method": "get", - "weight": 153, + "group": "projects", + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19572,7 +19751,8 @@ }, "x-appwrite": { "method": "update", - "weight": 154, + "group": "projects", + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19686,7 +19866,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 171, + "group": "projects", + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -19745,7 +19926,8 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 158, + "group": "projects", + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -19836,7 +20018,8 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 159, + "group": "projects", + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -19914,7 +20097,8 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 164, + "group": "auth", + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -19992,7 +20176,8 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 163, + "group": "auth", + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20070,7 +20255,8 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 169, + "group": "auth", + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20148,7 +20334,8 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 162, + "group": "auth", + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20238,7 +20425,8 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 170, + "group": "auth", + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20319,7 +20507,8 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 167, + "group": "auth", + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20397,7 +20586,8 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 166, + "group": "auth", + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20455,7 +20645,7 @@ }, "\/projects\/{projectId}\/auth\/personal-data": { "patch": { - "summary": "Enable or disable checking user passwords for similarity with their personal data.", + "summary": "Update personal data check", "operationId": "projectsUpdatePersonalDataCheck", "tags": [ "projects" @@ -20475,7 +20665,8 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 168, + "group": "auth", + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20553,7 +20744,8 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 161, + "group": "auth", + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20631,7 +20823,8 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 165, + "group": "auth", + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20708,6 +20901,394 @@ } } }, + "\/projects\/{projectId}\/dev-keys": { + "get": { + "summary": "List dev keys", + "operationId": "projectsListDevKeys", + "tags": [ + "projects" + ], + "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "responses": { + "200": { + "description": "Dev Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKeyList" + } + } + } + } + }, + "x-appwrite": { + "method": "listDevKeys", + "group": "devKeys", + "weight": 367, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list-dev-keys.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", + "required": false, + "schema": { + "type": "string", + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create dev key", + "operationId": "projectsCreateDevKey", + "tags": [ + "projects" + ], + "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "responses": { + "201": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "x-appwrite": { + "method": "createDevKey", + "group": "devKeys", + "weight": 364, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "x-example": null + } + }, + "required": [ + "name", + "expire" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/dev-keys\/{keyId}": { + "get": { + "summary": "Get dev key", + "operationId": "projectsGetDevKey", + "tags": [ + "projects" + ], + "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "responses": { + "200": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "x-appwrite": { + "method": "getDevKey", + "group": "devKeys", + "weight": 366, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update dev key", + "operationId": "projectsUpdateDevKey", + "tags": [ + "projects" + ], + "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "responses": { + "200": { + "description": "DevKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKey" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDevKey", + "group": "devKeys", + "weight": 365, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "x-example": null + } + }, + "required": [ + "name", + "expire" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete dev key", + "operationId": "projectsDeleteDevKey", + "tags": [ + "projects" + ], + "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteDevKey", + "group": "devKeys", + "weight": 368, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/jwts": { "post": { "summary": "Create JWT", @@ -20730,7 +21311,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 183, + "group": "auth", + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -20816,7 +21398,8 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 179, + "group": "keys", + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -20873,7 +21456,8 @@ }, "x-appwrite": { "method": "createKey", - "weight": 178, + "group": "keys", + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -20965,7 +21549,8 @@ }, "x-appwrite": { "method": "getKey", - "weight": 180, + "group": "keys", + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21032,7 +21617,8 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 181, + "group": "keys", + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21125,7 +21711,8 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 182, + "group": "keys", + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21194,7 +21781,8 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 160, + "group": "auth", + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -21254,6 +21842,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -21330,7 +21919,8 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 185, + "group": "platforms", + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21387,7 +21977,8 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 184, + "group": "platforms", + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21505,7 +22096,8 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 186, + "group": "platforms", + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21572,7 +22164,8 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 187, + "group": "platforms", + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +22259,8 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 188, + "group": "platforms", + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21735,7 +22329,8 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 156, + "group": "projects", + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -21835,7 +22430,8 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 157, + "group": "projects", + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -21913,7 +22509,8 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 189, + "group": "templates", + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22030,7 +22627,8 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 190, + "group": "templates", + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22160,7 +22758,8 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 155, + "group": "projects", + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -22238,7 +22837,8 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 192, + "group": "templates", + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22461,7 +23061,8 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 194, + "group": "templates", + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22704,7 +23305,7 @@ } }, "delete": { - "summary": "Reset custom email template", + "summary": "Delete custom email template", "operationId": "projectsDeleteEmailTemplate", "tags": [ "projects" @@ -22724,7 +23325,8 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 196, + "group": "templates", + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -22949,7 +23551,8 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 191, + "group": "templates", + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23169,7 +23772,8 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 193, + "group": "templates", + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23408,7 +24012,8 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 195, + "group": "templates", + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -23630,7 +24235,8 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 173, + "group": "webhooks", + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -23687,7 +24293,8 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 172, + "group": "webhooks", + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -23801,7 +24408,8 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 174, + "group": "webhooks", + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23868,7 +24476,8 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 175, + "group": "webhooks", + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23983,7 +24592,8 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 177, + "group": "webhooks", + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24052,7 +24662,8 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 176, + "group": "webhooks", + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24121,7 +24732,8 @@ }, "x-appwrite": { "method": "listRules", - "weight": 289, + "group": null, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -24194,7 +24806,8 @@ }, "x-appwrite": { "method": "createAPIRule", - "weight": 425, + "group": null, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -24260,7 +24873,8 @@ }, "x-appwrite": { "method": "createFunctionRule", - "weight": 427, + "group": null, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -24337,7 +24951,8 @@ }, "x-appwrite": { "method": "createRedirectRule", - "weight": 428, + "group": null, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -24428,7 +25043,8 @@ }, "x-appwrite": { "method": "createSiteRule", - "weight": 426, + "group": null, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -24505,7 +25121,8 @@ }, "x-appwrite": { "method": "getRule", - "weight": 290, + "group": null, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -24555,7 +25172,8 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 291, + "group": null, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -24614,7 +25232,8 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 292, + "group": null, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -24673,7 +25292,8 @@ }, "x-appwrite": { "method": "list", - "weight": 397, + "group": "sites", + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -24742,7 +25362,8 @@ }, "x-appwrite": { "method": "create", - "weight": 395, + "group": "sites", + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -24987,7 +25608,8 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 400, + "group": "frameworks", + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -25035,7 +25657,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 423, + "group": "frameworks", + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -25084,7 +25707,8 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 419, + "group": "templates", + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -25183,7 +25807,8 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 420, + "group": "templates", + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -25242,7 +25867,8 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 421, + "group": null, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -25313,7 +25939,8 @@ }, "x-appwrite": { "method": "get", - "weight": 396, + "group": "sites", + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -25371,7 +25998,8 @@ }, "x-appwrite": { "method": "update", - "weight": 398, + "group": "sites", + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -25612,7 +26240,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 399, + "group": "sites", + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -25672,7 +26301,8 @@ }, "x-appwrite": { "method": "updateSiteDeployment", - "weight": 406, + "group": "sites", + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -25751,7 +26381,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 405, + "group": "deployments", + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -25833,7 +26464,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 401, + "group": "deployments", + "weight": 405, "cookies": false, "type": "upload", "deprecated": false, @@ -25933,7 +26565,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 409, + "group": "deployments", + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -26012,7 +26645,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 402, + "group": "deployments", + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26114,7 +26748,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 403, + "group": "deployments", + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26211,7 +26846,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 404, + "group": "deployments", + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -26272,7 +26908,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 407, + "group": "deployments", + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -26322,7 +26959,7 @@ }, "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "sitesGetDeploymentDownload", "tags": [ "sites" @@ -26335,7 +26972,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 408, + "group": "deployments", + "weight": 412, "cookies": false, "type": "location", "deprecated": false, @@ -26424,7 +27062,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 410, + "group": "deployments", + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26494,7 +27133,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 412, + "group": "logs", + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -26564,7 +27204,8 @@ }, "x-appwrite": { "method": "getLog", - "weight": 411, + "group": "logs", + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -26625,7 +27266,8 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 413, + "group": "logs", + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26695,7 +27337,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 422, + "group": null, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -26776,7 +27419,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 416, + "group": "variables", + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -26834,7 +27478,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 414, + "group": "variables", + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26924,7 +27569,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 415, + "group": "variables", + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -26992,7 +27638,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 417, + "group": "variables", + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27082,7 +27729,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 418, + "group": "variables", + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -27152,7 +27800,8 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "group": "buckets", + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -27224,7 +27873,8 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "group": "buckets", + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -27350,7 +28000,8 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "group": "buckets", + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -27408,7 +28059,8 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "group": "buckets", + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -27531,7 +28183,8 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "group": "buckets", + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -27591,7 +28244,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -27676,7 +28330,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -27773,7 +28428,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -27844,7 +28500,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -27932,7 +28589,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -27998,7 +28656,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -28064,7 +28723,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -28280,7 +28940,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -28353,7 +29014,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 217, + "group": null, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -28424,7 +29086,8 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 218, + "group": null, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -28505,7 +29168,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -28580,7 +29244,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -28664,7 +29329,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -28725,7 +29391,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -28798,7 +29465,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -28861,7 +29529,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 232, + "group": "logs", + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -28933,7 +29602,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -29018,7 +29688,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -29128,7 +29799,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -29199,7 +29871,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -29285,7 +29958,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -29358,7 +30032,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -29454,7 +30129,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -29513,7 +30189,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -29593,7 +30270,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -29674,7 +30352,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -29772,7 +30451,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -29833,7 +30513,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -29912,7 +30593,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -29975,7 +30657,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -30038,7 +30721,8 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "group": "users", + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -30110,7 +30794,8 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "group": "users", + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30197,7 +30882,8 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "group": "users", + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -30281,7 +30967,8 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "group": "users", + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30365,7 +31052,8 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "group": "identities", + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -30432,7 +31120,8 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "group": "identities", + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -30492,7 +31181,8 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "group": "users", + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -30576,7 +31266,8 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "group": "users", + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -30660,7 +31351,8 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "group": "users", + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -30774,7 +31466,8 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "group": "users", + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -30876,7 +31569,8 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "group": "users", + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -30980,7 +31674,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 275, + "group": null, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -31051,7 +31746,8 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "group": "users", + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31102,7 +31798,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "group": "users", + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -31162,7 +31859,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "group": "users", + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -31241,7 +31939,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "group": "sessions", + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -31322,7 +32021,8 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "group": "users", + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -31404,7 +32104,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "group": "logs", + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -31477,7 +32178,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "group": "memberships", + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -31561,7 +32263,8 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "group": "users", + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -31633,7 +32336,8 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "group": "mfa", + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -31708,7 +32412,8 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "group": "mfa", + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -31768,7 +32473,8 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "group": "mfa", + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -31806,7 +32512,7 @@ ] }, "put": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "usersUpdateMfaRecoveryCodes", "tags": [ "users" @@ -31826,7 +32532,8 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "group": "mfa", + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -31884,7 +32591,8 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "group": "mfa", + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -31944,7 +32652,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "group": "users", + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -32023,7 +32732,8 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "group": "users", + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -32102,7 +32812,8 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "group": "users", + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -32181,7 +32892,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "group": "users", + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -32239,7 +32951,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "group": "users", + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -32318,7 +33031,8 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "group": "sessions", + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -32376,7 +33090,8 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "group": "sessions", + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -32427,7 +33142,8 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "group": "sessions", + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -32480,7 +33196,8 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "group": "sessions", + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -32550,7 +33267,8 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "group": "users", + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -32629,7 +33347,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "group": "targets", + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -32701,7 +33420,8 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "group": "targets", + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -32810,7 +33530,8 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "group": "targets", + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -32879,7 +33600,8 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "group": "targets", + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -32967,7 +33689,8 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "group": "targets", + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -33038,7 +33761,8 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "group": "sessions", + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -33119,7 +33843,8 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "group": "users", + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33198,7 +33923,8 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "group": "users", + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33277,7 +34003,8 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 279, + "group": "repositories", + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -33372,7 +34099,8 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 280, + "group": "repositories", + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -33456,7 +34184,8 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 281, + "group": "repositories", + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -33540,7 +34269,8 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 282, + "group": "repositories", + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -33609,7 +34339,8 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 283, + "group": "repositories", + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -33678,7 +34409,8 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 278, + "group": "repositories", + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -33738,7 +34470,7 @@ }, "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { "patch": { - "summary": "Authorize external deployment", + "summary": "Update external deployment (authorize)", "operationId": "vcsUpdateExternalDeployments", "tags": [ "vcs" @@ -33751,7 +34483,8 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 288, + "group": "repositories", + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -33839,7 +34572,8 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 285, + "group": "installations", + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -33912,7 +34646,8 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 286, + "group": "installations", + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -33962,7 +34697,8 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 287, + "group": "installations", + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34800,6 +35536,30 @@ "keys" ] }, + "devKeyList": { + "description": "Dev Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of devKeys documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "devKeys": { + "type": "array", + "description": "List of devKeys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "devKeys" + ] + }, "platformList": { "description": "Platforms List", "type": "object", @@ -39116,6 +39876,14 @@ }, "x-example": {} }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": {} + }, "smtpEnabled": { "type": "boolean", "description": "Status for custom SMTP", @@ -39299,6 +40067,7 @@ "platforms", "webhooks", "keys", + "devKeys", "smtpEnabled", "smtpSenderName", "smtpSenderEmail", @@ -39489,6 +40258,65 @@ "sdks" ] }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ] + }, "mockNumber": { "description": "Mock Number", "type": "object", diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index ca30c5260e..c5e83e4c0b 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -18,6 +18,9 @@ "servers": [ { "url": "https:\/\/cloud.appwrite.io\/v1" + }, + { + "url": "https:\/\/.cloud.appwrite.io\/v1" } ], "paths": { @@ -43,6 +46,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -92,6 +96,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -176,6 +181,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -252,6 +258,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -311,6 +318,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -374,6 +382,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -422,6 +431,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -488,6 +498,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -558,6 +569,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -604,7 +616,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "tags": [ "account" @@ -624,6 +636,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -702,6 +715,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -770,6 +784,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -823,7 +838,7 @@ } }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "tags": [ "account" @@ -843,6 +858,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -919,6 +935,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -950,7 +967,7 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", "tags": [ "account" @@ -970,6 +987,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1019,6 +1037,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1048,7 +1067,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "tags": [ "account" @@ -1068,6 +1087,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1119,6 +1139,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1189,6 +1210,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1264,6 +1286,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1340,6 +1363,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1389,6 +1413,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1459,6 +1484,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1516,7 +1542,7 @@ } }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "tags": [ "account" @@ -1536,6 +1562,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1618,6 +1645,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1660,6 +1688,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1711,6 +1740,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1759,6 +1789,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1832,6 +1863,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -1905,6 +1937,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -1978,6 +2011,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2051,6 +2085,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2112,6 +2147,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2166,6 +2202,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2229,6 +2266,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2280,6 +2318,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2358,6 +2397,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2437,6 +2477,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2464,7 +2505,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -2484,6 +2525,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2577,6 +2619,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -2653,6 +2696,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -2701,7 +2745,7 @@ } }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "tags": [ "account" @@ -2721,6 +2765,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -2797,6 +2842,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -2849,6 +2895,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -2918,6 +2965,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3045,6 +3093,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3178,6 +3227,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3237,6 +3287,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -3726,6 +3777,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -3809,6 +3861,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -3902,6 +3955,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4002,6 +4056,7 @@ }, "x-appwrite": { "method": "list", + "group": "databases", "weight": 71, "cookies": false, "type": "", @@ -4075,6 +4130,7 @@ }, "x-appwrite": { "method": "create", + "group": "databases", "weight": 70, "cookies": false, "type": "", @@ -4154,6 +4210,7 @@ }, "x-appwrite": { "method": "get", + "group": "databases", "weight": 72, "cookies": false, "type": "", @@ -4213,6 +4270,7 @@ }, "x-appwrite": { "method": "update", + "group": "databases", "weight": 74, "cookies": false, "type": "", @@ -4289,6 +4347,7 @@ }, "x-appwrite": { "method": "delete", + "group": "databases", "weight": 75, "cookies": false, "type": "", @@ -4350,6 +4409,7 @@ }, "x-appwrite": { "method": "listCollections", + "group": "collections", "weight": 77, "cookies": false, "type": "", @@ -4433,6 +4493,7 @@ }, "x-appwrite": { "method": "createCollection", + "group": "collections", "weight": 76, "cookies": false, "type": "", @@ -4537,6 +4598,7 @@ }, "x-appwrite": { "method": "getCollection", + "group": "collections", "weight": 78, "cookies": false, "type": "", @@ -4606,6 +4668,7 @@ }, "x-appwrite": { "method": "updateCollection", + "group": "collections", "weight": 80, "cookies": false, "type": "", @@ -4705,6 +4768,7 @@ }, "x-appwrite": { "method": "deleteCollection", + "group": "collections", "weight": 81, "cookies": false, "type": "", @@ -4776,6 +4840,7 @@ }, "x-appwrite": { "method": "listAttributes", + "group": "attributes", "weight": 92, "cookies": false, "type": "", @@ -4860,6 +4925,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", + "group": "attributes", "weight": 89, "cookies": false, "type": "", @@ -4966,6 +5032,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", + "group": "attributes", "weight": 101, "cookies": false, "type": "", @@ -5077,6 +5144,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", + "group": "attributes", "weight": 90, "cookies": false, "type": "", @@ -5183,6 +5251,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", + "group": "attributes", "weight": 102, "cookies": false, "type": "", @@ -5294,6 +5363,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", + "group": "attributes", "weight": 83, "cookies": false, "type": "", @@ -5400,6 +5470,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", + "group": "attributes", "weight": 95, "cookies": false, "type": "", @@ -5511,6 +5582,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", + "group": "attributes", "weight": 84, "cookies": false, "type": "", @@ -5626,6 +5698,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", + "group": "attributes", "weight": 96, "cookies": false, "type": "", @@ -5746,6 +5819,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", + "group": "attributes", "weight": 88, "cookies": false, "type": "", @@ -5862,6 +5936,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", + "group": "attributes", "weight": 100, "cookies": false, "type": "", @@ -5983,6 +6058,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", + "group": "attributes", "weight": 87, "cookies": false, "type": "", @@ -6099,6 +6175,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", + "group": "attributes", "weight": 99, "cookies": false, "type": "", @@ -6220,6 +6297,7 @@ }, "x-appwrite": { "method": "createIpAttribute", + "group": "attributes", "weight": 85, "cookies": false, "type": "", @@ -6326,6 +6404,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", + "group": "attributes", "weight": 97, "cookies": false, "type": "", @@ -6437,6 +6516,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", + "group": "attributes", "weight": 91, "cookies": false, "type": "", @@ -6568,6 +6648,7 @@ }, "x-appwrite": { "method": "createStringAttribute", + "group": "attributes", "weight": 82, "cookies": false, "type": "", @@ -6685,6 +6766,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", + "group": "attributes", "weight": 94, "cookies": false, "type": "", @@ -6801,6 +6883,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", + "group": "attributes", "weight": 86, "cookies": false, "type": "", @@ -6907,6 +6990,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", + "group": "attributes", "weight": 98, "cookies": false, "type": "", @@ -7049,6 +7133,7 @@ }, "x-appwrite": { "method": "getAttribute", + "group": "attributes", "weight": 93, "cookies": false, "type": "", @@ -7120,6 +7205,7 @@ }, "x-appwrite": { "method": "deleteAttribute", + "group": "attributes", "weight": 104, "cookies": false, "type": "", @@ -7200,6 +7286,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", + "group": "attributes", "weight": 103, "cookies": false, "type": "", @@ -7308,6 +7395,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -7394,6 +7482,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -7502,6 +7591,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -7598,6 +7688,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -7698,6 +7789,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -7783,6 +7875,7 @@ }, "x-appwrite": { "method": "listIndexes", + "group": "indexes", "weight": 106, "cookies": false, "type": "", @@ -7865,6 +7958,7 @@ }, "x-appwrite": { "method": "createIndex", + "group": "collections", "weight": 105, "cookies": false, "type": "", @@ -7985,6 +8079,7 @@ }, "x-appwrite": { "method": "getIndex", + "group": "indexes", "weight": 107, "cookies": false, "type": "", @@ -8056,6 +8151,7 @@ }, "x-appwrite": { "method": "deleteIndex", + "group": "indexes", "weight": 108, "cookies": false, "type": "", @@ -8136,7 +8232,8 @@ }, "x-appwrite": { "method": "list", - "weight": 368, + "group": "functions", + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -8209,7 +8306,8 @@ }, "x-appwrite": { "method": "create", - "weight": 365, + "group": "functions", + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8440,7 +8538,8 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 370, + "group": "runtimes", + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -8489,7 +8588,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 371, + "group": "runtimes", + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -8539,7 +8639,8 @@ }, "x-appwrite": { "method": "get", - "weight": 366, + "group": "functions", + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8598,7 +8699,8 @@ }, "x-appwrite": { "method": "update", - "weight": 367, + "group": "functions", + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -8826,7 +8928,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 369, + "group": "functions", + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -8887,7 +8990,8 @@ }, "x-appwrite": { "method": "updateFunctionDeployment", - "weight": 374, + "group": "functions", + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -8967,7 +9071,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 375, + "group": "deployments", + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9050,7 +9155,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 372, + "group": "deployments", + "weight": 376, "cookies": false, "type": "upload", "deprecated": false, @@ -9146,7 +9252,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 380, + "group": "deployments", + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -9231,7 +9338,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 377, + "group": "deployments", + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9334,7 +9442,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 378, + "group": "deployments", + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9431,7 +9540,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 373, + "group": "deployments", + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9493,7 +9603,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 376, + "group": "deployments", + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9544,7 +9655,7 @@ }, "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "functionsGetDeploymentDownload", "tags": [ "functions" @@ -9557,7 +9668,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 379, + "group": "deployments", + "weight": 383, "cookies": false, "type": "location", "deprecated": false, @@ -9647,7 +9759,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 381, + "group": "deployments", + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9718,7 +9831,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9794,7 +9908,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -9910,7 +10025,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -9976,7 +10092,8 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 385, + "group": "executions", + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10047,7 +10164,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 390, + "group": "variables", + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -10106,7 +10224,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 388, + "group": "variables", + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10197,7 +10316,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 389, + "group": "variables", + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10266,7 +10386,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 391, + "group": "variables", + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10357,7 +10478,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 392, + "group": "variables", + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10428,7 +10550,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -10481,7 +10604,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -10534,6 +10658,7 @@ }, "x-appwrite": { "method": "get", + "group": "health", "weight": 126, "cookies": false, "type": "", @@ -10583,7 +10708,8 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "group": "health", + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10632,6 +10758,7 @@ }, "x-appwrite": { "method": "getCache", + "group": "health", "weight": 129, "cookies": false, "type": "", @@ -10681,6 +10808,7 @@ }, "x-appwrite": { "method": "getCertificate", + "group": "health", "weight": 134, "cookies": false, "type": "", @@ -10741,6 +10869,7 @@ }, "x-appwrite": { "method": "getDB", + "group": "health", "weight": 128, "cookies": false, "type": "", @@ -10790,6 +10919,7 @@ }, "x-appwrite": { "method": "getPubSub", + "group": "health", "weight": 130, "cookies": false, "type": "", @@ -10839,6 +10969,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", + "group": "queue", "weight": 136, "cookies": false, "type": "", @@ -10901,6 +11032,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", + "group": "queue", "weight": 135, "cookies": false, "type": "", @@ -10963,6 +11095,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", + "group": "queue", "weight": 137, "cookies": false, "type": "", @@ -11036,6 +11169,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", + "group": "queue", "weight": 138, "cookies": false, "type": "", @@ -11098,7 +11232,8 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "group": "queue", + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11139,7 +11274,6 @@ "v1-functions", "v1-stats-resources", "v1-stats-usage", - "v1-stats-usage-dump", "v1-webhooks", "v1-certificates", "v1-builds", @@ -11187,6 +11321,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", + "group": "queue", "weight": 142, "cookies": false, "type": "", @@ -11249,6 +11384,7 @@ }, "x-appwrite": { "method": "getQueueLogs", + "group": "queue", "weight": 133, "cookies": false, "type": "", @@ -11311,6 +11447,7 @@ }, "x-appwrite": { "method": "getQueueMails", + "group": "queue", "weight": 139, "cookies": false, "type": "", @@ -11373,6 +11510,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", + "group": "queue", "weight": 140, "cookies": false, "type": "", @@ -11435,6 +11573,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", + "group": "queue", "weight": 141, "cookies": false, "type": "", @@ -11497,6 +11636,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", + "group": "queue", "weight": 143, "cookies": false, "type": "", @@ -11559,6 +11699,7 @@ }, "x-appwrite": { "method": "getQueueUsage", + "group": "queue", "weight": 144, "cookies": false, "type": "", @@ -11599,68 +11740,6 @@ ] } }, - "\/health\/queue\/stats-usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueStatsUsageDump", - "tags": [ - "health" - ], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } - } - }, - "x-appwrite": { - "method": "getQueueStatsUsageDump", - "weight": 145, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health\/get-queue-stats-usage-dump.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] - } - }, "\/health\/queue\/webhooks": { "get": { "summary": "Get webhooks queue", @@ -11683,6 +11762,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", + "group": "queue", "weight": 132, "cookies": false, "type": "", @@ -11745,7 +11825,8 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "group": "storage", + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11794,7 +11875,8 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "group": "storage", + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11843,6 +11925,7 @@ }, "x-appwrite": { "method": "getTime", + "group": "health", "weight": 131, "cookies": false, "type": "", @@ -11892,6 +11975,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -11945,6 +12029,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -11998,6 +12083,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -12051,6 +12137,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -12104,6 +12191,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -12157,6 +12245,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -12210,6 +12299,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -12263,6 +12353,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -12316,7 +12407,8 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 357, + "group": "messages", + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -12392,7 +12484,8 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 354, + "group": "messages", + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -12536,7 +12629,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 361, + "group": "messages", + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12682,7 +12776,8 @@ }, "x-appwrite": { "method": "createPush", - "weight": 356, + "group": "messages", + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -12856,7 +12951,8 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 363, + "group": "messages", + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13034,7 +13130,8 @@ }, "x-appwrite": { "method": "createSms", - "weight": 355, + "group": "messages", + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -13143,7 +13240,8 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 362, + "group": "messages", + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13255,7 +13353,8 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 360, + "group": "messages", + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13308,7 +13407,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 364, + "group": "messages", + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13370,7 +13470,8 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 358, + "group": "logs", + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13445,7 +13546,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 359, + "group": "messages", + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13520,7 +13622,8 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 329, + "group": "providers", + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -13596,7 +13699,8 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 328, + "group": "providers", + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -13701,7 +13805,8 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 341, + "group": "providers", + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -13809,7 +13914,8 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 327, + "group": "providers", + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -13894,7 +14000,8 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 340, + "group": "providers", + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -13982,7 +14089,8 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 319, + "group": "providers", + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -14097,7 +14205,8 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 332, + "group": "providers", + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14215,7 +14324,8 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 322, + "group": "providers", + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -14310,7 +14420,8 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 335, + "group": "providers", + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -14408,7 +14519,8 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 320, + "group": "providers", + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -14513,7 +14625,8 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 333, + "group": "providers", + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -14621,7 +14734,8 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 321, + "group": "providers", + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -14764,7 +14878,8 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 334, + "group": "providers", + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -14909,7 +15024,8 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 323, + "group": "providers", + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15004,7 +15120,8 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 336, + "group": "providers", + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -15102,7 +15219,8 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 324, + "group": "providers", + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -15197,7 +15315,8 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 337, + "group": "providers", + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15295,7 +15414,8 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 325, + "group": "providers", + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15390,7 +15510,8 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 338, + "group": "providers", + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15488,7 +15609,8 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 326, + "group": "providers", + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -15583,7 +15705,8 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 339, + "group": "providers", + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -15681,7 +15804,8 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 331, + "group": "providers", + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -15734,7 +15858,8 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 342, + "group": "providers", + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -15796,7 +15921,8 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 330, + "group": "providers", + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -15871,7 +15997,8 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 351, + "group": "subscribers", + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -15946,7 +16073,8 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 344, + "group": "topics", + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -16020,7 +16148,8 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 343, + "group": "topics", + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16103,7 +16232,8 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 346, + "group": "topics", + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16163,7 +16293,8 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 347, + "group": "topics", + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16240,7 +16371,8 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 348, + "group": "topics", + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16302,7 +16434,8 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 345, + "group": "topics", + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -16377,7 +16510,8 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 350, + "group": "subscribers", + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16461,7 +16595,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16552,7 +16687,8 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 352, + "group": "subscribers", + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -16615,7 +16751,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -16691,7 +16828,8 @@ }, "x-appwrite": { "method": "list", - "weight": 397, + "group": "sites", + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -16761,7 +16899,8 @@ }, "x-appwrite": { "method": "create", - "weight": 395, + "group": "sites", + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -17007,7 +17146,8 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 400, + "group": "frameworks", + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +17196,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 423, + "group": "frameworks", + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -17106,7 +17247,8 @@ }, "x-appwrite": { "method": "get", - "weight": 396, + "group": "sites", + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -17165,7 +17307,8 @@ }, "x-appwrite": { "method": "update", - "weight": 398, + "group": "sites", + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -17407,7 +17550,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 399, + "group": "sites", + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17468,7 +17612,8 @@ }, "x-appwrite": { "method": "updateSiteDeployment", - "weight": 406, + "group": "sites", + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -17548,7 +17693,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 405, + "group": "deployments", + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -17631,7 +17777,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 401, + "group": "deployments", + "weight": 405, "cookies": false, "type": "upload", "deprecated": false, @@ -17732,7 +17879,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 409, + "group": "deployments", + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -17812,7 +17960,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 402, + "group": "deployments", + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -17915,7 +18064,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 403, + "group": "deployments", + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -18013,7 +18163,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 404, + "group": "deployments", + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -18075,7 +18226,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 407, + "group": "deployments", + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18126,7 +18278,7 @@ }, "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "sitesGetDeploymentDownload", "tags": [ "sites" @@ -18139,7 +18291,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 408, + "group": "deployments", + "weight": 412, "cookies": false, "type": "location", "deprecated": false, @@ -18229,7 +18382,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 410, + "group": "deployments", + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18300,7 +18454,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 412, + "group": "logs", + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -18371,7 +18526,8 @@ }, "x-appwrite": { "method": "getLog", - "weight": 411, + "group": "logs", + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18433,7 +18589,8 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 413, + "group": "logs", + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18504,7 +18661,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 416, + "group": "variables", + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -18563,7 +18721,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 414, + "group": "variables", + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -18654,7 +18813,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 415, + "group": "variables", + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -18723,7 +18883,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 417, + "group": "variables", + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -18814,7 +18975,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 418, + "group": "variables", + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -18885,7 +19047,8 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "group": "buckets", + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -18958,7 +19121,8 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "group": "buckets", + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19085,7 +19249,8 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "group": "buckets", + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -19144,7 +19309,8 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "group": "buckets", + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -19268,7 +19434,8 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "group": "buckets", + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19329,7 +19496,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19416,7 +19584,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -19515,7 +19684,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +19758,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -19678,7 +19849,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -19746,7 +19918,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -19814,7 +19987,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -20032,7 +20206,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -20107,7 +20282,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20184,7 +20360,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20270,7 +20447,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -20333,7 +20511,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20408,7 +20587,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -20473,7 +20653,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -20560,7 +20741,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -20672,7 +20854,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -20745,7 +20928,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -20833,7 +21017,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -20908,7 +21093,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21006,7 +21192,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -21067,7 +21254,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -21149,7 +21337,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -21232,7 +21421,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -21332,7 +21522,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -21395,7 +21586,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -21476,7 +21668,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -21541,7 +21734,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -21606,7 +21800,8 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "group": "users", + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -21679,7 +21874,8 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "group": "users", + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21767,7 +21963,8 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "group": "users", + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -21852,7 +22049,8 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "group": "users", + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21937,7 +22135,8 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "group": "identities", + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -22005,7 +22204,8 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "group": "identities", + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -22066,7 +22266,8 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "group": "users", + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -22151,7 +22352,8 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "group": "users", + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22236,7 +22438,8 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "group": "users", + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22351,7 +22554,8 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "group": "users", + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -22454,7 +22658,8 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "group": "users", + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -22559,7 +22764,8 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "group": "users", + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22611,7 +22817,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "group": "users", + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -22672,7 +22879,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "group": "users", + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -22752,7 +22960,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "group": "sessions", + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22834,7 +23043,8 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "group": "users", + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -22917,7 +23127,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "group": "logs", + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -22991,7 +23202,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "group": "memberships", + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23076,7 +23288,8 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "group": "users", + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -23149,7 +23362,8 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "group": "mfa", + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23225,7 +23439,8 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "group": "mfa", + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23286,7 +23501,8 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "group": "mfa", + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23325,7 +23541,7 @@ ] }, "put": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "usersUpdateMfaRecoveryCodes", "tags": [ "users" @@ -23345,7 +23561,8 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "group": "mfa", + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23404,7 +23621,8 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "group": "mfa", + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -23465,7 +23683,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "group": "users", + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -23545,7 +23764,8 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "group": "users", + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -23625,7 +23845,8 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "group": "users", + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -23705,7 +23926,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "group": "users", + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -23764,7 +23986,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "group": "users", + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23844,7 +24067,8 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "group": "sessions", + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -23903,7 +24127,8 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "group": "sessions", + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -23955,7 +24180,8 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "group": "sessions", + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -24009,7 +24235,8 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "group": "sessions", + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24080,7 +24307,8 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "group": "users", + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -24160,7 +24388,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "group": "targets", + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -24233,7 +24462,8 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "group": "targets", + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -24343,7 +24573,8 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "group": "targets", + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -24413,7 +24644,8 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "group": "targets", + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -24502,7 +24734,8 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "group": "targets", + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -24574,7 +24807,8 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "group": "sessions", + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24656,7 +24890,8 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "group": "users", + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -24736,7 +24971,8 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "group": "users", + "weight": 252, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 0dd88e6d4f..dfe5820976 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -16,6 +16,7 @@ } }, "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" @@ -67,9 +68,7 @@ "get": { "summary": "Get account", "operationId": "accountGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -87,6 +86,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -137,6 +137,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -227,6 +228,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -286,9 +288,7 @@ "get": { "summary": "List identities", "operationId": "accountListIdentities", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -306,6 +306,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -367,6 +368,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -429,6 +431,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -459,9 +462,7 @@ "get": { "summary": "List logs", "operationId": "accountListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -479,6 +480,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -545,6 +547,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -617,6 +620,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -660,7 +664,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "consumes": [ "application\/json" @@ -682,6 +686,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -760,6 +765,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -827,6 +833,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -881,7 +888,7 @@ ] }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "consumes": [ "application\/json" @@ -903,6 +910,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -962,9 +970,7 @@ "get": { "summary": "List factors", "operationId": "accountListMfaFactors", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -982,6 +988,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -1012,11 +1019,9 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1034,6 +1039,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1084,6 +1090,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1112,7 +1119,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "consumes": [ "application\/json" @@ -1134,6 +1141,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1186,6 +1194,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1258,6 +1267,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1336,6 +1346,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1395,9 +1406,7 @@ "get": { "summary": "Get account preferences", "operationId": "accountGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1415,6 +1424,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1465,6 +1475,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1537,6 +1548,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1595,7 +1607,7 @@ ] }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "consumes": [ "application\/json" @@ -1617,6 +1629,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1683,9 +1696,7 @@ "get": { "summary": "List sessions", "operationId": "accountListSessions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1703,6 +1714,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1748,6 +1760,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1800,6 +1813,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1850,6 +1864,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1927,6 +1942,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -1984,9 +2000,7 @@ "get": { "summary": "Create OAuth2 session", "operationId": "accountCreateOAuth2Session", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "text\/html" ], @@ -2001,6 +2015,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", + "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", @@ -2028,7 +2043,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "type": "string", "x-example": "amazon", @@ -2047,6 +2062,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2136,6 +2152,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -2213,6 +2230,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2270,9 +2288,7 @@ "get": { "summary": "Get session", "operationId": "accountGetSession", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -2290,6 +2306,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2350,6 +2367,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2405,6 +2423,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2467,6 +2486,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2519,6 +2539,7 @@ }, "x-appwrite": { "method": "createPushTarget", + "group": "pushTargets", "weight": 55, "cookies": false, "type": "", @@ -2602,6 +2623,7 @@ }, "x-appwrite": { "method": "updatePushTarget", + "group": "pushTargets", "weight": 56, "cookies": false, "type": "", @@ -2673,6 +2695,7 @@ }, "x-appwrite": { "method": "deletePushTarget", + "group": "pushTargets", "weight": 57, "cookies": false, "type": "", @@ -2733,6 +2756,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2816,6 +2840,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2888,9 +2913,7 @@ "get": { "summary": "Create OAuth2 token", "operationId": "accountCreateOAuth2Token", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "text\/html" ], @@ -2905,6 +2928,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2932,7 +2956,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "type": "string", "x-example": "amazon", @@ -2951,6 +2975,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -3040,6 +3065,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -3120,6 +3146,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -3168,7 +3195,7 @@ ] }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "consumes": [ "application\/json" @@ -3190,6 +3217,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -3269,6 +3297,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -3322,6 +3351,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -3381,9 +3411,7 @@ "get": { "summary": "Get browser icon", "operationId": "avatarsGetBrowser", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3401,6 +3429,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3507,9 +3536,7 @@ "get": { "summary": "Get credit card icon", "operationId": "avatarsGetCreditCard", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3527,6 +3554,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3639,9 +3667,7 @@ "get": { "summary": "Get favicon", "operationId": "avatarsGetFavicon", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -3659,6 +3685,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3703,9 +3730,7 @@ "get": { "summary": "Get country flag", "operationId": "avatarsGetFlag", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3723,6 +3748,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -4191,9 +4217,7 @@ "get": { "summary": "Get image from URL", "operationId": "avatarsGetImage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -4211,6 +4235,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -4275,9 +4300,7 @@ "get": { "summary": "Get user initials", "operationId": "avatarsGetInitials", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4295,6 +4318,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -4367,9 +4391,7 @@ "get": { "summary": "Get QR code", "operationId": "avatarsGetQR", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4387,6 +4409,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4459,9 +4482,7 @@ "get": { "summary": "List documents", "operationId": "databasesListDocuments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4479,6 +4500,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -4560,6 +4582,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -4645,9 +4668,7 @@ "get": { "summary": "Get document", "operationId": "databasesGetDocument", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4665,6 +4686,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -4754,6 +4776,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -4850,6 +4873,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -4909,9 +4933,7 @@ "get": { "summary": "List executions", "operationId": "functionsListExecutions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4929,7 +4951,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -5002,7 +5025,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -5100,9 +5124,7 @@ "get": { "summary": "Get execution", "operationId": "functionsGetExecution", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5120,7 +5142,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -5191,7 +5214,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -5264,7 +5288,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -5317,9 +5342,7 @@ "get": { "summary": "Get user locale", "operationId": "localeGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5337,6 +5360,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -5370,9 +5394,7 @@ "get": { "summary": "List locale codes", "operationId": "localeListCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5390,6 +5412,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -5423,9 +5446,7 @@ "get": { "summary": "List continents", "operationId": "localeListContinents", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5443,6 +5464,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -5476,9 +5498,7 @@ "get": { "summary": "List countries", "operationId": "localeListCountries", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5496,6 +5516,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -5529,9 +5550,7 @@ "get": { "summary": "List EU countries", "operationId": "localeListCountriesEU", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5549,6 +5568,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -5582,9 +5602,7 @@ "get": { "summary": "List countries phone codes", "operationId": "localeListCountriesPhones", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5602,6 +5620,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -5635,9 +5654,7 @@ "get": { "summary": "List currencies", "operationId": "localeListCurrencies", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5655,6 +5672,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -5688,9 +5706,7 @@ "get": { "summary": "List languages", "operationId": "localeListLanguages", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5708,6 +5724,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -5761,7 +5778,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5845,7 +5863,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5897,9 +5916,7 @@ "get": { "summary": "List files", "operationId": "storageListFiles", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5917,7 +5934,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -5999,7 +6017,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -6070,9 +6089,7 @@ "get": { "summary": "Get file", "operationId": "storageGetFile", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -6090,7 +6107,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -6159,7 +6177,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6247,7 +6266,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -6298,9 +6318,7 @@ "get": { "summary": "Get file for download", "operationId": "storageGetFileDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -6318,7 +6336,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6369,9 +6388,7 @@ "get": { "summary": "Get file preview", "operationId": "storageGetFilePreview", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -6389,7 +6406,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6568,9 +6586,7 @@ "get": { "summary": "Get file for view", "operationId": "storageGetFileView", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -6588,7 +6604,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6639,9 +6656,7 @@ "get": { "summary": "List teams", "operationId": "teamsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -6659,7 +6674,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6733,7 +6749,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6804,9 +6821,7 @@ "get": { "summary": "Get team", "operationId": "teamsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -6824,7 +6839,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6885,7 +6901,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6959,7 +6976,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7002,9 +7020,7 @@ "get": { "summary": "List team memberships", "operationId": "teamsListMemberships", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7022,7 +7038,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7104,7 +7121,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7198,9 +7216,7 @@ "get": { "summary": "Get team membership", "operationId": "teamsGetMembership", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7218,7 +7234,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7287,7 +7304,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7372,7 +7390,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7443,7 +7462,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7518,9 +7538,7 @@ "get": { "summary": "Get team preferences", "operationId": "teamsGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7538,7 +7556,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7598,7 +7617,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7658,9 +7678,7 @@ "get": { "summary": "List tokens", "operationId": "tokensList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7678,7 +7696,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -7759,7 +7778,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -7835,9 +7855,7 @@ "get": { "summary": "Get token", "operationId": "tokensGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7855,7 +7873,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -7916,7 +7935,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -7997,7 +8017,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -8040,9 +8061,7 @@ "get": { "summary": "Get token as JWT", "operationId": "tokensGetJWT", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8060,7 +8079,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index 94dad7013c..33e12bbef5 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -16,6 +16,7 @@ } }, "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" @@ -79,9 +80,7 @@ "get": { "summary": "Get account", "operationId": "accountGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -99,6 +98,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -148,6 +148,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -231,6 +232,7 @@ }, "x-appwrite": { "method": "delete", + "group": "account", "weight": 11, "cookies": false, "type": "", @@ -280,6 +282,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -338,9 +341,7 @@ "get": { "summary": "List identities", "operationId": "accountListIdentities", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -358,6 +359,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -418,6 +420,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -479,6 +482,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -509,9 +513,7 @@ "get": { "summary": "List logs", "operationId": "accountListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -529,6 +531,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -594,6 +597,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -665,6 +669,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -707,7 +712,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "consumes": [ "application\/json" @@ -729,6 +734,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -806,6 +812,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -872,6 +879,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -926,7 +934,7 @@ ] }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "consumes": [ "application\/json" @@ -948,6 +956,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -1006,9 +1015,7 @@ "get": { "summary": "List factors", "operationId": "accountListMfaFactors", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1026,6 +1033,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -1055,11 +1063,9 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1077,6 +1083,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1126,6 +1133,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1153,7 +1161,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "consumes": [ "application\/json" @@ -1175,6 +1183,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1226,6 +1235,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1297,6 +1307,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1374,6 +1385,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1432,9 +1444,7 @@ "get": { "summary": "Get account preferences", "operationId": "accountGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1452,6 +1462,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1501,6 +1512,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1572,6 +1584,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1629,7 +1642,7 @@ ] }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "consumes": [ "application\/json" @@ -1651,6 +1664,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1716,9 +1730,7 @@ "get": { "summary": "List sessions", "operationId": "accountListSessions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1736,6 +1748,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1780,6 +1793,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1831,6 +1845,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1881,6 +1896,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1958,6 +1974,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -2015,9 +2032,7 @@ "get": { "summary": "Create OAuth2 session", "operationId": "accountCreateOAuth2Session", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "text\/html" ], @@ -2032,6 +2047,7 @@ }, "x-appwrite": { "method": "createOAuth2Session", + "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", @@ -2059,7 +2075,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "type": "string", "x-example": "amazon", @@ -2078,6 +2094,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2167,6 +2184,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -2244,6 +2262,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2301,9 +2320,7 @@ "get": { "summary": "Get session", "operationId": "accountGetSession", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -2321,6 +2338,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2380,6 +2398,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2434,6 +2453,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2495,6 +2515,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2546,6 +2567,7 @@ }, "x-appwrite": { "method": "createPushTarget", + "group": "pushTargets", "weight": 55, "cookies": false, "type": "", @@ -2628,6 +2650,7 @@ }, "x-appwrite": { "method": "updatePushTarget", + "group": "pushTargets", "weight": 56, "cookies": false, "type": "", @@ -2698,6 +2721,7 @@ }, "x-appwrite": { "method": "deletePushTarget", + "group": "pushTargets", "weight": 57, "cookies": false, "type": "", @@ -2757,6 +2781,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2840,6 +2865,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2912,9 +2938,7 @@ "get": { "summary": "Create OAuth2 token", "operationId": "accountCreateOAuth2Token", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "text\/html" ], @@ -2929,6 +2953,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2956,7 +2981,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "type": "string", "x-example": "amazon", @@ -2975,6 +3000,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -3064,6 +3090,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -3144,6 +3171,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -3191,7 +3219,7 @@ ] }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "consumes": [ "application\/json" @@ -3213,6 +3241,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -3291,6 +3320,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -3343,6 +3373,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -3401,9 +3432,7 @@ "get": { "summary": "Get browser icon", "operationId": "avatarsGetBrowser", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3421,6 +3450,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3527,9 +3557,7 @@ "get": { "summary": "Get credit card icon", "operationId": "avatarsGetCreditCard", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3547,6 +3575,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3659,9 +3688,7 @@ "get": { "summary": "Get favicon", "operationId": "avatarsGetFavicon", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -3679,6 +3706,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3723,9 +3751,7 @@ "get": { "summary": "Get country flag", "operationId": "avatarsGetFlag", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3743,6 +3769,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -4211,9 +4238,7 @@ "get": { "summary": "Get image from URL", "operationId": "avatarsGetImage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -4231,6 +4256,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -4295,9 +4321,7 @@ "get": { "summary": "Get user initials", "operationId": "avatarsGetInitials", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4315,6 +4339,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -4387,9 +4412,7 @@ "get": { "summary": "Get QR code", "operationId": "avatarsGetQR", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4407,6 +4430,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4477,7 +4501,7 @@ }, "\/console\/assistant": { "post": { - "summary": "Ask query", + "summary": "Create assistant query", "operationId": "assistantChat", "consumes": [ "application\/json" @@ -4499,7 +4523,8 @@ }, "x-appwrite": { "method": "chat", - "weight": 305, + "group": "console", + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -4548,9 +4573,7 @@ "get": { "summary": "Check resource ID availability", "operationId": "consoleGetResource", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [], "tags": [ "console" @@ -4563,7 +4586,8 @@ }, "x-appwrite": { "method": "getResource", - "weight": 424, + "group": null, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -4615,9 +4639,7 @@ "get": { "summary": "Get variables", "operationId": "consoleVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4635,7 +4657,8 @@ }, "x-appwrite": { "method": "variables", - "weight": 304, + "group": "console", + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -4664,9 +4687,7 @@ "get": { "summary": "List databases", "operationId": "databasesList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4684,6 +4705,7 @@ }, "x-appwrite": { "method": "list", + "group": "databases", "weight": 71, "cookies": false, "type": "", @@ -4755,6 +4777,7 @@ }, "x-appwrite": { "method": "create", + "group": "databases", "weight": 70, "cookies": false, "type": "", @@ -4818,9 +4841,7 @@ "get": { "summary": "Get databases usage stats", "operationId": "databasesGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4838,6 +4859,7 @@ }, "x-appwrite": { "method": "getUsage", + "group": null, "weight": 115, "cookies": false, "type": "", @@ -4889,9 +4911,7 @@ "get": { "summary": "Get database", "operationId": "databasesGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4909,6 +4929,7 @@ }, "x-appwrite": { "method": "get", + "group": "databases", "weight": 72, "cookies": false, "type": "", @@ -4967,6 +4988,7 @@ }, "x-appwrite": { "method": "update", + "group": "databases", "weight": 74, "cookies": false, "type": "", @@ -5044,6 +5066,7 @@ }, "x-appwrite": { "method": "delete", + "group": "databases", "weight": 75, "cookies": false, "type": "", @@ -5084,9 +5107,7 @@ "get": { "summary": "List collections", "operationId": "databasesListCollections", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5104,6 +5125,7 @@ }, "x-appwrite": { "method": "listCollections", + "group": "collections", "weight": 77, "cookies": false, "type": "", @@ -5183,6 +5205,7 @@ }, "x-appwrite": { "method": "createCollection", + "group": "collections", "weight": 76, "cookies": false, "type": "", @@ -5269,9 +5292,7 @@ "get": { "summary": "Get collection", "operationId": "databasesGetCollection", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5289,6 +5310,7 @@ }, "x-appwrite": { "method": "getCollection", + "group": "collections", "weight": 78, "cookies": false, "type": "", @@ -5355,6 +5377,7 @@ }, "x-appwrite": { "method": "updateCollection", + "group": "collections", "weight": 80, "cookies": false, "type": "", @@ -5455,6 +5478,7 @@ }, "x-appwrite": { "method": "deleteCollection", + "group": "collections", "weight": 81, "cookies": false, "type": "", @@ -5503,9 +5527,7 @@ "get": { "summary": "List attributes", "operationId": "databasesListAttributes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -5523,6 +5545,7 @@ }, "x-appwrite": { "method": "listAttributes", + "group": "attributes", "weight": 92, "cookies": false, "type": "", @@ -5603,6 +5626,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", + "group": "attributes", "weight": 89, "cookies": false, "type": "", @@ -5708,6 +5732,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", + "group": "attributes", "weight": 101, "cookies": false, "type": "", @@ -5815,6 +5840,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", + "group": "attributes", "weight": 90, "cookies": false, "type": "", @@ -5920,6 +5946,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", + "group": "attributes", "weight": 102, "cookies": false, "type": "", @@ -6027,6 +6054,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", + "group": "attributes", "weight": 83, "cookies": false, "type": "", @@ -6132,6 +6160,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", + "group": "attributes", "weight": 95, "cookies": false, "type": "", @@ -6239,6 +6268,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", + "group": "attributes", "weight": 84, "cookies": false, "type": "", @@ -6354,6 +6384,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", + "group": "attributes", "weight": 96, "cookies": false, "type": "", @@ -6471,6 +6502,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", + "group": "attributes", "weight": 88, "cookies": false, "type": "", @@ -6588,6 +6620,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", + "group": "attributes", "weight": 100, "cookies": false, "type": "", @@ -6707,6 +6740,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", + "group": "attributes", "weight": 87, "cookies": false, "type": "", @@ -6824,6 +6858,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", + "group": "attributes", "weight": 99, "cookies": false, "type": "", @@ -6943,6 +6978,7 @@ }, "x-appwrite": { "method": "createIpAttribute", + "group": "attributes", "weight": 85, "cookies": false, "type": "", @@ -7048,6 +7084,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", + "group": "attributes", "weight": 97, "cookies": false, "type": "", @@ -7155,6 +7192,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", + "group": "attributes", "weight": 91, "cookies": false, "type": "", @@ -7287,6 +7325,7 @@ }, "x-appwrite": { "method": "createStringAttribute", + "group": "attributes", "weight": 82, "cookies": false, "type": "", @@ -7405,6 +7444,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", + "group": "attributes", "weight": 94, "cookies": false, "type": "", @@ -7518,6 +7558,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", + "group": "attributes", "weight": 86, "cookies": false, "type": "", @@ -7623,6 +7664,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", + "group": "attributes", "weight": 98, "cookies": false, "type": "", @@ -7710,9 +7752,7 @@ "get": { "summary": "Get attribute", "operationId": "databasesGetAttribute", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7761,6 +7801,7 @@ }, "x-appwrite": { "method": "getAttribute", + "group": "attributes", "weight": 93, "cookies": false, "type": "", @@ -7829,6 +7870,7 @@ }, "x-appwrite": { "method": "deleteAttribute", + "group": "attributes", "weight": 104, "cookies": false, "type": "", @@ -7904,6 +7946,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", + "group": "attributes", "weight": 103, "cookies": false, "type": "", @@ -7987,9 +8030,7 @@ "get": { "summary": "List documents", "operationId": "databasesListDocuments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8007,6 +8048,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -8088,6 +8130,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -8173,9 +8216,7 @@ "get": { "summary": "Get document", "operationId": "databasesGetDocument", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8193,6 +8234,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -8282,6 +8324,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -8378,6 +8421,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -8437,9 +8481,7 @@ "get": { "summary": "List document logs", "operationId": "databasesListDocumentLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8457,6 +8499,7 @@ }, "x-appwrite": { "method": "listDocumentLogs", + "group": "logs", "weight": 112, "cookies": false, "type": "", @@ -8524,9 +8567,7 @@ "get": { "summary": "List indexes", "operationId": "databasesListIndexes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8544,6 +8585,7 @@ }, "x-appwrite": { "method": "listIndexes", + "group": "indexes", "weight": 106, "cookies": false, "type": "", @@ -8622,6 +8664,7 @@ }, "x-appwrite": { "method": "createIndex", + "group": "collections", "weight": 105, "cookies": false, "type": "", @@ -8721,9 +8764,7 @@ "get": { "summary": "Get index", "operationId": "databasesGetIndex", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8741,6 +8782,7 @@ }, "x-appwrite": { "method": "getIndex", + "group": "indexes", "weight": 107, "cookies": false, "type": "", @@ -8809,6 +8851,7 @@ }, "x-appwrite": { "method": "deleteIndex", + "group": "indexes", "weight": 108, "cookies": false, "type": "", @@ -8864,9 +8907,7 @@ "get": { "summary": "List collection logs", "operationId": "databasesListCollectionLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8884,6 +8925,7 @@ }, "x-appwrite": { "method": "listCollectionLogs", + "group": "collections", "weight": 79, "cookies": false, "type": "", @@ -8943,9 +8985,7 @@ "get": { "summary": "Get collection usage stats", "operationId": "databasesGetCollectionUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8963,6 +9003,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", + "group": null, "weight": 117, "cookies": false, "type": "", @@ -9030,9 +9071,7 @@ "get": { "summary": "List database logs", "operationId": "databasesListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9050,6 +9089,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 73, "cookies": false, "type": "", @@ -9101,9 +9141,7 @@ "get": { "summary": "Get database usage stats", "operationId": "databasesGetDatabaseUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9121,6 +9159,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", + "group": null, "weight": 116, "cookies": false, "type": "", @@ -9180,9 +9219,7 @@ "get": { "summary": "List functions", "operationId": "functionsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9200,7 +9237,8 @@ }, "x-appwrite": { "method": "list", - "weight": 368, + "group": "functions", + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9271,7 +9309,8 @@ }, "x-appwrite": { "method": "create", - "weight": 365, + "group": "functions", + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9501,9 +9540,7 @@ "get": { "summary": "List runtimes", "operationId": "functionsListRuntimes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9521,7 +9558,8 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 370, + "group": "runtimes", + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9551,9 +9589,7 @@ "get": { "summary": "List specifications", "operationId": "functionsListSpecifications", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9571,7 +9607,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 371, + "group": "runtimes", + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9602,9 +9639,7 @@ "get": { "summary": "List templates", "operationId": "functionsListTemplates", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9622,7 +9657,8 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 394, + "group": "templates", + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -9697,9 +9733,7 @@ "get": { "summary": "Get function template", "operationId": "functionsGetTemplate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9717,7 +9751,8 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 393, + "group": "templates", + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -9756,9 +9791,7 @@ "get": { "summary": "Get functions usage", "operationId": "functionsListUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9776,7 +9809,8 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 387, + "group": null, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -9827,9 +9861,7 @@ "get": { "summary": "Get function", "operationId": "functionsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9847,7 +9879,8 @@ }, "x-appwrite": { "method": "get", - "weight": 366, + "group": "functions", + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9905,7 +9938,8 @@ }, "x-appwrite": { "method": "update", - "weight": 367, + "group": "functions", + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -10149,7 +10183,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 369, + "group": "functions", + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10209,7 +10244,8 @@ }, "x-appwrite": { "method": "updateFunctionDeployment", - "weight": 374, + "group": "functions", + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -10267,9 +10303,7 @@ "get": { "summary": "List deployments", "operationId": "functionsListDeployments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10287,7 +10321,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 375, + "group": "deployments", + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10366,7 +10401,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 372, + "group": "deployments", + "weight": 376, "cookies": false, "type": "upload", "deprecated": false, @@ -10457,7 +10493,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 380, + "group": "deployments", + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10541,7 +10578,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 377, + "group": "deployments", + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10646,7 +10684,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 378, + "group": "deployments", + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10723,9 +10762,7 @@ "get": { "summary": "Get deployment", "operationId": "functionsGetDeployment", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10743,7 +10780,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 373, + "group": "deployments", + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10804,7 +10842,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 376, + "group": "deployments", + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10850,11 +10889,9 @@ }, "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "functionsGetDeploymentDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -10872,7 +10909,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 379, + "group": "deployments", + "weight": 383, "cookies": false, "type": "location", "deprecated": false, @@ -10957,7 +10995,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 381, + "group": "deployments", + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -11005,9 +11044,7 @@ "get": { "summary": "List executions", "operationId": "functionsListExecutions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11025,7 +11062,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -11098,7 +11136,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11196,9 +11235,7 @@ "get": { "summary": "Get execution", "operationId": "functionsGetExecution", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11216,7 +11253,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11280,7 +11318,8 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 385, + "group": "executions", + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11328,9 +11367,7 @@ "get": { "summary": "Get function usage", "operationId": "functionsGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11348,7 +11385,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 386, + "group": null, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11407,9 +11445,7 @@ "get": { "summary": "List variables", "operationId": "functionsListVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11427,7 +11463,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 390, + "group": "variables", + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11485,7 +11522,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 388, + "group": "variables", + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11556,9 +11594,7 @@ "get": { "summary": "Get variable", "operationId": "functionsGetVariable", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11576,7 +11612,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 389, + "group": "variables", + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11642,7 +11679,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 391, + "group": "variables", + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11733,7 +11771,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 392, + "group": "variables", + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11801,7 +11840,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -11874,7 +11914,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -11927,9 +11968,7 @@ "get": { "summary": "Get HTTP", "operationId": "healthGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11947,6 +11986,7 @@ }, "x-appwrite": { "method": "get", + "group": "health", "weight": 126, "cookies": false, "type": "", @@ -11977,9 +12017,7 @@ "get": { "summary": "Get antivirus", "operationId": "healthGetAntivirus", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11997,7 +12035,8 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "group": "health", + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12027,9 +12066,7 @@ "get": { "summary": "Get cache", "operationId": "healthGetCache", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12047,6 +12084,7 @@ }, "x-appwrite": { "method": "getCache", + "group": "health", "weight": 129, "cookies": false, "type": "", @@ -12077,9 +12115,7 @@ "get": { "summary": "Get the SSL certificate for a domain", "operationId": "healthGetCertificate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12097,6 +12133,7 @@ }, "x-appwrite": { "method": "getCertificate", + "group": "health", "weight": 134, "cookies": false, "type": "", @@ -12136,9 +12173,7 @@ "get": { "summary": "Get DB", "operationId": "healthGetDB", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12156,6 +12191,7 @@ }, "x-appwrite": { "method": "getDB", + "group": "health", "weight": 128, "cookies": false, "type": "", @@ -12186,9 +12222,7 @@ "get": { "summary": "Get pubsub", "operationId": "healthGetPubSub", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12206,6 +12240,7 @@ }, "x-appwrite": { "method": "getPubSub", + "group": "health", "weight": 130, "cookies": false, "type": "", @@ -12236,9 +12271,7 @@ "get": { "summary": "Get builds queue", "operationId": "healthGetQueueBuilds", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12256,6 +12289,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", + "group": "queue", "weight": 136, "cookies": false, "type": "", @@ -12297,9 +12331,7 @@ "get": { "summary": "Get certificates queue", "operationId": "healthGetQueueCertificates", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12317,6 +12349,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", + "group": "queue", "weight": 135, "cookies": false, "type": "", @@ -12358,9 +12391,7 @@ "get": { "summary": "Get databases queue", "operationId": "healthGetQueueDatabases", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12378,6 +12409,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", + "group": "queue", "weight": 137, "cookies": false, "type": "", @@ -12428,9 +12460,7 @@ "get": { "summary": "Get deletes queue", "operationId": "healthGetQueueDeletes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12448,6 +12478,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", + "group": "queue", "weight": 138, "cookies": false, "type": "", @@ -12489,9 +12520,7 @@ "get": { "summary": "Get number of failed queue jobs", "operationId": "healthGetFailedJobs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12509,7 +12538,8 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "group": "queue", + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12548,7 +12578,6 @@ "v1-functions", "v1-stats-resources", "v1-stats-usage", - "v1-stats-usage-dump", "v1-webhooks", "v1-certificates", "v1-builds", @@ -12575,9 +12604,7 @@ "get": { "summary": "Get functions queue", "operationId": "healthGetQueueFunctions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12595,6 +12622,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", + "group": "queue", "weight": 142, "cookies": false, "type": "", @@ -12636,9 +12664,7 @@ "get": { "summary": "Get logs queue", "operationId": "healthGetQueueLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12656,6 +12682,7 @@ }, "x-appwrite": { "method": "getQueueLogs", + "group": "queue", "weight": 133, "cookies": false, "type": "", @@ -12697,9 +12724,7 @@ "get": { "summary": "Get mails queue", "operationId": "healthGetQueueMails", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12717,6 +12742,7 @@ }, "x-appwrite": { "method": "getQueueMails", + "group": "queue", "weight": 139, "cookies": false, "type": "", @@ -12758,9 +12784,7 @@ "get": { "summary": "Get messaging queue", "operationId": "healthGetQueueMessaging", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12778,6 +12802,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", + "group": "queue", "weight": 140, "cookies": false, "type": "", @@ -12819,9 +12844,7 @@ "get": { "summary": "Get migrations queue", "operationId": "healthGetQueueMigrations", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12839,6 +12862,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", + "group": "queue", "weight": 141, "cookies": false, "type": "", @@ -12880,9 +12904,7 @@ "get": { "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12900,6 +12922,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", + "group": "queue", "weight": 143, "cookies": false, "type": "", @@ -12941,9 +12964,7 @@ "get": { "summary": "Get stats usage queue", "operationId": "healthGetQueueUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12961,6 +12982,7 @@ }, "x-appwrite": { "method": "getQueueUsage", + "group": "queue", "weight": 144, "cookies": false, "type": "", @@ -12998,74 +13020,11 @@ ] } }, - "\/health\/queue\/stats-usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueStatsUsageDump", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueStatsUsageDump", - "weight": 145, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health\/get-queue-stats-usage-dump.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, "\/health\/queue\/webhooks": { "get": { "summary": "Get webhooks queue", "operationId": "healthGetQueueWebhooks", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13083,6 +13042,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", + "group": "queue", "weight": 132, "cookies": false, "type": "", @@ -13124,9 +13084,7 @@ "get": { "summary": "Get storage", "operationId": "healthGetStorage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13144,7 +13102,8 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "group": "storage", + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13174,9 +13133,7 @@ "get": { "summary": "Get local storage", "operationId": "healthGetStorageLocal", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13194,7 +13151,8 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "group": "storage", + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13224,9 +13182,7 @@ "get": { "summary": "Get time", "operationId": "healthGetTime", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13244,6 +13200,7 @@ }, "x-appwrite": { "method": "getTime", + "group": "health", "weight": 131, "cookies": false, "type": "", @@ -13274,9 +13231,7 @@ "get": { "summary": "Get user locale", "operationId": "localeGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13294,6 +13249,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -13327,9 +13283,7 @@ "get": { "summary": "List locale codes", "operationId": "localeListCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13347,6 +13301,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -13380,9 +13335,7 @@ "get": { "summary": "List continents", "operationId": "localeListContinents", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13400,6 +13353,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -13433,9 +13387,7 @@ "get": { "summary": "List countries", "operationId": "localeListCountries", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13453,6 +13405,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -13486,9 +13439,7 @@ "get": { "summary": "List EU countries", "operationId": "localeListCountriesEU", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13506,6 +13457,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -13539,9 +13491,7 @@ "get": { "summary": "List countries phone codes", "operationId": "localeListCountriesPhones", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13559,6 +13509,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -13592,9 +13543,7 @@ "get": { "summary": "List currencies", "operationId": "localeListCurrencies", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13612,6 +13561,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -13645,9 +13595,7 @@ "get": { "summary": "List languages", "operationId": "localeListLanguages", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13665,6 +13613,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -13698,9 +13647,7 @@ "get": { "summary": "List messages", "operationId": "messagingListMessages", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13718,7 +13665,8 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 357, + "group": "messages", + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -13792,7 +13740,8 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 354, + "group": "messages", + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -13949,7 +13898,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 361, + "group": "messages", + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14103,7 +14053,8 @@ }, "x-appwrite": { "method": "createPush", - "weight": 356, + "group": "messages", + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14297,7 +14248,8 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 363, + "group": "messages", + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14490,7 +14442,8 @@ }, "x-appwrite": { "method": "createSms", - "weight": 355, + "group": "messages", + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14607,7 +14560,8 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 362, + "group": "messages", + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14702,9 +14656,7 @@ "get": { "summary": "Get message", "operationId": "messagingGetMessage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -14722,7 +14674,8 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 360, + "group": "messages", + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14776,7 +14729,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 364, + "group": "messages", + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14817,9 +14771,7 @@ "get": { "summary": "List message logs", "operationId": "messagingListMessageLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -14837,7 +14789,8 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 358, + "group": "logs", + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14890,9 +14843,7 @@ "get": { "summary": "List message targets", "operationId": "messagingListTargets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -14910,7 +14861,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 359, + "group": "messages", + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14963,9 +14915,7 @@ "get": { "summary": "List providers", "operationId": "messagingListProviders", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -14983,7 +14933,8 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 329, + "group": "providers", + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -15057,7 +15008,8 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 328, + "group": "providers", + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -15171,7 +15123,8 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 341, + "group": "providers", + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -15283,7 +15236,8 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 327, + "group": "providers", + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15373,7 +15327,8 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 340, + "group": "providers", + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15461,7 +15416,8 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 319, + "group": "providers", + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -15587,7 +15543,8 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 332, + "group": "providers", + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15711,7 +15668,8 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 322, + "group": "providers", + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -15813,7 +15771,8 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 335, + "group": "providers", + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -15913,7 +15872,8 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 320, + "group": "providers", + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -16027,7 +15987,8 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 333, + "group": "providers", + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -16139,7 +16100,8 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 321, + "group": "providers", + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -16297,7 +16259,8 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 334, + "group": "providers", + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16452,7 +16415,8 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 323, + "group": "providers", + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -16554,7 +16518,8 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 336, + "group": "providers", + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -16654,7 +16619,8 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 324, + "group": "providers", + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16756,7 +16722,8 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 337, + "group": "providers", + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16856,7 +16823,8 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 325, + "group": "providers", + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16958,7 +16926,8 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 338, + "group": "providers", + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -17058,7 +17027,8 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 326, + "group": "providers", + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -17160,7 +17130,8 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 339, + "group": "providers", + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -17240,9 +17211,7 @@ "get": { "summary": "Get provider", "operationId": "messagingGetProvider", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17260,7 +17229,8 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 331, + "group": "providers", + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -17314,7 +17284,8 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 342, + "group": "providers", + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -17355,9 +17326,7 @@ "get": { "summary": "List provider logs", "operationId": "messagingListProviderLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17375,7 +17344,8 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 330, + "group": "providers", + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17428,9 +17398,7 @@ "get": { "summary": "List subscriber logs", "operationId": "messagingListSubscriberLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17448,7 +17416,8 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 351, + "group": "subscribers", + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17501,9 +17470,7 @@ "get": { "summary": "List topics", "operationId": "messagingListTopics", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17521,7 +17488,8 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 344, + "group": "topics", + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -17593,7 +17561,8 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 343, + "group": "topics", + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17662,9 +17631,7 @@ "get": { "summary": "Get topic", "operationId": "messagingGetTopic", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17682,7 +17649,8 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 346, + "group": "topics", + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17741,7 +17709,8 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 347, + "group": "topics", + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17819,7 +17788,8 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 348, + "group": "topics", + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17860,9 +17830,7 @@ "get": { "summary": "List topic logs", "operationId": "messagingListTopicLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17880,7 +17848,8 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 345, + "group": "topics", + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -17933,9 +17902,7 @@ "get": { "summary": "List subscribers", "operationId": "messagingListSubscribers", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17953,7 +17920,8 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 350, + "group": "subscribers", + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18033,7 +18001,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -18102,9 +18071,7 @@ "get": { "summary": "Get subscriber", "operationId": "messagingGetSubscriber", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18122,7 +18089,8 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 352, + "group": "subscribers", + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -18184,7 +18152,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -18236,9 +18205,7 @@ "get": { "summary": "List migrations", "operationId": "migrationsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18256,7 +18223,8 @@ }, "x-appwrite": { "method": "list", - "weight": 311, + "group": null, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18306,7 +18274,7 @@ }, "\/migrations\/appwrite": { "post": { - "summary": "Migrate Appwrite data", + "summary": "Create Appwrite migration", "operationId": "migrationsCreateAppwriteMigration", "consumes": [ "application\/json" @@ -18328,7 +18296,8 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 306, + "group": null, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -18399,11 +18368,9 @@ }, "\/migrations\/appwrite\/report": { "get": { - "summary": "Generate a report on Appwrite data", + "summary": "Get Appwrite migration report", "operationId": "migrationsGetAppwriteReport", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18421,7 +18388,8 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 313, + "group": null, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18508,7 +18476,8 @@ }, "x-appwrite": { "method": "createCsvMigration", - "weight": 310, + "group": null, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +18538,7 @@ }, "\/migrations\/firebase": { "post": { - "summary": "Migrate Firebase data", + "summary": "Create Firebase migration", "operationId": "migrationsCreateFirebaseMigration", "consumes": [ "application\/json" @@ -18591,7 +18560,8 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 307, + "group": null, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18648,11 +18618,9 @@ }, "\/migrations\/firebase\/report": { "get": { - "summary": "Generate a report on Firebase data", + "summary": "Get Firebase migration report", "operationId": "migrationsGetFirebaseReport", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18670,7 +18638,8 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 314, + "group": null, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18718,7 +18687,7 @@ }, "\/migrations\/nhost": { "post": { - "summary": "Migrate NHost data", + "summary": "Create NHost migration", "operationId": "migrationsCreateNHostMigration", "consumes": [ "application\/json" @@ -18740,7 +18709,8 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 309, + "group": null, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -18838,11 +18808,9 @@ }, "\/migrations\/nhost\/report": { "get": { - "summary": "Generate a report on NHost Data", + "summary": "Get NHost migration report", "operationId": "migrationsGetNHostReport", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18860,7 +18828,8 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 316, + "group": null, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18957,7 +18926,7 @@ }, "\/migrations\/supabase": { "post": { - "summary": "Migrate Supabase data", + "summary": "Create Supabase migration", "operationId": "migrationsCreateSupabaseMigration", "consumes": [ "application\/json" @@ -18979,7 +18948,8 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 308, + "group": null, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -19070,11 +19040,9 @@ }, "\/migrations\/supabase\/report": { "get": { - "summary": "Generate a report on Supabase Data", + "summary": "Get Supabase migration report", "operationId": "migrationsGetSupabaseReport", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19092,7 +19060,8 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 315, + "group": null, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -19184,9 +19153,7 @@ "get": { "summary": "Get migration", "operationId": "migrationsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19204,7 +19171,8 @@ }, "x-appwrite": { "method": "get", - "weight": 312, + "group": null, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -19239,7 +19207,7 @@ ] }, "patch": { - "summary": "Retry migration", + "summary": "Update retry migration", "operationId": "migrationsRetry", "consumes": [ "application\/json" @@ -19261,7 +19229,8 @@ }, "x-appwrite": { "method": "retry", - "weight": 317, + "group": null, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -19313,7 +19282,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 318, + "group": null, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -19352,9 +19322,7 @@ "get": { "summary": "Get project usage stats", "operationId": "projectGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19372,7 +19340,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 197, + "group": null, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -19435,9 +19404,7 @@ "get": { "summary": "List variables", "operationId": "projectListVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19455,7 +19422,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 199, + "group": null, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19502,7 +19470,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 198, + "group": null, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -19564,9 +19533,7 @@ "get": { "summary": "Get variable", "operationId": "projectGetVariable", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19584,7 +19551,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 200, + "group": null, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19641,7 +19609,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 201, + "group": null, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19723,7 +19692,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 202, + "group": null, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19762,9 +19732,7 @@ "get": { "summary": "List projects", "operationId": "projectsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19782,7 +19750,8 @@ }, "x-appwrite": { "method": "list", - "weight": 152, + "group": "projects", + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19852,7 +19821,8 @@ }, "x-appwrite": { "method": "create", - "weight": 151, + "group": "projects", + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19980,9 +19950,7 @@ "get": { "summary": "Get project", "operationId": "projectsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -20000,7 +19968,8 @@ }, "x-appwrite": { "method": "get", - "weight": 153, + "group": "projects", + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20057,7 +20026,8 @@ }, "x-appwrite": { "method": "update", - "weight": 154, + "group": "projects", + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20181,7 +20151,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 171, + "group": "projects", + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20240,7 +20211,8 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 158, + "group": "projects", + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20331,7 +20303,8 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 159, + "group": "projects", + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20408,7 +20381,8 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 164, + "group": "auth", + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20485,7 +20459,8 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 163, + "group": "auth", + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20562,7 +20537,8 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 169, + "group": "auth", + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20639,7 +20615,8 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 162, + "group": "auth", + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20730,7 +20707,8 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 170, + "group": "auth", + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20810,7 +20788,8 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 167, + "group": "auth", + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20887,7 +20866,8 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 166, + "group": "auth", + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20942,7 +20922,7 @@ }, "\/projects\/{projectId}\/auth\/personal-data": { "patch": { - "summary": "Enable or disable checking user passwords for similarity with their personal data.", + "summary": "Update personal data check", "operationId": "projectsUpdatePersonalDataCheck", "consumes": [ "application\/json" @@ -20964,7 +20944,8 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 168, + "group": "auth", + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21041,7 +21022,8 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 161, + "group": "auth", + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -21118,7 +21100,8 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 165, + "group": "auth", + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21190,6 +21173,386 @@ ] } }, + "\/projects\/{projectId}\/dev-keys": { + "get": { + "summary": "List dev keys", + "operationId": "projectsListDevKeys", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "responses": { + "200": { + "description": "Dev Keys List", + "schema": { + "$ref": "#\/definitions\/devKeyList" + } + } + }, + "x-appwrite": { + "method": "listDevKeys", + "group": "devKeys", + "weight": 367, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/list-dev-keys.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create dev key", + "operationId": "projectsCreateDevKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "responses": { + "201": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "x-appwrite": { + "method": "createDevKey", + "group": "devKeys", + "weight": 364, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/create-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "default": null, + "x-example": null + } + }, + "required": [ + "name", + "expire" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/dev-keys\/{keyId}": { + "get": { + "summary": "Get dev key", + "operationId": "projectsGetDevKey", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Get a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "responses": { + "200": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "x-appwrite": { + "method": "getDevKey", + "group": "devKeys", + "weight": 366, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/get-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update dev key", + "operationId": "projectsUpdateDevKey", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Update a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "responses": { + "200": { + "description": "DevKey", + "schema": { + "$ref": "#\/definitions\/devKey" + } + } + }, + "x-appwrite": { + "method": "updateDevKey", + "group": "devKeys", + "weight": 365, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", + "default": null, + "x-example": null + } + }, + "required": [ + "name", + "expire" + ] + } + } + ] + }, + "delete": { + "summary": "Delete dev key", + "operationId": "projectsDeleteDevKey", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "projects" + ], + "description": "Delete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteDevKey", + "group": "devKeys", + "weight": 368, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/delete-dev-key.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/jwts": { "post": { "summary": "Create JWT", @@ -21214,7 +21577,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 183, + "group": "auth", + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21280,9 +21644,7 @@ "get": { "summary": "List keys", "operationId": "projectsListKeys", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21300,7 +21662,8 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 179, + "group": "keys", + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21357,7 +21720,8 @@ }, "x-appwrite": { "method": "createKey", - "weight": 178, + "group": "keys", + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21430,9 +21794,7 @@ "get": { "summary": "Get key", "operationId": "projectsGetKey", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21450,7 +21812,8 @@ }, "x-appwrite": { "method": "getKey", - "weight": 180, + "group": "keys", + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21515,7 +21878,8 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 181, + "group": "keys", + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21609,7 +21973,8 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 182, + "group": "keys", + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21676,7 +22041,8 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 160, + "group": "auth", + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -21734,6 +22100,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -21794,9 +22161,7 @@ "get": { "summary": "List platforms", "operationId": "projectsListPlatforms", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21814,7 +22179,8 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 185, + "group": "platforms", + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21871,7 +22237,8 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 184, + "group": "platforms", + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21972,9 +22339,7 @@ "get": { "summary": "Get platform", "operationId": "projectsGetPlatform", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21992,7 +22357,8 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 186, + "group": "platforms", + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22057,7 +22423,8 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 187, + "group": "platforms", + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22153,7 +22520,8 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 188, + "group": "platforms", + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22220,7 +22588,8 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 156, + "group": "projects", + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -22320,7 +22689,8 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 157, + "group": "projects", + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22397,7 +22767,8 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 189, + "group": "templates", + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22525,7 +22896,8 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 190, + "group": "templates", + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22662,7 +23034,8 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 155, + "group": "projects", + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -22719,9 +23092,7 @@ "get": { "summary": "Get custom email template", "operationId": "projectsGetEmailTemplate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -22739,7 +23110,8 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 192, + "group": "templates", + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22958,7 +23330,8 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 194, + "group": "templates", + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23198,7 +23571,7 @@ ] }, "delete": { - "summary": "Reset custom email template", + "summary": "Delete custom email template", "operationId": "projectsDeleteEmailTemplate", "consumes": [ "application\/json" @@ -23220,7 +23593,8 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 196, + "group": "templates", + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23421,9 +23795,7 @@ "get": { "summary": "Get custom SMS template", "operationId": "projectsGetSmsTemplate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23441,7 +23813,8 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 191, + "group": "templates", + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23657,7 +24030,8 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 193, + "group": "templates", + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23891,7 +24265,8 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 195, + "group": "templates", + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24089,9 +24464,7 @@ "get": { "summary": "List webhooks", "operationId": "projectsListWebhooks", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24109,7 +24482,8 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 173, + "group": "webhooks", + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -24166,7 +24540,8 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 172, + "group": "webhooks", + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -24265,9 +24640,7 @@ "get": { "summary": "Get webhook", "operationId": "projectsGetWebhook", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24285,7 +24658,8 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 174, + "group": "webhooks", + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24350,7 +24724,8 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 175, + "group": "webhooks", + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24470,7 +24845,8 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 177, + "group": "webhooks", + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24537,7 +24913,8 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 176, + "group": "webhooks", + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24584,9 +24961,7 @@ "get": { "summary": "List rules", "operationId": "proxyListRules", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24604,7 +24979,8 @@ }, "x-appwrite": { "method": "listRules", - "weight": 289, + "group": null, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -24676,7 +25052,8 @@ }, "x-appwrite": { "method": "createAPIRule", - "weight": 425, + "group": null, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -24745,7 +25122,8 @@ }, "x-appwrite": { "method": "createFunctionRule", - "weight": 427, + "group": null, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -24827,7 +25205,8 @@ }, "x-appwrite": { "method": "createRedirectRule", - "weight": 428, + "group": null, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -24923,7 +25302,8 @@ }, "x-appwrite": { "method": "createSiteRule", - "weight": 426, + "group": null, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -24985,9 +25365,7 @@ "get": { "summary": "Get rule", "operationId": "proxyGetRule", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25005,7 +25383,8 @@ }, "x-appwrite": { "method": "getRule", - "weight": 290, + "group": null, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -25057,7 +25436,8 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 291, + "group": null, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -25116,7 +25496,8 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 292, + "group": null, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -25155,9 +25536,7 @@ "get": { "summary": "List sites", "operationId": "sitesList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25175,7 +25554,8 @@ }, "x-appwrite": { "method": "list", - "weight": 397, + "group": "sites", + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -25246,7 +25626,8 @@ }, "x-appwrite": { "method": "create", - "weight": 395, + "group": "sites", + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -25491,9 +25872,7 @@ "get": { "summary": "List frameworks", "operationId": "sitesListFrameworks", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25511,7 +25890,8 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 400, + "group": "frameworks", + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -25541,9 +25921,7 @@ "get": { "summary": "List specifications", "operationId": "sitesListSpecifications", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25561,7 +25939,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 423, + "group": "frameworks", + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -25592,9 +25971,7 @@ "get": { "summary": "List templates", "operationId": "sitesListTemplates", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25612,7 +25989,8 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 419, + "group": "templates", + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -25687,9 +26065,7 @@ "get": { "summary": "Get site template", "operationId": "sitesGetTemplate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25707,7 +26083,8 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 420, + "group": "templates", + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -25746,9 +26123,7 @@ "get": { "summary": "Get sites usage", "operationId": "sitesListUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25766,7 +26141,8 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 421, + "group": null, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -25817,9 +26193,7 @@ "get": { "summary": "Get site", "operationId": "sitesGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -25837,7 +26211,8 @@ }, "x-appwrite": { "method": "get", - "weight": 396, + "group": "sites", + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -25895,7 +26270,8 @@ }, "x-appwrite": { "method": "update", - "weight": 398, + "group": "sites", + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -26153,7 +26529,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 399, + "group": "sites", + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -26213,7 +26590,8 @@ }, "x-appwrite": { "method": "updateSiteDeployment", - "weight": 406, + "group": "sites", + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -26271,9 +26649,7 @@ "get": { "summary": "List deployments", "operationId": "sitesListDeployments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -26291,7 +26667,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 405, + "group": "deployments", + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -26370,7 +26747,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 401, + "group": "deployments", + "weight": 405, "cookies": false, "type": "upload", "deprecated": false, @@ -26469,7 +26847,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 409, + "group": "deployments", + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -26547,7 +26926,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 402, + "group": "deployments", + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26652,7 +27032,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 403, + "group": "deployments", + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26730,9 +27111,7 @@ "get": { "summary": "Get deployment", "operationId": "sitesGetDeployment", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -26750,7 +27129,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 404, + "group": "deployments", + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -26811,7 +27191,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 407, + "group": "deployments", + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -26857,11 +27238,9 @@ }, "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "sitesGetDeploymentDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -26879,7 +27258,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 408, + "group": "deployments", + "weight": 412, "cookies": false, "type": "location", "deprecated": false, @@ -26964,7 +27344,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 410, + "group": "deployments", + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -27012,9 +27393,7 @@ "get": { "summary": "List logs", "operationId": "sitesListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27032,7 +27411,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 412, + "group": "logs", + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -27084,9 +27464,7 @@ "get": { "summary": "Get log", "operationId": "sitesGetLog", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27104,7 +27482,8 @@ }, "x-appwrite": { "method": "getLog", - "weight": 411, + "group": "logs", + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -27167,7 +27546,8 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 413, + "group": "logs", + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -27215,9 +27595,7 @@ "get": { "summary": "Get site usage", "operationId": "sitesGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27235,7 +27613,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 422, + "group": null, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -27294,9 +27673,7 @@ "get": { "summary": "List variables", "operationId": "sitesListVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27314,7 +27691,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 416, + "group": "variables", + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -27372,7 +27750,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 414, + "group": "variables", + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -27443,9 +27822,7 @@ "get": { "summary": "Get variable", "operationId": "sitesGetVariable", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27463,7 +27840,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 415, + "group": "variables", + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -27529,7 +27907,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 417, + "group": "variables", + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27620,7 +27999,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 418, + "group": "variables", + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -27668,9 +28048,7 @@ "get": { "summary": "List buckets", "operationId": "storageListBuckets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27688,7 +28066,8 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "group": "buckets", + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -27759,7 +28138,8 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "group": "buckets", + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -27877,9 +28257,7 @@ "get": { "summary": "Get bucket", "operationId": "storageGetBucket", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -27897,7 +28275,8 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "group": "buckets", + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -27955,7 +28334,8 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "group": "buckets", + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -28087,7 +28467,8 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "group": "buckets", + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -28127,9 +28508,7 @@ "get": { "summary": "List files", "operationId": "storageListFiles", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -28147,7 +28526,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -28229,7 +28609,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -28300,9 +28681,7 @@ "get": { "summary": "Get file", "operationId": "storageGetFile", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -28320,7 +28699,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -28389,7 +28769,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -28477,7 +28858,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -28528,9 +28910,7 @@ "get": { "summary": "Get file for download", "operationId": "storageGetFileDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -28548,7 +28928,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -28599,9 +28980,7 @@ "get": { "summary": "Get file preview", "operationId": "storageGetFilePreview", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -28619,7 +28998,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -28798,9 +29178,7 @@ "get": { "summary": "Get file for view", "operationId": "storageGetFileView", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -28818,7 +29196,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -28869,9 +29248,7 @@ "get": { "summary": "Get storage usage stats", "operationId": "storageGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -28889,7 +29266,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 217, + "group": null, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -28940,9 +29318,7 @@ "get": { "summary": "Get bucket usage stats", "operationId": "storageGetBucketUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -28960,7 +29336,8 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 218, + "group": null, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -29019,9 +29396,7 @@ "get": { "summary": "List teams", "operationId": "teamsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29039,7 +29414,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -29113,7 +29489,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -29184,9 +29561,7 @@ "get": { "summary": "Get team", "operationId": "teamsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29204,7 +29579,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -29265,7 +29641,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -29339,7 +29716,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -29382,9 +29760,7 @@ "get": { "summary": "List team logs", "operationId": "teamsListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29402,7 +29778,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 232, + "group": "logs", + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -29453,9 +29830,7 @@ "get": { "summary": "List team memberships", "operationId": "teamsListMemberships", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29473,7 +29848,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -29555,7 +29931,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -29649,9 +30026,7 @@ "get": { "summary": "Get team membership", "operationId": "teamsGetMembership", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29669,7 +30044,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -29738,7 +30114,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -29823,7 +30200,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -29894,7 +30272,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -29968,9 +30347,7 @@ "get": { "summary": "Get team preferences", "operationId": "teamsGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -29988,7 +30365,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -30047,7 +30425,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -30106,9 +30485,7 @@ "get": { "summary": "List tokens", "operationId": "tokensList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -30126,7 +30503,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -30207,7 +30585,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -30283,9 +30662,7 @@ "get": { "summary": "Get token", "operationId": "tokensGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -30303,7 +30680,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -30364,7 +30742,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -30445,7 +30824,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -30488,9 +30868,7 @@ "get": { "summary": "Get token as JWT", "operationId": "tokensGetJWT", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -30508,7 +30886,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -30551,9 +30930,7 @@ "get": { "summary": "List users", "operationId": "usersList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -30571,7 +30948,8 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "group": "users", + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -30642,7 +31020,8 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "group": "users", + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30736,7 +31115,8 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "group": "users", + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -30826,7 +31206,8 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "group": "users", + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30896,9 +31277,7 @@ "get": { "summary": "List identities", "operationId": "usersListIdentities", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -30916,7 +31295,8 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "group": "identities", + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -30984,7 +31364,8 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "group": "identities", + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -31044,7 +31425,8 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "group": "users", + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -31134,7 +31516,8 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "group": "users", + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -31224,7 +31607,8 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "group": "users", + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -31349,7 +31733,8 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "group": "users", + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31460,7 +31845,8 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "group": "users", + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -31551,9 +31937,7 @@ "get": { "summary": "Get users usage stats", "operationId": "usersGetUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -31571,7 +31955,8 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 275, + "group": null, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -31622,9 +32007,7 @@ "get": { "summary": "Get user", "operationId": "usersGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -31642,7 +32025,8 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "group": "users", + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31695,7 +32079,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "group": "users", + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -31755,7 +32140,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "group": "users", + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -31833,7 +32219,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "group": "sessions", + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -31914,7 +32301,8 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "group": "users", + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -31975,9 +32363,7 @@ "get": { "summary": "List user logs", "operationId": "usersListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -31995,7 +32381,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "group": "logs", + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -32047,9 +32434,7 @@ "get": { "summary": "List user memberships", "operationId": "usersListMemberships", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -32067,7 +32452,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "group": "memberships", + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -32148,7 +32534,8 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "group": "users", + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -32221,7 +32608,8 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "group": "mfa", + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -32274,9 +32662,7 @@ "get": { "summary": "List factors", "operationId": "usersListMfaFactors", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -32294,7 +32680,8 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "group": "mfa", + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -32334,9 +32721,7 @@ "get": { "summary": "Get MFA recovery codes", "operationId": "usersGetMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -32354,7 +32739,8 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "group": "mfa", + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -32390,7 +32776,7 @@ ] }, "put": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "usersUpdateMfaRecoveryCodes", "consumes": [ "application\/json" @@ -32412,7 +32798,8 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "group": "mfa", + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -32470,7 +32857,8 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "group": "mfa", + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -32530,7 +32918,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "group": "users", + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -32608,7 +32997,8 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "group": "users", + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -32686,7 +33076,8 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "group": "users", + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -32744,9 +33135,7 @@ "get": { "summary": "Get user preferences", "operationId": "usersGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -32764,7 +33153,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "group": "users", + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -32822,7 +33212,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "group": "users", + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -32880,9 +33271,7 @@ "get": { "summary": "List user sessions", "operationId": "usersListSessions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -32900,7 +33289,8 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "group": "sessions", + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -32958,7 +33348,8 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "group": "sessions", + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -33011,7 +33402,8 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "group": "sessions", + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -33066,7 +33458,8 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "group": "sessions", + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -33134,7 +33527,8 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "group": "users", + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -33192,9 +33586,7 @@ "get": { "summary": "List user targets", "operationId": "usersListTargets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -33212,7 +33604,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "group": "targets", + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -33283,7 +33676,8 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "group": "targets", + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -33375,9 +33769,7 @@ "get": { "summary": "Get user target", "operationId": "usersGetTarget", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -33395,7 +33787,8 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "group": "targets", + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -33462,7 +33855,8 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "group": "targets", + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -33551,7 +33945,8 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "group": "targets", + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -33620,7 +34015,8 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "group": "sessions", + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -33701,7 +34097,8 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "group": "users", + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33779,7 +34176,8 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "group": "users", + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33857,7 +34255,8 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 279, + "group": "repositories", + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -33933,9 +34332,7 @@ "get": { "summary": "List repositories", "operationId": "vcsListRepositories", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -33953,7 +34350,8 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 280, + "group": "repositories", + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -34033,7 +34431,8 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 281, + "group": "repositories", + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -34097,9 +34496,7 @@ "get": { "summary": "Get repository", "operationId": "vcsGetRepository", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -34117,7 +34514,8 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 282, + "group": "repositories", + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -34164,9 +34562,7 @@ "get": { "summary": "List repository branches", "operationId": "vcsListRepositoryBranches", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -34184,7 +34580,8 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 283, + "group": "repositories", + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -34231,9 +34628,7 @@ "get": { "summary": "Get files and directories of a VCS repository", "operationId": "vcsGetRepositoryContents", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -34251,7 +34646,8 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 278, + "group": "repositories", + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -34305,7 +34701,7 @@ }, "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { "patch": { - "summary": "Authorize external deployment", + "summary": "Update external deployment (authorize)", "operationId": "vcsUpdateExternalDeployments", "consumes": [ "application\/json" @@ -34324,7 +34720,8 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 288, + "group": "repositories", + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -34389,9 +34786,7 @@ "get": { "summary": "List installations", "operationId": "vcsListInstallations", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -34409,7 +34804,8 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 285, + "group": "installations", + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -34461,9 +34857,7 @@ "get": { "summary": "Get installation", "operationId": "vcsGetInstallation", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -34481,7 +34875,8 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 286, + "group": "installations", + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -34533,7 +34928,8 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 287, + "group": "installations", + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -35364,6 +35760,31 @@ "keys" ] }, + "devKeyList": { + "description": "Dev Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of devKeys documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "devKeys": { + "type": "array", + "description": "List of devKeys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/devKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "devKeys" + ] + }, "platformList": { "description": "Platforms List", "type": "object", @@ -39715,6 +40136,15 @@ }, "x-example": {} }, + "devKeys": { + "type": "array", + "description": "List of dev keys.", + "items": { + "type": "object", + "$ref": "#\/definitions\/devKey" + }, + "x-example": {} + }, "smtpEnabled": { "type": "boolean", "description": "Status for custom SMTP", @@ -39898,6 +40328,7 @@ "platforms", "webhooks", "keys", + "devKeys", "smtpEnabled", "smtpSenderName", "smtpSenderEmail", @@ -40088,6 +40519,65 @@ "sdks" ] }, + "devKey": { + "description": "DevKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "Dev API Key" + }, + "expire": { + "type": "string", + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "sdks": { + "type": "array", + "description": "List of SDK user agents that used this key.", + "items": { + "type": "string" + }, + "x-example": "appwrite:flutter" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "expire", + "secret", + "accessedAt", + "sdks" + ] + }, "mockNumber": { "description": "Mock Number", "type": "object", diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index 28c56410fb..dd44d76a76 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -16,6 +16,7 @@ } }, "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" @@ -82,9 +83,7 @@ "get": { "summary": "Get account", "operationId": "accountGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -102,6 +101,7 @@ }, "x-appwrite": { "method": "get", + "group": "account", "weight": 10, "cookies": false, "type": "", @@ -153,6 +153,7 @@ }, "x-appwrite": { "method": "create", + "group": "account", "weight": 9, "cookies": false, "type": "", @@ -243,6 +244,7 @@ }, "x-appwrite": { "method": "updateEmail", + "group": "account", "weight": 35, "cookies": false, "type": "", @@ -303,9 +305,7 @@ "get": { "summary": "List identities", "operationId": "accountListIdentities", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -323,6 +323,7 @@ }, "x-appwrite": { "method": "listIdentities", + "group": "identities", "weight": 58, "cookies": false, "type": "", @@ -385,6 +386,7 @@ }, "x-appwrite": { "method": "deleteIdentity", + "group": "identities", "weight": 59, "cookies": false, "type": "", @@ -448,6 +450,7 @@ }, "x-appwrite": { "method": "createJWT", + "group": "tokens", "weight": 30, "cookies": false, "type": "", @@ -478,9 +481,7 @@ "get": { "summary": "List logs", "operationId": "accountListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -498,6 +499,7 @@ }, "x-appwrite": { "method": "listLogs", + "group": "logs", "weight": 32, "cookies": false, "type": "", @@ -565,6 +567,7 @@ }, "x-appwrite": { "method": "updateMFA", + "group": "mfa", "weight": 45, "cookies": false, "type": "", @@ -638,6 +641,7 @@ }, "x-appwrite": { "method": "createMfaAuthenticator", + "group": "mfa", "weight": 47, "cookies": false, "type": "", @@ -682,7 +686,7 @@ ] }, "put": { - "summary": "Verify authenticator", + "summary": "Update authenticator (confirmation)", "operationId": "accountUpdateMfaAuthenticator", "consumes": [ "application\/json" @@ -704,6 +708,7 @@ }, "x-appwrite": { "method": "updateMfaAuthenticator", + "group": "mfa", "weight": 48, "cookies": false, "type": "", @@ -783,6 +788,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", + "group": "mfa", "weight": 52, "cookies": false, "type": "", @@ -851,6 +857,7 @@ }, "x-appwrite": { "method": "createMfaChallenge", + "group": "mfa", "weight": 53, "cookies": false, "type": "", @@ -905,7 +912,7 @@ ] }, "put": { - "summary": "Create MFA challenge (confirmation)", + "summary": "Update MFA challenge (confirmation)", "operationId": "accountUpdateMfaChallenge", "consumes": [ "application\/json" @@ -927,6 +934,7 @@ }, "x-appwrite": { "method": "updateMfaChallenge", + "group": "mfa", "weight": 54, "cookies": false, "type": "", @@ -987,9 +995,7 @@ "get": { "summary": "List factors", "operationId": "accountListMfaFactors", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1007,6 +1013,7 @@ }, "x-appwrite": { "method": "listMfaFactors", + "group": "mfa", "weight": 46, "cookies": false, "type": "", @@ -1038,11 +1045,9 @@ }, "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get MFA recovery codes", + "summary": "List MFA recovery codes", "operationId": "accountGetMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1060,6 +1065,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", + "group": "mfa", "weight": 51, "cookies": false, "type": "", @@ -1111,6 +1117,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", + "group": "mfa", "weight": 49, "cookies": false, "type": "", @@ -1140,7 +1147,7 @@ ] }, "patch": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "accountUpdateMfaRecoveryCodes", "consumes": [ "application\/json" @@ -1162,6 +1169,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", + "group": "mfa", "weight": 50, "cookies": false, "type": "", @@ -1215,6 +1223,7 @@ }, "x-appwrite": { "method": "updateName", + "group": "account", "weight": 33, "cookies": false, "type": "", @@ -1288,6 +1297,7 @@ }, "x-appwrite": { "method": "updatePassword", + "group": "account", "weight": 34, "cookies": false, "type": "", @@ -1367,6 +1377,7 @@ }, "x-appwrite": { "method": "updatePhone", + "group": "account", "weight": 36, "cookies": false, "type": "", @@ -1427,9 +1438,7 @@ "get": { "summary": "Get account preferences", "operationId": "accountGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1447,6 +1456,7 @@ }, "x-appwrite": { "method": "getPrefs", + "group": "account", "weight": 31, "cookies": false, "type": "", @@ -1498,6 +1508,7 @@ }, "x-appwrite": { "method": "updatePrefs", + "group": "account", "weight": 37, "cookies": false, "type": "", @@ -1571,6 +1582,7 @@ }, "x-appwrite": { "method": "createRecovery", + "group": "recovery", "weight": 39, "cookies": false, "type": "", @@ -1630,7 +1642,7 @@ ] }, "put": { - "summary": "Create password recovery (confirmation)", + "summary": "Update password recovery (confirmation)", "operationId": "accountUpdateRecovery", "consumes": [ "application\/json" @@ -1652,6 +1664,7 @@ }, "x-appwrite": { "method": "updateRecovery", + "group": "recovery", "weight": 40, "cookies": false, "type": "", @@ -1719,9 +1732,7 @@ "get": { "summary": "List sessions", "operationId": "accountListSessions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -1739,6 +1750,7 @@ }, "x-appwrite": { "method": "listSessions", + "group": "sessions", "weight": 12, "cookies": false, "type": "", @@ -1785,6 +1797,7 @@ }, "x-appwrite": { "method": "deleteSessions", + "group": "sessions", "weight": 13, "cookies": false, "type": "", @@ -1838,6 +1851,7 @@ }, "x-appwrite": { "method": "createAnonymousSession", + "group": "sessions", "weight": 18, "cookies": false, "type": "", @@ -1888,6 +1902,7 @@ }, "x-appwrite": { "method": "createEmailPasswordSession", + "group": "sessions", "weight": 17, "cookies": false, "type": "", @@ -1965,6 +1980,7 @@ }, "x-appwrite": { "method": "updateMagicURLSession", + "group": "sessions", "weight": 27, "cookies": false, "type": "", @@ -2042,6 +2058,7 @@ }, "x-appwrite": { "method": "updatePhoneSession", + "group": "sessions", "weight": 28, "cookies": false, "type": "", @@ -2119,6 +2136,7 @@ }, "x-appwrite": { "method": "createSession", + "group": "sessions", "weight": 19, "cookies": false, "type": "", @@ -2176,9 +2194,7 @@ "get": { "summary": "Get session", "operationId": "accountGetSession", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -2196,6 +2212,7 @@ }, "x-appwrite": { "method": "getSession", + "group": "sessions", "weight": 14, "cookies": false, "type": "", @@ -2257,6 +2274,7 @@ }, "x-appwrite": { "method": "updateSession", + "group": "sessions", "weight": 16, "cookies": false, "type": "", @@ -2313,6 +2331,7 @@ }, "x-appwrite": { "method": "deleteSession", + "group": "sessions", "weight": 15, "cookies": false, "type": "", @@ -2376,6 +2395,7 @@ }, "x-appwrite": { "method": "updateStatus", + "group": "account", "weight": 38, "cookies": false, "type": "", @@ -2429,6 +2449,7 @@ }, "x-appwrite": { "method": "createEmailToken", + "group": "tokens", "weight": 26, "cookies": false, "type": "", @@ -2512,6 +2533,7 @@ }, "x-appwrite": { "method": "createMagicURLToken", + "group": "tokens", "weight": 25, "cookies": false, "type": "", @@ -2584,9 +2606,7 @@ "get": { "summary": "Create OAuth2 token", "operationId": "accountCreateOAuth2Token", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "text\/html" ], @@ -2601,6 +2621,7 @@ }, "x-appwrite": { "method": "createOAuth2Token", + "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", @@ -2628,7 +2649,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.", "required": true, "type": "string", "x-example": "amazon", @@ -2647,6 +2668,7 @@ "dropbox", "etsy", "facebook", + "figma", "github", "gitlab", "google", @@ -2736,6 +2758,7 @@ }, "x-appwrite": { "method": "createPhoneToken", + "group": "tokens", "weight": 29, "cookies": false, "type": "", @@ -2816,6 +2839,7 @@ }, "x-appwrite": { "method": "createVerification", + "group": "verification", "weight": 41, "cookies": false, "type": "", @@ -2865,7 +2889,7 @@ ] }, "put": { - "summary": "Create email verification (confirmation)", + "summary": "Update email verification (confirmation)", "operationId": "accountUpdateVerification", "consumes": [ "application\/json" @@ -2887,6 +2911,7 @@ }, "x-appwrite": { "method": "updateVerification", + "group": "verification", "weight": 42, "cookies": false, "type": "", @@ -2967,6 +2992,7 @@ }, "x-appwrite": { "method": "createPhoneVerification", + "group": "verification", "weight": 43, "cookies": false, "type": "", @@ -3021,6 +3047,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", + "group": "verification", "weight": 44, "cookies": false, "type": "", @@ -3081,9 +3108,7 @@ "get": { "summary": "Get browser icon", "operationId": "avatarsGetBrowser", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3101,6 +3126,7 @@ }, "x-appwrite": { "method": "getBrowser", + "group": null, "weight": 61, "cookies": false, "type": "location", @@ -3209,9 +3235,7 @@ "get": { "summary": "Get credit card icon", "operationId": "avatarsGetCreditCard", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3229,6 +3253,7 @@ }, "x-appwrite": { "method": "getCreditCard", + "group": null, "weight": 60, "cookies": false, "type": "location", @@ -3343,9 +3368,7 @@ "get": { "summary": "Get favicon", "operationId": "avatarsGetFavicon", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -3363,6 +3386,7 @@ }, "x-appwrite": { "method": "getFavicon", + "group": null, "weight": 64, "cookies": false, "type": "location", @@ -3409,9 +3433,7 @@ "get": { "summary": "Get country flag", "operationId": "avatarsGetFlag", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -3429,6 +3451,7 @@ }, "x-appwrite": { "method": "getFlag", + "group": null, "weight": 62, "cookies": false, "type": "location", @@ -3899,9 +3922,7 @@ "get": { "summary": "Get image from URL", "operationId": "avatarsGetImage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -3919,6 +3940,7 @@ }, "x-appwrite": { "method": "getImage", + "group": null, "weight": 63, "cookies": false, "type": "location", @@ -3985,9 +4007,7 @@ "get": { "summary": "Get user initials", "operationId": "avatarsGetInitials", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4005,6 +4025,7 @@ }, "x-appwrite": { "method": "getInitials", + "group": null, "weight": 66, "cookies": false, "type": "location", @@ -4079,9 +4100,7 @@ "get": { "summary": "Get QR code", "operationId": "avatarsGetQR", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/png" ], @@ -4099,6 +4118,7 @@ }, "x-appwrite": { "method": "getQR", + "group": null, "weight": 65, "cookies": false, "type": "location", @@ -4173,9 +4193,7 @@ "get": { "summary": "List databases", "operationId": "databasesList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4193,6 +4211,7 @@ }, "x-appwrite": { "method": "list", + "group": "databases", "weight": 71, "cookies": false, "type": "", @@ -4265,6 +4284,7 @@ }, "x-appwrite": { "method": "create", + "group": "databases", "weight": 70, "cookies": false, "type": "", @@ -4329,9 +4349,7 @@ "get": { "summary": "Get database", "operationId": "databasesGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4349,6 +4367,7 @@ }, "x-appwrite": { "method": "get", + "group": "databases", "weight": 72, "cookies": false, "type": "", @@ -4408,6 +4427,7 @@ }, "x-appwrite": { "method": "update", + "group": "databases", "weight": 74, "cookies": false, "type": "", @@ -4486,6 +4506,7 @@ }, "x-appwrite": { "method": "delete", + "group": "databases", "weight": 75, "cookies": false, "type": "", @@ -4527,9 +4548,7 @@ "get": { "summary": "List collections", "operationId": "databasesListCollections", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4547,6 +4566,7 @@ }, "x-appwrite": { "method": "listCollections", + "group": "collections", "weight": 77, "cookies": false, "type": "", @@ -4627,6 +4647,7 @@ }, "x-appwrite": { "method": "createCollection", + "group": "collections", "weight": 76, "cookies": false, "type": "", @@ -4714,9 +4735,7 @@ "get": { "summary": "Get collection", "operationId": "databasesGetCollection", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4734,6 +4753,7 @@ }, "x-appwrite": { "method": "getCollection", + "group": "collections", "weight": 78, "cookies": false, "type": "", @@ -4801,6 +4821,7 @@ }, "x-appwrite": { "method": "updateCollection", + "group": "collections", "weight": 80, "cookies": false, "type": "", @@ -4902,6 +4923,7 @@ }, "x-appwrite": { "method": "deleteCollection", + "group": "collections", "weight": 81, "cookies": false, "type": "", @@ -4951,9 +4973,7 @@ "get": { "summary": "List attributes", "operationId": "databasesListAttributes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -4971,6 +4991,7 @@ }, "x-appwrite": { "method": "listAttributes", + "group": "attributes", "weight": 92, "cookies": false, "type": "", @@ -5052,6 +5073,7 @@ }, "x-appwrite": { "method": "createBooleanAttribute", + "group": "attributes", "weight": 89, "cookies": false, "type": "", @@ -5158,6 +5180,7 @@ }, "x-appwrite": { "method": "updateBooleanAttribute", + "group": "attributes", "weight": 101, "cookies": false, "type": "", @@ -5266,6 +5289,7 @@ }, "x-appwrite": { "method": "createDatetimeAttribute", + "group": "attributes", "weight": 90, "cookies": false, "type": "", @@ -5372,6 +5396,7 @@ }, "x-appwrite": { "method": "updateDatetimeAttribute", + "group": "attributes", "weight": 102, "cookies": false, "type": "", @@ -5480,6 +5505,7 @@ }, "x-appwrite": { "method": "createEmailAttribute", + "group": "attributes", "weight": 83, "cookies": false, "type": "", @@ -5586,6 +5612,7 @@ }, "x-appwrite": { "method": "updateEmailAttribute", + "group": "attributes", "weight": 95, "cookies": false, "type": "", @@ -5694,6 +5721,7 @@ }, "x-appwrite": { "method": "createEnumAttribute", + "group": "attributes", "weight": 84, "cookies": false, "type": "", @@ -5810,6 +5838,7 @@ }, "x-appwrite": { "method": "updateEnumAttribute", + "group": "attributes", "weight": 96, "cookies": false, "type": "", @@ -5928,6 +5957,7 @@ }, "x-appwrite": { "method": "createFloatAttribute", + "group": "attributes", "weight": 88, "cookies": false, "type": "", @@ -6046,6 +6076,7 @@ }, "x-appwrite": { "method": "updateFloatAttribute", + "group": "attributes", "weight": 100, "cookies": false, "type": "", @@ -6166,6 +6197,7 @@ }, "x-appwrite": { "method": "createIntegerAttribute", + "group": "attributes", "weight": 87, "cookies": false, "type": "", @@ -6284,6 +6316,7 @@ }, "x-appwrite": { "method": "updateIntegerAttribute", + "group": "attributes", "weight": 99, "cookies": false, "type": "", @@ -6404,6 +6437,7 @@ }, "x-appwrite": { "method": "createIpAttribute", + "group": "attributes", "weight": 85, "cookies": false, "type": "", @@ -6510,6 +6544,7 @@ }, "x-appwrite": { "method": "updateIpAttribute", + "group": "attributes", "weight": 97, "cookies": false, "type": "", @@ -6618,6 +6653,7 @@ }, "x-appwrite": { "method": "createRelationshipAttribute", + "group": "attributes", "weight": 91, "cookies": false, "type": "", @@ -6751,6 +6787,7 @@ }, "x-appwrite": { "method": "createStringAttribute", + "group": "attributes", "weight": 82, "cookies": false, "type": "", @@ -6870,6 +6907,7 @@ }, "x-appwrite": { "method": "updateStringAttribute", + "group": "attributes", "weight": 94, "cookies": false, "type": "", @@ -6984,6 +7022,7 @@ }, "x-appwrite": { "method": "createUrlAttribute", + "group": "attributes", "weight": 86, "cookies": false, "type": "", @@ -7090,6 +7129,7 @@ }, "x-appwrite": { "method": "updateUrlAttribute", + "group": "attributes", "weight": 98, "cookies": false, "type": "", @@ -7178,9 +7218,7 @@ "get": { "summary": "Get attribute", "operationId": "databasesGetAttribute", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7229,6 +7267,7 @@ }, "x-appwrite": { "method": "getAttribute", + "group": "attributes", "weight": 93, "cookies": false, "type": "", @@ -7298,6 +7337,7 @@ }, "x-appwrite": { "method": "deleteAttribute", + "group": "attributes", "weight": 104, "cookies": false, "type": "", @@ -7374,6 +7414,7 @@ }, "x-appwrite": { "method": "updateRelationshipAttribute", + "group": "attributes", "weight": 103, "cookies": false, "type": "", @@ -7458,9 +7499,7 @@ "get": { "summary": "List documents", "operationId": "databasesListDocuments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7478,6 +7517,7 @@ }, "x-appwrite": { "method": "listDocuments", + "group": "documents", "weight": 110, "cookies": false, "type": "", @@ -7561,6 +7601,7 @@ }, "x-appwrite": { "method": "createDocument", + "group": "documents", "weight": 109, "cookies": false, "type": "", @@ -7648,9 +7689,7 @@ "get": { "summary": "Get document", "operationId": "databasesGetDocument", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7668,6 +7707,7 @@ }, "x-appwrite": { "method": "getDocument", + "group": "documents", "weight": 111, "cookies": false, "type": "", @@ -7759,6 +7799,7 @@ }, "x-appwrite": { "method": "updateDocument", + "group": "documents", "weight": 113, "cookies": false, "type": "", @@ -7857,6 +7898,7 @@ }, "x-appwrite": { "method": "deleteDocument", + "group": "documents", "weight": 114, "cookies": false, "type": "", @@ -7918,9 +7960,7 @@ "get": { "summary": "List indexes", "operationId": "databasesListIndexes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -7938,6 +7978,7 @@ }, "x-appwrite": { "method": "listIndexes", + "group": "indexes", "weight": 106, "cookies": false, "type": "", @@ -8017,6 +8058,7 @@ }, "x-appwrite": { "method": "createIndex", + "group": "collections", "weight": 105, "cookies": false, "type": "", @@ -8117,9 +8159,7 @@ "get": { "summary": "Get index", "operationId": "databasesGetIndex", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8137,6 +8177,7 @@ }, "x-appwrite": { "method": "getIndex", + "group": "indexes", "weight": 107, "cookies": false, "type": "", @@ -8206,6 +8247,7 @@ }, "x-appwrite": { "method": "deleteIndex", + "group": "indexes", "weight": 108, "cookies": false, "type": "", @@ -8262,9 +8304,7 @@ "get": { "summary": "List functions", "operationId": "functionsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8282,7 +8322,8 @@ }, "x-appwrite": { "method": "list", - "weight": 368, + "group": "functions", + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -8354,7 +8395,8 @@ }, "x-appwrite": { "method": "create", - "weight": 365, + "group": "functions", + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8585,9 +8627,7 @@ "get": { "summary": "List runtimes", "operationId": "functionsListRuntimes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8605,7 +8645,8 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 370, + "group": "runtimes", + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -8636,9 +8677,7 @@ "get": { "summary": "List specifications", "operationId": "functionsListSpecifications", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8656,7 +8695,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 371, + "group": "runtimes", + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -8688,9 +8728,7 @@ "get": { "summary": "Get function", "operationId": "functionsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -8708,7 +8746,8 @@ }, "x-appwrite": { "method": "get", - "weight": 366, + "group": "functions", + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8767,7 +8806,8 @@ }, "x-appwrite": { "method": "update", - "weight": 367, + "group": "functions", + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9012,7 +9052,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 369, + "group": "functions", + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9073,7 +9114,8 @@ }, "x-appwrite": { "method": "updateFunctionDeployment", - "weight": 374, + "group": "functions", + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9132,9 +9174,7 @@ "get": { "summary": "List deployments", "operationId": "functionsListDeployments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9152,7 +9192,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 375, + "group": "deployments", + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9232,7 +9273,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 372, + "group": "deployments", + "weight": 376, "cookies": false, "type": "upload", "deprecated": false, @@ -9324,7 +9366,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 380, + "group": "deployments", + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -9409,7 +9452,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 377, + "group": "deployments", + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9515,7 +9559,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 378, + "group": "deployments", + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9593,9 +9638,7 @@ "get": { "summary": "Get deployment", "operationId": "functionsGetDeployment", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9613,7 +9656,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 373, + "group": "deployments", + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9675,7 +9719,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 376, + "group": "deployments", + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9722,11 +9767,9 @@ }, "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "functionsGetDeploymentDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -9744,7 +9787,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 379, + "group": "deployments", + "weight": 383, "cookies": false, "type": "location", "deprecated": false, @@ -9830,7 +9874,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 381, + "group": "deployments", + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9879,9 +9924,7 @@ "get": { "summary": "List executions", "operationId": "functionsListExecutions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -9899,7 +9942,8 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 384, + "group": "executions", + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9974,7 +10018,8 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 382, + "group": "executions", + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -10074,9 +10119,7 @@ "get": { "summary": "Get execution", "operationId": "functionsGetExecution", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10094,7 +10137,8 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 383, + "group": "executions", + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -10160,7 +10204,8 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 385, + "group": "executions", + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10209,9 +10254,7 @@ "get": { "summary": "List variables", "operationId": "functionsListVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10229,7 +10272,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 390, + "group": "variables", + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -10288,7 +10332,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 388, + "group": "variables", + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10360,9 +10405,7 @@ "get": { "summary": "Get variable", "operationId": "functionsGetVariable", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10380,7 +10423,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 389, + "group": "variables", + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10447,7 +10491,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 391, + "group": "variables", + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10539,7 +10584,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 392, + "group": "variables", + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10608,7 +10654,8 @@ }, "x-appwrite": { "method": "query", - "weight": 303, + "group": "graphql", + "weight": 302, "cookies": false, "type": "graphql", "deprecated": false, @@ -10683,7 +10730,8 @@ }, "x-appwrite": { "method": "mutation", - "weight": 302, + "group": "graphql", + "weight": 301, "cookies": false, "type": "graphql", "deprecated": false, @@ -10738,9 +10786,7 @@ "get": { "summary": "Get HTTP", "operationId": "healthGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10758,6 +10804,7 @@ }, "x-appwrite": { "method": "get", + "group": "health", "weight": 126, "cookies": false, "type": "", @@ -10789,9 +10836,7 @@ "get": { "summary": "Get antivirus", "operationId": "healthGetAntivirus", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10809,7 +10854,8 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "group": "health", + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10840,9 +10886,7 @@ "get": { "summary": "Get cache", "operationId": "healthGetCache", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10860,6 +10904,7 @@ }, "x-appwrite": { "method": "getCache", + "group": "health", "weight": 129, "cookies": false, "type": "", @@ -10891,9 +10936,7 @@ "get": { "summary": "Get the SSL certificate for a domain", "operationId": "healthGetCertificate", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10911,6 +10954,7 @@ }, "x-appwrite": { "method": "getCertificate", + "group": "health", "weight": 134, "cookies": false, "type": "", @@ -10951,9 +10995,7 @@ "get": { "summary": "Get DB", "operationId": "healthGetDB", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -10971,6 +11013,7 @@ }, "x-appwrite": { "method": "getDB", + "group": "health", "weight": 128, "cookies": false, "type": "", @@ -11002,9 +11045,7 @@ "get": { "summary": "Get pubsub", "operationId": "healthGetPubSub", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11022,6 +11063,7 @@ }, "x-appwrite": { "method": "getPubSub", + "group": "health", "weight": 130, "cookies": false, "type": "", @@ -11053,9 +11095,7 @@ "get": { "summary": "Get builds queue", "operationId": "healthGetQueueBuilds", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11073,6 +11113,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", + "group": "queue", "weight": 136, "cookies": false, "type": "", @@ -11115,9 +11156,7 @@ "get": { "summary": "Get certificates queue", "operationId": "healthGetQueueCertificates", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11135,6 +11174,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", + "group": "queue", "weight": 135, "cookies": false, "type": "", @@ -11177,9 +11217,7 @@ "get": { "summary": "Get databases queue", "operationId": "healthGetQueueDatabases", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11197,6 +11235,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", + "group": "queue", "weight": 137, "cookies": false, "type": "", @@ -11248,9 +11287,7 @@ "get": { "summary": "Get deletes queue", "operationId": "healthGetQueueDeletes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11268,6 +11305,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", + "group": "queue", "weight": 138, "cookies": false, "type": "", @@ -11310,9 +11348,7 @@ "get": { "summary": "Get number of failed queue jobs", "operationId": "healthGetFailedJobs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11330,7 +11366,8 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "group": "queue", + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11370,7 +11407,6 @@ "v1-functions", "v1-stats-resources", "v1-stats-usage", - "v1-stats-usage-dump", "v1-webhooks", "v1-certificates", "v1-builds", @@ -11397,9 +11433,7 @@ "get": { "summary": "Get functions queue", "operationId": "healthGetQueueFunctions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11417,6 +11451,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", + "group": "queue", "weight": 142, "cookies": false, "type": "", @@ -11459,9 +11494,7 @@ "get": { "summary": "Get logs queue", "operationId": "healthGetQueueLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11479,6 +11512,7 @@ }, "x-appwrite": { "method": "getQueueLogs", + "group": "queue", "weight": 133, "cookies": false, "type": "", @@ -11521,9 +11555,7 @@ "get": { "summary": "Get mails queue", "operationId": "healthGetQueueMails", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11541,6 +11573,7 @@ }, "x-appwrite": { "method": "getQueueMails", + "group": "queue", "weight": 139, "cookies": false, "type": "", @@ -11583,9 +11616,7 @@ "get": { "summary": "Get messaging queue", "operationId": "healthGetQueueMessaging", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11603,6 +11634,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", + "group": "queue", "weight": 140, "cookies": false, "type": "", @@ -11645,9 +11677,7 @@ "get": { "summary": "Get migrations queue", "operationId": "healthGetQueueMigrations", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11665,6 +11695,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", + "group": "queue", "weight": 141, "cookies": false, "type": "", @@ -11707,9 +11738,7 @@ "get": { "summary": "Get stats resources queue", "operationId": "healthGetQueueStatsResources", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11727,6 +11756,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", + "group": "queue", "weight": 143, "cookies": false, "type": "", @@ -11769,9 +11799,7 @@ "get": { "summary": "Get stats usage queue", "operationId": "healthGetQueueUsage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11789,6 +11817,7 @@ }, "x-appwrite": { "method": "getQueueUsage", + "group": "queue", "weight": 144, "cookies": false, "type": "", @@ -11827,75 +11856,11 @@ ] } }, - "\/health\/queue\/stats-usage-dump": { - "get": { - "summary": "Get usage dump queue", - "operationId": "healthGetQueueStatsUsageDump", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "health" - ], - "description": "Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { - "$ref": "#\/definitions\/healthQueue" - } - } - }, - "x-appwrite": { - "method": "getQueueStatsUsageDump", - "weight": 145, - "cookies": false, - "type": "", - "deprecated": false, - "demo": "health\/get-queue-stats-usage-dump.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "type": "integer", - "format": "int32", - "default": 5000, - "in": "query" - } - ] - } - }, "\/health\/queue\/webhooks": { "get": { "summary": "Get webhooks queue", "operationId": "healthGetQueueWebhooks", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11913,6 +11878,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", + "group": "queue", "weight": 132, "cookies": false, "type": "", @@ -11955,9 +11921,7 @@ "get": { "summary": "Get storage", "operationId": "healthGetStorage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -11975,7 +11939,8 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "group": "storage", + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12006,9 +11971,7 @@ "get": { "summary": "Get local storage", "operationId": "healthGetStorageLocal", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12026,7 +11989,8 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "group": "storage", + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12057,9 +12021,7 @@ "get": { "summary": "Get time", "operationId": "healthGetTime", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12077,6 +12039,7 @@ }, "x-appwrite": { "method": "getTime", + "group": "health", "weight": 131, "cookies": false, "type": "", @@ -12108,9 +12071,7 @@ "get": { "summary": "Get user locale", "operationId": "localeGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12128,6 +12089,7 @@ }, "x-appwrite": { "method": "get", + "group": null, "weight": 118, "cookies": false, "type": "", @@ -12163,9 +12125,7 @@ "get": { "summary": "List locale codes", "operationId": "localeListCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12183,6 +12143,7 @@ }, "x-appwrite": { "method": "listCodes", + "group": null, "weight": 119, "cookies": false, "type": "", @@ -12218,9 +12179,7 @@ "get": { "summary": "List continents", "operationId": "localeListContinents", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12238,6 +12197,7 @@ }, "x-appwrite": { "method": "listContinents", + "group": null, "weight": 123, "cookies": false, "type": "", @@ -12273,9 +12233,7 @@ "get": { "summary": "List countries", "operationId": "localeListCountries", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12293,6 +12251,7 @@ }, "x-appwrite": { "method": "listCountries", + "group": null, "weight": 120, "cookies": false, "type": "", @@ -12328,9 +12287,7 @@ "get": { "summary": "List EU countries", "operationId": "localeListCountriesEU", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12348,6 +12305,7 @@ }, "x-appwrite": { "method": "listCountriesEU", + "group": null, "weight": 121, "cookies": false, "type": "", @@ -12383,9 +12341,7 @@ "get": { "summary": "List countries phone codes", "operationId": "localeListCountriesPhones", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12403,6 +12359,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", + "group": null, "weight": 122, "cookies": false, "type": "", @@ -12438,9 +12395,7 @@ "get": { "summary": "List currencies", "operationId": "localeListCurrencies", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12458,6 +12413,7 @@ }, "x-appwrite": { "method": "listCurrencies", + "group": null, "weight": 124, "cookies": false, "type": "", @@ -12493,9 +12449,7 @@ "get": { "summary": "List languages", "operationId": "localeListLanguages", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12513,6 +12467,7 @@ }, "x-appwrite": { "method": "listLanguages", + "group": null, "weight": 125, "cookies": false, "type": "", @@ -12548,9 +12503,7 @@ "get": { "summary": "List messages", "operationId": "messagingListMessages", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -12568,7 +12521,8 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 357, + "group": "messages", + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -12643,7 +12597,8 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 354, + "group": "messages", + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -12801,7 +12756,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 361, + "group": "messages", + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12956,7 +12912,8 @@ }, "x-appwrite": { "method": "createPush", - "weight": 356, + "group": "messages", + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -13151,7 +13108,8 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 363, + "group": "messages", + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13345,7 +13303,8 @@ }, "x-appwrite": { "method": "createSms", - "weight": 355, + "group": "messages", + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -13463,7 +13422,8 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 362, + "group": "messages", + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13559,9 +13519,7 @@ "get": { "summary": "Get message", "operationId": "messagingGetMessage", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13579,7 +13537,8 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 360, + "group": "messages", + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13634,7 +13593,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 364, + "group": "messages", + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13676,9 +13636,7 @@ "get": { "summary": "List message logs", "operationId": "messagingListMessageLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13696,7 +13654,8 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 358, + "group": "logs", + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13750,9 +13709,7 @@ "get": { "summary": "List message targets", "operationId": "messagingListTargets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13770,7 +13727,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 359, + "group": "messages", + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13824,9 +13782,7 @@ "get": { "summary": "List providers", "operationId": "messagingListProviders", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -13844,7 +13800,8 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 329, + "group": "providers", + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -13919,7 +13876,8 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 328, + "group": "providers", + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -14034,7 +13992,8 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 341, + "group": "providers", + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -14147,7 +14106,8 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 327, + "group": "providers", + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -14238,7 +14198,8 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 340, + "group": "providers", + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -14327,7 +14288,8 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 319, + "group": "providers", + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -14454,7 +14416,8 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 332, + "group": "providers", + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14579,7 +14542,8 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 322, + "group": "providers", + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -14682,7 +14646,8 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 335, + "group": "providers", + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -14783,7 +14748,8 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 320, + "group": "providers", + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -14898,7 +14864,8 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 333, + "group": "providers", + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15011,7 +14978,8 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 321, + "group": "providers", + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -15170,7 +15138,8 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 334, + "group": "providers", + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -15326,7 +15295,8 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 323, + "group": "providers", + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15429,7 +15399,8 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 336, + "group": "providers", + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -15530,7 +15501,8 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 324, + "group": "providers", + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -15633,7 +15605,8 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 337, + "group": "providers", + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15734,7 +15707,8 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 325, + "group": "providers", + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15837,7 +15811,8 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 338, + "group": "providers", + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15938,7 +15913,8 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 326, + "group": "providers", + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -16041,7 +16017,8 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 339, + "group": "providers", + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16122,9 +16099,7 @@ "get": { "summary": "Get provider", "operationId": "messagingGetProvider", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16142,7 +16117,8 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 331, + "group": "providers", + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -16197,7 +16173,8 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 342, + "group": "providers", + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -16239,9 +16216,7 @@ "get": { "summary": "List provider logs", "operationId": "messagingListProviderLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16259,7 +16234,8 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 330, + "group": "providers", + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16313,9 +16289,7 @@ "get": { "summary": "List subscriber logs", "operationId": "messagingListSubscriberLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16333,7 +16307,8 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 351, + "group": "subscribers", + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -16387,9 +16362,7 @@ "get": { "summary": "List topics", "operationId": "messagingListTopics", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16407,7 +16380,8 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 344, + "group": "topics", + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -16480,7 +16454,8 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 343, + "group": "topics", + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16550,9 +16525,7 @@ "get": { "summary": "Get topic", "operationId": "messagingGetTopic", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16570,7 +16543,8 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 346, + "group": "topics", + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16630,7 +16604,8 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 347, + "group": "topics", + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16709,7 +16684,8 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 348, + "group": "topics", + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16751,9 +16727,7 @@ "get": { "summary": "List topic logs", "operationId": "messagingListTopicLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16771,7 +16745,8 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 345, + "group": "topics", + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -16825,9 +16800,7 @@ "get": { "summary": "List subscribers", "operationId": "messagingListSubscribers", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -16845,7 +16818,8 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 350, + "group": "subscribers", + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16926,7 +16900,8 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 349, + "group": "subscribers", + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16997,9 +16972,7 @@ "get": { "summary": "Get subscriber", "operationId": "messagingGetSubscriber", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17017,7 +16990,8 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 352, + "group": "subscribers", + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17080,7 +17054,8 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 353, + "group": "subscribers", + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17134,9 +17109,7 @@ "get": { "summary": "List sites", "operationId": "sitesList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17154,7 +17127,8 @@ }, "x-appwrite": { "method": "list", - "weight": 397, + "group": "sites", + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -17226,7 +17200,8 @@ }, "x-appwrite": { "method": "create", - "weight": 395, + "group": "sites", + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -17472,9 +17447,7 @@ "get": { "summary": "List frameworks", "operationId": "sitesListFrameworks", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17492,7 +17465,8 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 400, + "group": "frameworks", + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17523,9 +17497,7 @@ "get": { "summary": "List specifications", "operationId": "sitesListSpecifications", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17543,7 +17515,8 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 423, + "group": "frameworks", + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -17575,9 +17548,7 @@ "get": { "summary": "Get site", "operationId": "sitesGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -17595,7 +17566,8 @@ }, "x-appwrite": { "method": "get", - "weight": 396, + "group": "sites", + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -17654,7 +17626,8 @@ }, "x-appwrite": { "method": "update", - "weight": 398, + "group": "sites", + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -17913,7 +17886,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 399, + "group": "sites", + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17974,7 +17948,8 @@ }, "x-appwrite": { "method": "updateSiteDeployment", - "weight": 406, + "group": "sites", + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18033,9 +18008,7 @@ "get": { "summary": "List deployments", "operationId": "sitesListDeployments", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18053,7 +18026,8 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 405, + "group": "deployments", + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -18133,7 +18107,8 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 401, + "group": "deployments", + "weight": 405, "cookies": false, "type": "upload", "deprecated": false, @@ -18233,7 +18208,8 @@ }, "x-appwrite": { "method": "createDuplicateDeployment", - "weight": 409, + "group": "deployments", + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18312,7 +18288,8 @@ }, "x-appwrite": { "method": "createTemplateDeployment", - "weight": 402, + "group": "deployments", + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -18418,7 +18395,8 @@ }, "x-appwrite": { "method": "createVcsDeployment", - "weight": 403, + "group": "deployments", + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -18497,9 +18475,7 @@ "get": { "summary": "Get deployment", "operationId": "sitesGetDeployment", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18517,7 +18493,8 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 404, + "group": "deployments", + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -18579,7 +18556,8 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 407, + "group": "deployments", + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18626,11 +18604,9 @@ }, "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { "get": { - "summary": "Download deployment", + "summary": "Get deployment download", "operationId": "sitesGetDeploymentDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -18648,7 +18624,8 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 408, + "group": "deployments", + "weight": 412, "cookies": false, "type": "location", "deprecated": false, @@ -18734,7 +18711,8 @@ }, "x-appwrite": { "method": "updateDeploymentStatus", - "weight": 410, + "group": "deployments", + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18783,9 +18761,7 @@ "get": { "summary": "List logs", "operationId": "sitesListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18803,7 +18779,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 412, + "group": "logs", + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -18856,9 +18833,7 @@ "get": { "summary": "Get log", "operationId": "sitesGetLog", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -18876,7 +18851,8 @@ }, "x-appwrite": { "method": "getLog", - "weight": 411, + "group": "logs", + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18940,7 +18916,8 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 413, + "group": "logs", + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18989,9 +18966,7 @@ "get": { "summary": "List variables", "operationId": "sitesListVariables", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19009,7 +18984,8 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 416, + "group": "variables", + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -19068,7 +19044,8 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 414, + "group": "variables", + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -19140,9 +19117,7 @@ "get": { "summary": "Get variable", "operationId": "sitesGetVariable", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19160,7 +19135,8 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 415, + "group": "variables", + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -19227,7 +19203,8 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 417, + "group": "variables", + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -19319,7 +19296,8 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 418, + "group": "variables", + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -19368,9 +19346,7 @@ "get": { "summary": "List buckets", "operationId": "storageListBuckets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19388,7 +19364,8 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "group": "buckets", + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19460,7 +19437,8 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "group": "buckets", + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19579,9 +19557,7 @@ "get": { "summary": "Get bucket", "operationId": "storageGetBucket", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19599,7 +19575,8 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "group": "buckets", + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -19658,7 +19635,8 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "group": "buckets", + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -19791,7 +19769,8 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "group": "buckets", + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19832,9 +19811,7 @@ "get": { "summary": "List files", "operationId": "storageListFiles", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -19852,7 +19829,8 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "group": "files", + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19936,7 +19914,8 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "group": "files", + "weight": 207, "cookies": false, "type": "upload", "deprecated": false, @@ -20009,9 +19988,7 @@ "get": { "summary": "Get file", "operationId": "storageGetFile", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -20029,7 +20006,8 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "group": "files", + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -20100,7 +20078,8 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "group": "files", + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -20190,7 +20169,8 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "group": "files", + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -20243,9 +20223,7 @@ "get": { "summary": "Get file for download", "operationId": "storageGetFileDownload", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -20263,7 +20241,8 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "group": "files", + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -20316,9 +20295,7 @@ "get": { "summary": "Get file preview", "operationId": "storageGetFilePreview", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "image\/*" ], @@ -20336,7 +20313,8 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "group": "files", + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -20517,9 +20495,7 @@ "get": { "summary": "Get file for view", "operationId": "storageGetFileView", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "*\/*" ], @@ -20537,7 +20513,8 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "group": "files", + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -20590,9 +20567,7 @@ "get": { "summary": "List teams", "operationId": "teamsList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -20610,7 +20585,8 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "group": "teams", + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20686,7 +20662,8 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "group": "teams", + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20759,9 +20736,7 @@ "get": { "summary": "Get team", "operationId": "teamsGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -20779,7 +20754,8 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "group": "teams", + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -20842,7 +20818,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "group": "teams", + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20918,7 +20895,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "group": "teams", + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -20963,9 +20941,7 @@ "get": { "summary": "List team memberships", "operationId": "teamsListMemberships", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -20983,7 +20959,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "group": "memberships", + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -21067,7 +21044,8 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "group": "memberships", + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -21163,9 +21141,7 @@ "get": { "summary": "Get team membership", "operationId": "teamsGetMembership", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21183,7 +21159,8 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "group": "memberships", + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -21254,7 +21231,8 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "group": "memberships", + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -21341,7 +21319,8 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "group": "memberships", + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -21414,7 +21393,8 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "group": "memberships", + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21490,9 +21470,7 @@ "get": { "summary": "Get team preferences", "operationId": "teamsGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21510,7 +21488,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "group": "teams", + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -21571,7 +21550,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "group": "teams", + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -21632,9 +21612,7 @@ "get": { "summary": "List tokens", "operationId": "tokensList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21652,7 +21630,8 @@ }, "x-appwrite": { "method": "list", - "weight": 432, + "group": "files", + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -21735,7 +21714,8 @@ }, "x-appwrite": { "method": "createFileToken", - "weight": 429, + "group": "files", + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -21813,9 +21793,7 @@ "get": { "summary": "Get token", "operationId": "tokensGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -21833,7 +21811,8 @@ }, "x-appwrite": { "method": "get", - "weight": 430, + "group": "tokens", + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -21896,7 +21875,8 @@ }, "x-appwrite": { "method": "update", - "weight": 433, + "group": "tokens", + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -21979,7 +21959,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 434, + "group": "tokens", + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -22024,9 +22005,7 @@ "get": { "summary": "Get token as JWT", "operationId": "tokensGetJWT", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -22044,7 +22023,8 @@ }, "x-appwrite": { "method": "getJWT", - "weight": 431, + "group": "tokens", + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -22089,9 +22069,7 @@ "get": { "summary": "List users", "operationId": "usersList", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -22109,7 +22087,8 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "group": "users", + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -22181,7 +22160,8 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "group": "users", + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -22276,7 +22256,8 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "group": "users", + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -22367,7 +22348,8 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "group": "users", + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -22438,9 +22420,7 @@ "get": { "summary": "List identities", "operationId": "usersListIdentities", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -22458,7 +22438,8 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "group": "identities", + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -22527,7 +22508,8 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "group": "identities", + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -22588,7 +22570,8 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "group": "users", + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -22679,7 +22662,8 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "group": "users", + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22770,7 +22754,8 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "group": "users", + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22896,7 +22881,8 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "group": "users", + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -23008,7 +22994,8 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "group": "users", + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -23100,9 +23087,7 @@ "get": { "summary": "Get user", "operationId": "usersGet", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23120,7 +23105,8 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "group": "users", + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -23174,7 +23160,8 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "group": "users", + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -23235,7 +23222,8 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "group": "users", + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -23314,7 +23302,8 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "group": "sessions", + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -23396,7 +23385,8 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "group": "users", + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -23458,9 +23448,7 @@ "get": { "summary": "List user logs", "operationId": "usersListLogs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23478,7 +23466,8 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "group": "logs", + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -23531,9 +23520,7 @@ "get": { "summary": "List user memberships", "operationId": "usersListMemberships", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23551,7 +23538,8 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "group": "memberships", + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23633,7 +23621,8 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "group": "users", + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -23707,7 +23696,8 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "group": "mfa", + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23761,9 +23751,7 @@ "get": { "summary": "List factors", "operationId": "usersListMfaFactors", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23781,7 +23769,8 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "group": "mfa", + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23822,9 +23811,7 @@ "get": { "summary": "Get MFA recovery codes", "operationId": "usersGetMfaRecoveryCodes", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -23842,7 +23829,8 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "group": "mfa", + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23879,7 +23867,7 @@ ] }, "put": { - "summary": "Regenerate MFA recovery codes", + "summary": "Update MFA recovery codes (regenerate)", "operationId": "usersUpdateMfaRecoveryCodes", "consumes": [ "application\/json" @@ -23901,7 +23889,8 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "group": "mfa", + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23960,7 +23949,8 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "group": "mfa", + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -24021,7 +24011,8 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "group": "users", + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -24100,7 +24091,8 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "group": "users", + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -24179,7 +24171,8 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "group": "users", + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -24238,9 +24231,7 @@ "get": { "summary": "Get user preferences", "operationId": "usersGetPrefs", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24258,7 +24249,8 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "group": "users", + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -24317,7 +24309,8 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "group": "users", + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -24376,9 +24369,7 @@ "get": { "summary": "List user sessions", "operationId": "usersListSessions", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24396,7 +24387,8 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "group": "sessions", + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -24455,7 +24447,8 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "group": "sessions", + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24509,7 +24502,8 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "group": "sessions", + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -24565,7 +24559,8 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "group": "sessions", + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24634,7 +24629,8 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "group": "users", + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -24693,9 +24689,7 @@ "get": { "summary": "List user targets", "operationId": "usersListTargets", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24713,7 +24707,8 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "group": "targets", + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -24785,7 +24780,8 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "group": "targets", + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -24878,9 +24874,7 @@ "get": { "summary": "Get user target", "operationId": "usersGetTarget", - "consumes": [ - "application\/json" - ], + "consumes": [], "produces": [ "application\/json" ], @@ -24898,7 +24892,8 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "group": "targets", + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -24966,7 +24961,8 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "group": "targets", + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -25056,7 +25052,8 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "group": "targets", + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -25126,7 +25123,8 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "group": "sessions", + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -25208,7 +25206,8 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "group": "users", + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -25287,7 +25286,8 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "group": "users", + "weight": 252, "cookies": false, "type": "", "deprecated": false, diff --git a/docs/examples/1.7.x/client-android/java/account/create-anonymous-session.md b/docs/examples/1.7.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..d6701b73b9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/create-email-password-session.md b/docs/examples/1.7.x/client-android/java/account/create-email-password-session.md new file mode 100644 index 0000000000..e4fd10f7ab --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-email-token.md b/docs/examples/1.7.x/client-android/java/account/create-email-token.md new file mode 100644 index 0000000000..0ac6af9e92 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-j-w-t.md b/docs/examples/1.7.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..3b345d565e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-android/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..99bda5fca9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-android/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..b56dc25553 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-android/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..52ff649c54 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..b309b23962 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/create-o-auth2session.md b/docs/examples/1.7.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..f57987ec70 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-o-auth2token.md b/docs/examples/1.7.x/client-android/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..f2cc31c6e9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-phone-token.md b/docs/examples/1.7.x/client-android/java/account/create-phone-token.md new file mode 100644 index 0000000000..ed95722a75 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-phone-verification.md b/docs/examples/1.7.x/client-android/java/account/create-phone-verification.md new file mode 100644 index 0000000000..cb476b7f0c --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/create-push-target.md b/docs/examples/1.7.x/client-android/java/account/create-push-target.md new file mode 100644 index 0000000000..f74bdac8a1 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-push-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPushTarget( + "", // targetId + "", // identifier + "", // providerId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-recovery.md b/docs/examples/1.7.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..c2aa85125f --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-recovery.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-session.md b/docs/examples/1.7.x/client-android/java/account/create-session.md new file mode 100644 index 0000000000..738758288b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create-verification.md b/docs/examples/1.7.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..99ce677903 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/create.md b/docs/examples/1.7.x/client-android/java/account/create.md new file mode 100644 index 0000000000..1334c04c60 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.create( + "", // userId + "email@example.com", // email + "", // password + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/delete-identity.md b/docs/examples/1.7.x/client-android/java/account/delete-identity.md new file mode 100644 index 0000000000..2777a1a917 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/delete-identity.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteIdentity( + "", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-android/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..5f482178f2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/delete-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/delete-push-target.md b/docs/examples/1.7.x/client-android/java/account/delete-push-target.md new file mode 100644 index 0000000000..0aab16ffb3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/delete-push-target.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deletePushTarget( + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/delete-session.md b/docs/examples/1.7.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..23e69eebef --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/delete-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/delete-sessions.md b/docs/examples/1.7.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..20bb6ca0b6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0ce7552080 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/get-prefs.md b/docs/examples/1.7.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..d04ac73f07 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/get-prefs.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/get-session.md b/docs/examples/1.7.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..c328b8f418 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/get-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/get.md b/docs/examples/1.7.x/client-android/java/account/get.md new file mode 100644 index 0000000000..ba92db3af9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/list-identities.md b/docs/examples/1.7.x/client-android/java/account/list-identities.md new file mode 100644 index 0000000000..8b3162dde9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/list-identities.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/list-logs.md b/docs/examples/1.7.x/client-android/java/account/list-logs.md new file mode 100644 index 0000000000..5cabdc20e6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/list-logs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/list-mfa-factors.md b/docs/examples/1.7.x/client-android/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..f162b1a548 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/list-mfa-factors.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/list-sessions.md b/docs/examples/1.7.x/client-android/java/account/list-sessions.md new file mode 100644 index 0000000000..93f6659e4d --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/list-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/update-email.md b/docs/examples/1.7.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..68606a52ee --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-email.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-m-f-a.md b/docs/examples/1.7.x/client-android/java/account/update-m-f-a.md new file mode 100644 index 0000000000..a9a9615684 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-m-f-a.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-android/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..ee192d99d8 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-android/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..a8dcd4c06a --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-android/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ff791de8d4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaChallenge( + "", // challengeId + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7d527bb15d --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/update-name.md b/docs/examples/1.7.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..3aa542c30d --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-name.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateName( + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-password.md b/docs/examples/1.7.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..fcab4a7a08 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-password.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-phone-session.md b/docs/examples/1.7.x/client-android/java/account/update-phone-session.md new file mode 100644 index 0000000000..82b0b76ba2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-phone-verification.md b/docs/examples/1.7.x/client-android/java/account/update-phone-verification.md new file mode 100644 index 0000000000..385e7be090 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-phone-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-phone.md b/docs/examples/1.7.x/client-android/java/account/update-phone.md new file mode 100644 index 0000000000..dc9d9c54cd --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-phone.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-prefs.md b/docs/examples/1.7.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..5d7c373925 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-push-target.md b/docs/examples/1.7.x/client-android/java/account/update-push-target.md new file mode 100644 index 0000000000..a07d6fc2c5 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-push-target.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePushTarget( + "", // targetId + "", // identifier + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-recovery.md b/docs/examples/1.7.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..d1db4826cc --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateRecovery( + "", // userId + "", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-session.md b/docs/examples/1.7.x/client-android/java/account/update-session.md new file mode 100644 index 0000000000..436a1ffa31 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/account/update-status.md b/docs/examples/1.7.x/client-android/java/account/update-status.md new file mode 100644 index 0000000000..f443f31f90 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-status.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/account/update-verification.md b/docs/examples/1.7.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..6cb5c1989e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/account/update-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-browser.md b/docs/examples/1.7.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..bba908e6e3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md b/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..3a7d7188a3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-favicon.md b/docs/examples/1.7.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..4b0b68835f --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-flag.md b/docs/examples/1.7.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..7ff46c1fba --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-image.md b/docs/examples/1.7.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..1357fe75a3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-image.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-initials.md b/docs/examples/1.7.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..21dca6dc29 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-q-r.md b/docs/examples/1.7.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..f1e037333b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/create-document.md b/docs/examples/1.7.x/client-android/java/databases/create-document.md new file mode 100644 index 0000000000..ab9e9e7a47 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/create-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/delete-document.md b/docs/examples/1.7.x/client-android/java/databases/delete-document.md new file mode 100644 index 0000000000..6745a14f43 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/delete-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/get-document.md b/docs/examples/1.7.x/client-android/java/databases/get-document.md new file mode 100644 index 0000000000..764aa9d129 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/get-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/list-documents.md b/docs/examples/1.7.x/client-android/java/databases/list-documents.md new file mode 100644 index 0000000000..63a6d06650 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/list-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.listDocuments( + "", // databaseId + "", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/update-document.md b/docs/examples/1.7.x/client-android/java/databases/update-document.md new file mode 100644 index 0000000000..553071e5dd --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/update-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/functions/create-execution.md b/docs/examples/1.7.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..e2939a3bef --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/functions/create-execution.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.createExecution( + "", // functionId + "", // body (optional) + false, // async (optional) + "", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/functions/get-execution.md b/docs/examples/1.7.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..62fb0cbff7 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/functions/get-execution.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.getExecution( + "", // functionId + "", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/functions/list-executions.md b/docs/examples/1.7.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..e0e493a82b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/functions/list-executions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.listExecutions( + "", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/graphql/mutation.md b/docs/examples/1.7.x/client-android/java/graphql/mutation.md new file mode 100644 index 0000000000..71aff99f17 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/graphql/mutation.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/graphql/query.md b/docs/examples/1.7.x/client-android/java/graphql/query.md new file mode 100644 index 0000000000..cdeab026ef --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/graphql/query.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/locale/get.md b/docs/examples/1.7.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..637cce3814 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-codes.md b/docs/examples/1.7.x/client-android/java/locale/list-codes.md new file mode 100644 index 0000000000..e9501f30f2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-continents.md b/docs/examples/1.7.x/client-android/java/locale/list-continents.md new file mode 100644 index 0000000000..e5490b4df5 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-continents.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-android/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..ebe03da12d --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-countries-phones.md b/docs/examples/1.7.x/client-android/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..88d4658f6c --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-countries.md b/docs/examples/1.7.x/client-android/java/locale/list-countries.md new file mode 100644 index 0000000000..8b21d51951 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-countries.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-currencies.md b/docs/examples/1.7.x/client-android/java/locale/list-currencies.md new file mode 100644 index 0000000000..90410636f8 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-currencies.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/locale/list-languages.md b/docs/examples/1.7.x/client-android/java/locale/list-languages.md new file mode 100644 index 0000000000..5422406661 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/locale/list-languages.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.7.x/client-android/java/messaging/create-subscriber.md b/docs/examples/1.7.x/client-android/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..56e9b5007b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/messaging/create-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "", // topicId + "", // subscriberId + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-android/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..db84709330 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/messaging/delete-subscriber.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "", // topicId + "", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/create-file.md b/docs/examples/1.7.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..13880bc80a --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/create-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.createFile( + "", // bucketId + "", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/delete-file.md b/docs/examples/1.7.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..e5765cdcf4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/delete-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.deleteFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-download.md b/docs/examples/1.7.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..eab66e02de --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileDownload( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md b/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..afa89f169b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFilePreview( + "", // bucketId + "", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-view.md b/docs/examples/1.7.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..7069338f1b --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileView( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file.md b/docs/examples/1.7.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..f5e06b8c82 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/get-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/list-files.md b/docs/examples/1.7.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..05a35c17cc --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/list-files.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.listFiles( + "", // bucketId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/storage/update-file.md b/docs/examples/1.7.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..c3daafea15 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/storage/update-file.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.updateFile( + "", // bucketId + "", // fileId + "", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/create-membership.md b/docs/examples/1.7.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..3b7a426158 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/create-membership.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createMembership( + "", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/create.md b/docs/examples/1.7.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..70d1b5f071 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/create.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.create( + "", // teamId + "", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/delete-membership.md b/docs/examples/1.7.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..7141a3cc6e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/delete.md b/docs/examples/1.7.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..53d4576c8f --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.delete( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/get-membership.md b/docs/examples/1.7.x/client-android/java/teams/get-membership.md new file mode 100644 index 0000000000..5067ccd86f --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/get-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/get-prefs.md b/docs/examples/1.7.x/client-android/java/teams/get-prefs.md new file mode 100644 index 0000000000..a464fe65a4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/get-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getPrefs( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/get.md b/docs/examples/1.7.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..80974fe007 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.get( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/list-memberships.md b/docs/examples/1.7.x/client-android/java/teams/list-memberships.md new file mode 100644 index 0000000000..a92bcf743e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/list-memberships.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listMemberships( + "", // teamId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/list.md b/docs/examples/1.7.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..1b3c00d3dd --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/list.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/update-membership-status.md b/docs/examples/1.7.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..b42005c37d --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "", // teamId + "", // membershipId + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/update-membership.md b/docs/examples/1.7.x/client-android/java/teams/update-membership.md new file mode 100644 index 0000000000..d9293712a2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/update-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembership( + "", // teamId + "", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/update-name.md b/docs/examples/1.7.x/client-android/java/teams/update-name.md new file mode 100644 index 0000000000..9104767be4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateName( + "", // teamId + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/teams/update-prefs.md b/docs/examples/1.7.x/client-android/java/teams/update-prefs.md new file mode 100644 index 0000000000..9932b706af --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/teams/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updatePrefs( + "", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/create-file-token.md b/docs/examples/1.7.x/client-android/java/tokens/create-file-token.md new file mode 100644 index 0000000000..938249bdf1 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/create-file-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "", // bucketId + "", // fileId + "", // expire (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/delete.md b/docs/examples/1.7.x/client-android/java/tokens/delete.md new file mode 100644 index 0000000000..5746eb1575 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.delete( + "", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-android/java/tokens/get-j-w-t.md new file mode 100644 index 0000000000..26c2f2f338 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/get-j-w-t.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.getJWT( + "", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/get.md b/docs/examples/1.7.x/client-android/java/tokens/get.md new file mode 100644 index 0000000000..3c78a7634e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.get( + "", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/list.md b/docs/examples/1.7.x/client-android/java/tokens/list.md new file mode 100644 index 0000000000..2d156f79e0 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.list( + "", // bucketId + "", // fileId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/tokens/update.md b/docs/examples/1.7.x/client-android/java/tokens/update.md new file mode 100644 index 0000000000..c07cfc308e --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/tokens/update.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tokens tokens = new Tokens(client); + +tokens.update( + "", // tokenId + "", // expire (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-anonymous-session.md b/docs/examples/1.7.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..61c2872ff0 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createAnonymousSession() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-email-password-session.md b/docs/examples/1.7.x/client-android/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..6ed5bc1949 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailPasswordSession( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-email-token.md b/docs/examples/1.7.x/client-android/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..b51fc137ba --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailToken( + userId = "", + email = "email@example.com", + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-j-w-t.md b/docs/examples/1.7.x/client-android/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..c997dc87df --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createJWT() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-android/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..42df9ac59b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMagicURLToken( + userId = "", + email = "email@example.com", + url = "https://example.com", // (optional) + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..a9686b7bdd --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..287c505ac2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL, +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..9ba769b617 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2session.md b/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2session.md new file mode 100644 index 0000000000..7801bc0af2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2session.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Session( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2token.md b/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..d7c6f99d93 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-phone-token.md b/docs/examples/1.7.x/client-android/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..513eb8c0b3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneToken( + userId = "", + phone = "+12065550100", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-phone-verification.md b/docs/examples/1.7.x/client-android/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..33ff8df7da --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneVerification() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-push-target.md b/docs/examples/1.7.x/client-android/kotlin/account/create-push-target.md new file mode 100644 index 0000000000..a8a3a1e893 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-push-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPushTarget( + targetId = "", + identifier = "", + providerId = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-recovery.md b/docs/examples/1.7.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..b18708b33f --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createRecovery( + email = "email@example.com", + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-session.md b/docs/examples/1.7.x/client-android/kotlin/account/create-session.md new file mode 100644 index 0000000000..363d69ed84 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create-verification.md b/docs/examples/1.7.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 0000000000..89a678f104 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createVerification( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/create.md b/docs/examples/1.7.x/client-android/kotlin/account/create.md new file mode 100644 index 0000000000..6d1f3302d6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.create( + userId = "", + email = "email@example.com", + password = "", + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/delete-identity.md b/docs/examples/1.7.x/client-android/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..6266352358 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/delete-identity.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteIdentity( + identityId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-android/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..60cb198bdc --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/delete-push-target.md b/docs/examples/1.7.x/client-android/kotlin/account/delete-push-target.md new file mode 100644 index 0000000000..41d1e9ff00 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/delete-push-target.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deletePushTarget( + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/delete-session.md b/docs/examples/1.7.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 0000000000..e579c3dcca --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/delete-sessions.md b/docs/examples/1.7.x/client-android/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..52bee983e3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSessions() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..72149cad1d --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/get-prefs.md b/docs/examples/1.7.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..f529957245 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getPrefs() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/get-session.md b/docs/examples/1.7.x/client-android/kotlin/account/get-session.md new file mode 100644 index 0000000000..e5aa1723d6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/get.md b/docs/examples/1.7.x/client-android/kotlin/account/get.md new file mode 100644 index 0000000000..1476b9191e --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.get() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/list-identities.md b/docs/examples/1.7.x/client-android/kotlin/account/list-identities.md new file mode 100644 index 0000000000..e7ec0f600b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/list-identities.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listIdentities( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/list-logs.md b/docs/examples/1.7.x/client-android/kotlin/account/list-logs.md new file mode 100644 index 0000000000..6782643a17 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/list-logs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listLogs( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/list-mfa-factors.md b/docs/examples/1.7.x/client-android/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..c14962df7d --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listMfaFactors() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/list-sessions.md b/docs/examples/1.7.x/client-android/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..b3cbdaea98 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/list-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listSessions() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-email.md b/docs/examples/1.7.x/client-android/kotlin/account/update-email.md new file mode 100644 index 0000000000..5f7cd831b4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmail( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-m-f-a.md b/docs/examples/1.7.x/client-android/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..6e1057e996 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFA( + mfa = false, +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-android/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..9c36d91120 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMagicURLSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..8ec8a37c43 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..2f605f22e7 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaChallenge( + challengeId = "", + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..ba290ac5c9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-name.md b/docs/examples/1.7.x/client-android/kotlin/account/update-name.md new file mode 100644 index 0000000000..982f448e97 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateName( + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-password.md b/docs/examples/1.7.x/client-android/kotlin/account/update-password.md new file mode 100644 index 0000000000..caeeb5ca6c --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePassword( + password = "", + oldPassword = "password", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-phone-session.md b/docs/examples/1.7.x/client-android/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..34cd8a4330 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-phone-verification.md b/docs/examples/1.7.x/client-android/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..ef8596885e --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-phone.md b/docs/examples/1.7.x/client-android/kotlin/account/update-phone.md new file mode 100644 index 0000000000..1d1c8ade6b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-phone.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhone( + phone = "+12065550100", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-prefs.md b/docs/examples/1.7.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..766bf60de7 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePrefs( + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-push-target.md b/docs/examples/1.7.x/client-android/kotlin/account/update-push-target.md new file mode 100644 index 0000000000..6a8c8649ee --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-push-target.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePushTarget( + targetId = "", + identifier = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-recovery.md b/docs/examples/1.7.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..02146ae78b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateRecovery( + userId = "", + secret = "", + password = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-session.md b/docs/examples/1.7.x/client-android/kotlin/account/update-session.md new file mode 100644 index 0000000000..4faa308e4b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-status.md b/docs/examples/1.7.x/client-android/kotlin/account/update-status.md new file mode 100644 index 0000000000..a3c68bb876 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateStatus() diff --git a/docs/examples/1.7.x/client-android/kotlin/account/update-verification.md b/docs/examples/1.7.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 0000000000..a10b4e5c80 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..2024724ee9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // (optional) + height = 0, // (optional) + quality = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..3f6c57933e --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // (optional) + height = 0, // (optional) + quality = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-favicon.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..4e5cbc27c7 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..2e295267c5 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // (optional) + height = 0, // (optional) + quality = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-image.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..946668384f --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // (optional) + height = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-initials.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..0fc0e425d4 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "", // (optional) + width = 0, // (optional) + height = 0, // (optional) + background = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-q-r.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..979a9cc465 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "", + size = 1, // (optional) + margin = 0, // (optional) + download = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.7.x/client-android/kotlin/databases/create-document.md new file mode 100644 index 0000000000..37db7a5375 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/create-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/delete-document.md b/docs/examples/1.7.x/client-android/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..3046c16c29 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/delete-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/get-document.md b/docs/examples/1.7.x/client-android/kotlin/databases/get-document.md new file mode 100644 index 0000000000..75efad8bba --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/get-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/list-documents.md b/docs/examples/1.7.x/client-android/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..bfe4689faa --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/list-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/update-document.md b/docs/examples/1.7.x/client-android/kotlin/databases/update-document.md new file mode 100644 index 0000000000..c03b3afdcc --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/update-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.7.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..9625d33bc6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.createExecution( + functionId = "", + body = "", // (optional) + async = false, // (optional) + path = "", // (optional) + method = ExecutionMethod.GET, // (optional) + headers = mapOf( "a" to "b" ), // (optional) + scheduledAt = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/functions/get-execution.md b/docs/examples/1.7.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..1784b4203c --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.getExecution( + functionId = "", + executionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/functions/list-executions.md b/docs/examples/1.7.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..86138aae22 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.listExecutions( + functionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/graphql/mutation.md b/docs/examples/1.7.x/client-android/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..7eea6708db --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/graphql/mutation.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.mutation( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/graphql/query.md b/docs/examples/1.7.x/client-android/kotlin/graphql/query.md new file mode 100644 index 0000000000..63d70ae5d2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/graphql/query.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.query( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/get.md b/docs/examples/1.7.x/client-android/kotlin/locale/get.md new file mode 100644 index 0000000000..ebff44a4ea --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.get() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-codes.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..e4094c956f --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCodes() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-continents.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..8ab1e6cdea --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-continents.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listContinents() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..581e139362 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesEU() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-phones.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..78e7ee0963 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesPhones() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-countries.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..1fef20fd32 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-countries.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountries() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-currencies.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..e2ed289c3f --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-currencies.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCurrencies() diff --git a/docs/examples/1.7.x/client-android/kotlin/locale/list-languages.md b/docs/examples/1.7.x/client-android/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..b48f34a447 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/locale/list-languages.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listLanguages() diff --git a/docs/examples/1.7.x/client-android/kotlin/messaging/create-subscriber.md b/docs/examples/1.7.x/client-android/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..792eeef542 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.createSubscriber( + topicId = "", + subscriberId = "", + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-android/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..509d523f92 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.deleteSubscriber( + topicId = "", + subscriberId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/create-file.md b/docs/examples/1.7.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 0000000000..bd17f8bbbb --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.createFile( + bucketId = "", + fileId = "", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/delete-file.md b/docs/examples/1.7.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..be90d8e504 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.deleteFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..9ada63538a --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..1ee2e0822d --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "", + fileId = "", + width = 0, // (optional) + height = 0, // (optional) + gravity = ImageGravity.CENTER, // (optional) + quality = 0, // (optional) + borderWidth = 0, // (optional) + borderColor = "", // (optional) + borderRadius = 0, // (optional) + opacity = 0, // (optional) + rotation = -360, // (optional) + background = "", // (optional) + output = ImageFormat.JPG, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..8b8cd008bc --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 0000000000..0e43ca63a8 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/list-files.md b/docs/examples/1.7.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 0000000000..249a9d5d90 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.listFiles( + bucketId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/update-file.md b/docs/examples/1.7.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 0000000000..ec8241712b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.updateFile( + bucketId = "", + fileId = "", + name = "", // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/create-membership.md b/docs/examples/1.7.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..0c64f9ff1b --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createMembership( + teamId = "", + roles = listOf(), + email = "email@example.com", // (optional) + userId = "", // (optional) + phone = "+12065550100", // (optional) + url = "https://example.com", // (optional) + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/create.md b/docs/examples/1.7.x/client-android/kotlin/teams/create.md new file mode 100644 index 0000000000..9842dfb461 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/create.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.create( + teamId = "", + name = "", + roles = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/delete-membership.md b/docs/examples/1.7.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..49670acac5 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/delete.md b/docs/examples/1.7.x/client-android/kotlin/teams/delete.md new file mode 100644 index 0000000000..0c9381a189 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.delete( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/get-membership.md b/docs/examples/1.7.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..d802c21d77 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/get-prefs.md b/docs/examples/1.7.x/client-android/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..0e6402f52f --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getPrefs( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/get.md b/docs/examples/1.7.x/client-android/kotlin/teams/get.md new file mode 100644 index 0000000000..a61dbacbd6 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.get( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/list-memberships.md b/docs/examples/1.7.x/client-android/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..bdffc5ede1 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/list-memberships.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listMemberships( + teamId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/list.md b/docs/examples/1.7.x/client-android/kotlin/teams/list.md new file mode 100644 index 0000000000..089d7890a9 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.list( + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/update-membership-status.md b/docs/examples/1.7.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..ff6b28bb75 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembershipStatus( + teamId = "", + membershipId = "", + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/update-membership.md b/docs/examples/1.7.x/client-android/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..e142e36020 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/update-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembership( + teamId = "", + membershipId = "", + roles = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/update-name.md b/docs/examples/1.7.x/client-android/kotlin/teams/update-name.md new file mode 100644 index 0000000000..209fda5093 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateName( + teamId = "", + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/teams/update-prefs.md b/docs/examples/1.7.x/client-android/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..3225f2f0c2 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/teams/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updatePrefs( + teamId = "", + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/create-file-token.md b/docs/examples/1.7.x/client-android/kotlin/tokens/create-file-token.md new file mode 100644 index 0000000000..38922dbca1 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.createFileToken( + bucketId = "", + fileId = "", + expire = "", // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/delete.md b/docs/examples/1.7.x/client-android/kotlin/tokens/delete.md new file mode 100644 index 0000000000..4f48fd6d3e --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.delete( + tokenId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-android/kotlin/tokens/get-j-w-t.md new file mode 100644 index 0000000000..d041c98072 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.getJWT( + tokenId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/get.md b/docs/examples/1.7.x/client-android/kotlin/tokens/get.md new file mode 100644 index 0000000000..3e094a10e0 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.get( + tokenId = "", +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/list.md b/docs/examples/1.7.x/client-android/kotlin/tokens/list.md new file mode 100644 index 0000000000..d9d0d5bff7 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.list( + bucketId = "", + fileId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/tokens/update.md b/docs/examples/1.7.x/client-android/kotlin/tokens/update.md new file mode 100644 index 0000000000..e615001f2c --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/tokens/update.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client(context) + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tokens = Tokens(client) + +val result = tokens.update( + tokenId = "", + expire = "", // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..9de3b937b1 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-apple/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..0e5e7cf083 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-email-token.md b/docs/examples/1.7.x/client-apple/examples/account/create-email-token.md new file mode 100644 index 0000000000..164956349e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-apple/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..20bc4049f7 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-apple/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..b2a0d89e93 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..cc8abefa4b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..a141428071 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8aad30b34c --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9e12c25923 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2session.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Session( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..c36e27119f --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-apple/examples/account/create-phone-token.md new file mode 100644 index 0000000000..8d8e36c07d --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "", + phone: "+12065550100" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-apple/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..b0048d7c46 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-push-target.md b/docs/examples/1.7.x/client-apple/examples/account/create-push-target.md new file mode 100644 index 0000000000..8ededd4a73 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-push-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.createPushTarget( + targetId: "", + identifier: "", + providerId: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-recovery.md b/docs/examples/1.7.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 0000000000..db7e609669 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-session.md b/docs/examples/1.7.x/client-apple/examples/account/create-session.md new file mode 100644 index 0000000000..cfa44adbe8 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create-verification.md b/docs/examples/1.7.x/client-apple/examples/account/create-verification.md new file mode 100644 index 0000000000..c18c43c51a --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/create.md b/docs/examples/1.7.x/client-apple/examples/account/create.md new file mode 100644 index 0000000000..3e67824361 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "", + email: "email@example.com", + password: "", + name: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/delete-identity.md b/docs/examples/1.7.x/client-apple/examples/account/delete-identity.md new file mode 100644 index 0000000000..435f09dcb9 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-apple/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..1acab2f891 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-apple/examples/account/delete-push-target.md new file mode 100644 index 0000000000..78e817ab9d --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/delete-push-target.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deletePushTarget( + targetId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/delete-session.md b/docs/examples/1.7.x/client-apple/examples/account/delete-session.md new file mode 100644 index 0000000000..15334d8d05 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-apple/examples/account/delete-sessions.md new file mode 100644 index 0000000000..ef63be1c1b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-apple/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..ba8fd85713 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/get-prefs.md b/docs/examples/1.7.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 0000000000..6afa77260b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/get-session.md b/docs/examples/1.7.x/client-apple/examples/account/get-session.md new file mode 100644 index 0000000000..e09672647f --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/get-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/get.md b/docs/examples/1.7.x/client-apple/examples/account/get.md new file mode 100644 index 0000000000..f508ea90ad --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/list-identities.md b/docs/examples/1.7.x/client-apple/examples/account/list-identities.md new file mode 100644 index 0000000000..ccb8e0e252 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/list-logs.md b/docs/examples/1.7.x/client-apple/examples/account/list-logs.md new file mode 100644 index 0000000000..fe3be76010 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-apple/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..77ef37c09c --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/list-sessions.md b/docs/examples/1.7.x/client-apple/examples/account/list-sessions.md new file mode 100644 index 0000000000..8bdb34b1da --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-email.md b/docs/examples/1.7.x/client-apple/examples/account/update-email.md new file mode 100644 index 0000000000..7925843595 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-email.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-apple/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..4ed35ceb4f --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-apple/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..6f4ede1c91 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b9f7310e14 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..5ea75eabf6 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "", + otp: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..ddd1dc454e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-name.md b/docs/examples/1.7.x/client-apple/examples/account/update-name.md new file mode 100644 index 0000000000..122b82a6d5 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-name.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateName( + name: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-password.md b/docs/examples/1.7.x/client-apple/examples/account/update-password.md new file mode 100644 index 0000000000..935e13bbf6 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-password.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-apple/examples/account/update-phone-session.md new file mode 100644 index 0000000000..bdd4c1a9dd --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-apple/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..771dccc913 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-phone.md b/docs/examples/1.7.x/client-apple/examples/account/update-phone.md new file mode 100644 index 0000000000..bf9e86887b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-prefs.md b/docs/examples/1.7.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 0000000000..6b4e13cda8 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-push-target.md b/docs/examples/1.7.x/client-apple/examples/account/update-push-target.md new file mode 100644 index 0000000000..4840779f00 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-push-target.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.updatePushTarget( + targetId: "", + identifier: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-recovery.md b/docs/examples/1.7.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 0000000000..933fe14724 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "", + secret: "", + password: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-session.md b/docs/examples/1.7.x/client-apple/examples/account/update-session.md new file mode 100644 index 0000000000..bcc22a5cfa --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-status.md b/docs/examples/1.7.x/client-apple/examples/account/update-status.md new file mode 100644 index 0000000000..5ac79ad3d1 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-status.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.7.x/client-apple/examples/account/update-verification.md b/docs/examples/1.7.x/client-apple/examples/account/update-verification.md new file mode 100644 index 0000000000..dabfc8f6da --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e2ab08cb7e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..67555903f6 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..32406eb319 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 0000000000..7191077b82 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-image.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 0000000000..a604af4e11 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e5e7b8f143 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..970aedb34e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/create-document.md b/docs/examples/1.7.x/client-apple/examples/databases/create-document.md new file mode 100644 index 0000000000..0f70687b59 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/create-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/delete-document.md b/docs/examples/1.7.x/client-apple/examples/databases/delete-document.md new file mode 100644 index 0000000000..1b74b355fa --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/get-document.md b/docs/examples/1.7.x/client-apple/examples/databases/get-document.md new file mode 100644 index 0000000000..4113887c28 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/list-documents.md b/docs/examples/1.7.x/client-apple/examples/databases/list-documents.md new file mode 100644 index 0000000000..27b8177875 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "", + collectionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/update-document.md b/docs/examples/1.7.x/client-apple/examples/databases/update-document.md new file mode 100644 index 0000000000..4d359a50ca --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.7.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 0000000000..09934549e9 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "", + body: "", // optional + async: false, // optional + path: "", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/functions/get-execution.md b/docs/examples/1.7.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 0000000000..39fd98827e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "", + executionId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/functions/list-executions.md b/docs/examples/1.7.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 0000000000..6a329e240b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/graphql/mutation.md b/docs/examples/1.7.x/client-apple/examples/graphql/mutation.md new file mode 100644 index 0000000000..3252a610ac --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/graphql/query.md b/docs/examples/1.7.x/client-apple/examples/graphql/query.md new file mode 100644 index 0000000000..f33b285ca7 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/graphql/query.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/get.md b/docs/examples/1.7.x/client-apple/examples/locale/get.md new file mode 100644 index 0000000000..b06fc69e8d --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-codes.md b/docs/examples/1.7.x/client-apple/examples/locale/list-codes.md new file mode 100644 index 0000000000..34adfe101f --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-continents.md b/docs/examples/1.7.x/client-apple/examples/locale/list-continents.md new file mode 100644 index 0000000000..5eb044668e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-apple/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..0aecd53d86 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-apple/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..19960c26d0 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-countries.md b/docs/examples/1.7.x/client-apple/examples/locale/list-countries.md new file mode 100644 index 0000000000..856b81487e --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-apple/examples/locale/list-currencies.md new file mode 100644 index 0000000000..ff7804de66 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.7.x/client-apple/examples/locale/list-languages.md b/docs/examples/1.7.x/client-apple/examples/locale/list-languages.md new file mode 100644 index 0000000000..a121cec03b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.7.x/client-apple/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-apple/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..8515bc55a1 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "", + subscriberId: "", + targetId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-apple/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..4debf1dbb7 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "", + subscriberId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/create-file.md b/docs/examples/1.7.x/client-apple/examples/storage/create-file.md new file mode 100644 index 0000000000..cf3e59f502 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "", + fileId: "", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/delete-file.md b/docs/examples/1.7.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 0000000000..955e109e50 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 0000000000..a344e4d5b6 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..542fca58d8 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "", + fileId: "", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: 0, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9368e795fa --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file.md new file mode 100644 index 0000000000..6b0d29849b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/list-files.md b/docs/examples/1.7.x/client-apple/examples/storage/list-files.md new file mode 100644 index 0000000000..ea5ed630d7 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/storage/update-file.md b/docs/examples/1.7.x/client-apple/examples/storage/update-file.md new file mode 100644 index 0000000000..20c1051c5b --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "", + fileId: "", + name: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/create-membership.md b/docs/examples/1.7.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 0000000000..b1ab9345fa --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "", + roles: [], + email: "email@example.com", // optional + userId: "", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/create.md b/docs/examples/1.7.x/client-apple/examples/teams/create.md new file mode 100644 index 0000000000..c8396f6512 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "", + name: "", + roles: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5bf49f57ab --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/delete.md b/docs/examples/1.7.x/client-apple/examples/teams/delete.md new file mode 100644 index 0000000000..402cc36234 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/delete.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/get-membership.md b/docs/examples/1.7.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 0000000000..cf00961282 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-apple/examples/teams/get-prefs.md new file mode 100644 index 0000000000..025730d384 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/get.md b/docs/examples/1.7.x/client-apple/examples/teams/get.md new file mode 100644 index 0000000000..f39825e8fe --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/get.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-apple/examples/teams/list-memberships.md new file mode 100644 index 0000000000..59f1bfb013 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/list.md b/docs/examples/1.7.x/client-apple/examples/teams/list.md new file mode 100644 index 0000000000..f5cc77cd06 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/list.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c1b74de4da --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/update-membership.md b/docs/examples/1.7.x/client-apple/examples/teams/update-membership.md new file mode 100644 index 0000000000..71f7b254fa --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "", + membershipId: "", + roles: [] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/update-name.md b/docs/examples/1.7.x/client-apple/examples/teams/update-name.md new file mode 100644 index 0000000000..bf0afbb7e8 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "", + name: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-apple/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e6ee52e580 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "", + prefs: [:] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-apple/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..2aa6b13f51 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let resourceToken = try await tokens.createFileToken( + bucketId: "", + fileId: "", + expire: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/delete.md b/docs/examples/1.7.x/client-apple/examples/tokens/delete.md new file mode 100644 index 0000000000..8ec83f34e5 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let result = try await tokens.delete( + tokenId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-apple/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..a5986a6c3d --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/get-j-w-t.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let jwt = try await tokens.getJWT( + tokenId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/get.md b/docs/examples/1.7.x/client-apple/examples/tokens/get.md new file mode 100644 index 0000000000..732e28f76a --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/get.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let resourceToken = try await tokens.get( + tokenId: "" +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/list.md b/docs/examples/1.7.x/client-apple/examples/tokens/list.md new file mode 100644 index 0000000000..c4f72f6f9a --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let resourceTokenList = try await tokens.list( + bucketId: "", + fileId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/client-apple/examples/tokens/update.md b/docs/examples/1.7.x/client-apple/examples/tokens/update.md new file mode 100644 index 0000000000..ff0d7256d1 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/tokens/update.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tokens = Tokens(client) + +let resourceToken = try await tokens.update( + tokenId: "", + expire: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..9b62daefcb --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-flutter/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..461a37c356 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-email-token.md b/docs/examples/1.7.x/client-flutter/examples/account/create-email-token.md new file mode 100644 index 0000000000..3a070d6680 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '', + email: 'email@example.com', + phrase: false, // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-flutter/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..b9882876d7 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-flutter/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..87d6438e31 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..0e88344a7f --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..c641666125 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..bd370773c1 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..72f82fac90 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Session( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..7e6ba92955 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-flutter/examples/account/create-phone-token.md new file mode 100644 index 0000000000..95db5f122d --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '', + phone: '+12065550100', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-flutter/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..9f01fd53ef --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-push-target.md b/docs/examples/1.7.x/client-flutter/examples/account/create-push-target.md new file mode 100644 index 0000000000..1ac2279b1b --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-push-target.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.createPushTarget( + targetId: '', + identifier: '', + providerId: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-recovery.md b/docs/examples/1.7.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 0000000000..77b3a095c5 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-session.md b/docs/examples/1.7.x/client-flutter/examples/account/create-session.md new file mode 100644 index 0000000000..889564d43f --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create-verification.md b/docs/examples/1.7.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 0000000000..ecc931f418 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create-verification.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/create.md b/docs/examples/1.7.x/client-flutter/examples/account/create.md new file mode 100644 index 0000000000..35143c8c0c --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '', + email: 'email@example.com', + password: '', + name: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/delete-identity.md b/docs/examples/1.7.x/client-flutter/examples/account/delete-identity.md new file mode 100644 index 0000000000..25c8a6bdec --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/delete-identity.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-flutter/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..01cd63d1be --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-flutter/examples/account/delete-push-target.md new file mode 100644 index 0000000000..e74f7883ce --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/delete-push-target.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deletePushTarget( + targetId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/delete-session.md b/docs/examples/1.7.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 0000000000..b590c8fcee --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/delete-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSession( + sessionId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-flutter/examples/account/delete-sessions.md new file mode 100644 index 0000000000..9a6f8c4fc8 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/delete-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-flutter/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bbbb4c02b3 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/get-prefs.md b/docs/examples/1.7.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 0000000000..f443da600f --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/get-prefs.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/get-session.md b/docs/examples/1.7.x/client-flutter/examples/account/get-session.md new file mode 100644 index 0000000000..7f8d53f3ae --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/get-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/get.md b/docs/examples/1.7.x/client-flutter/examples/account/get.md new file mode 100644 index 0000000000..710d4446c4 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/list-identities.md b/docs/examples/1.7.x/client-flutter/examples/account/list-identities.md new file mode 100644 index 0000000000..c5de2030ad --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/list-identities.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/list-logs.md b/docs/examples/1.7.x/client-flutter/examples/account/list-logs.md new file mode 100644 index 0000000000..8ea48eb4e9 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/list-logs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-flutter/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..cb28470843 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/list-mfa-factors.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/list-sessions.md b/docs/examples/1.7.x/client-flutter/examples/account/list-sessions.md new file mode 100644 index 0000000000..bf7a5069d3 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/list-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-email.md b/docs/examples/1.7.x/client-flutter/examples/account/update-email.md new file mode 100644 index 0000000000..79c655e742 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-email.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-flutter/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..6757ffd921 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-flutter/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..e5b879354e --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..96e4484726 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..02509c306b --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '', + otp: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9d88077225 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-name.md b/docs/examples/1.7.x/client-flutter/examples/account/update-name.md new file mode 100644 index 0000000000..3eb4148bf7 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-name.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateName( + name: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-password.md b/docs/examples/1.7.x/client-flutter/examples/account/update-password.md new file mode 100644 index 0000000000..38cf232466 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-password.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-flutter/examples/account/update-phone-session.md new file mode 100644 index 0000000000..07cde43faf --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-flutter/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..7eb0d23df2 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-phone.md b/docs/examples/1.7.x/client-flutter/examples/account/update-phone.md new file mode 100644 index 0000000000..2462ea2ea4 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-phone.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-prefs.md b/docs/examples/1.7.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 0000000000..acb4e71005 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-push-target.md b/docs/examples/1.7.x/client-flutter/examples/account/update-push-target.md new file mode 100644 index 0000000000..8b379a3d7a --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-push-target.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.updatePushTarget( + targetId: '', + identifier: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-recovery.md b/docs/examples/1.7.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 0000000000..80ed5d0602 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '', + secret: '', + password: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-session.md b/docs/examples/1.7.x/client-flutter/examples/account/update-session.md new file mode 100644 index 0000000000..36c8abf35f --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-status.md b/docs/examples/1.7.x/client-flutter/examples/account/update-status.md new file mode 100644 index 0000000000..4f495a7e46 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-status.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.7.x/client-flutter/examples/account/update-verification.md b/docs/examples/1.7.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 0000000000..f25510e57c --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/account/update-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 0000000000..64bb9451af --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // optional + height: 0, // optional + quality: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: Browser.avantBrowser, + width:0 , // optional + height:0 , // optional + quality:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..9a9ff538d2 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // optional + height: 0, // optional + quality: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: CreditCard.americanExpress, + width:0 , // optional + height:0 , // optional + quality:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6b731518de --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,27 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFavicon( + url: 'https://example.com', +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url:'https://example.com' , +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 0000000000..16a0ccd3d0 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // optional + height: 0, // optional + quality: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: Flag.afghanistan, + width:0 , // optional + height:0 , // optional + quality:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-image.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 0000000000..801b26698b --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getImage( + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getImage( + url:'https://example.com' , + width:0 , // optional + height:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 0000000000..eaa12031e2 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getInitials( + name: '', // optional + width: 0, // optional + height: 0, // optional + background: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getInitials( + name:'' , // optional + width:0 , // optional + height:0 , // optional + background:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a868089ef9 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-q-r.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getQR( + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getQR( + text:'' , + size:1 , // optional + margin:0 , // optional + download:false , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.7.x/client-flutter/examples/databases/create-document.md new file mode 100644 index 0000000000..9fcd298a7e --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/create-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/delete-document.md b/docs/examples/1.7.x/client-flutter/examples/databases/delete-document.md new file mode 100644 index 0000000000..06f9f93a16 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/delete-document.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/get-document.md b/docs/examples/1.7.x/client-flutter/examples/databases/get-document.md new file mode 100644 index 0000000000..e7655b6152 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/get-document.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/list-documents.md b/docs/examples/1.7.x/client-flutter/examples/databases/list-documents.md new file mode 100644 index 0000000000..29918db31b --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/list-documents.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/update-document.md b/docs/examples/1.7.x/client-flutter/examples/databases/update-document.md new file mode 100644 index 0000000000..90c0265efc --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/update-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.7.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 0000000000..15f8304121 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '', + body: '', // optional + xasync: false, // optional + path: '', // optional + method: ExecutionMethod.gET, // optional + headers: {}, // optional + scheduledAt: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/functions/get-execution.md b/docs/examples/1.7.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 0000000000..b00bb9d218 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/functions/get-execution.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '', + executionId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/functions/list-executions.md b/docs/examples/1.7.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 0000000000..3ef23e90e3 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/functions/list-executions.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/graphql/mutation.md b/docs/examples/1.7.x/client-flutter/examples/graphql/mutation.md new file mode 100644 index 0000000000..775f760a63 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/graphql/mutation.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/graphql/query.md b/docs/examples/1.7.x/client-flutter/examples/graphql/query.md new file mode 100644 index 0000000000..346237bd8e --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/graphql/query.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/get.md b/docs/examples/1.7.x/client-flutter/examples/locale/get.md new file mode 100644 index 0000000000..9a8da2e0ef --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-codes.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-codes.md new file mode 100644 index 0000000000..f0efb41845 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-continents.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-continents.md new file mode 100644 index 0000000000..3e10997512 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..b5c7e5c411 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..adae892d41 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries-phones.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-countries.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries.md new file mode 100644 index 0000000000..af2317eaa4 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-currencies.md new file mode 100644 index 0000000000..0b536827c8 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-currencies.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.7.x/client-flutter/examples/locale/list-languages.md b/docs/examples/1.7.x/client-flutter/examples/locale/list-languages.md new file mode 100644 index 0000000000..0c487cc199 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/locale/list-languages.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.7.x/client-flutter/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-flutter/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..f055125b7a --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '', + subscriberId: '', + targetId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-flutter/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..a9a3af3126 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/messaging/delete-subscriber.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '', + subscriberId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/create-file.md b/docs/examples/1.7.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 0000000000..09e8115f05 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '', + fileId: '', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/delete-file.md b/docs/examples/1.7.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 0000000000..65fba8ad48 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/delete-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 0000000000..54cd9cd21c --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,29 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileDownload( + bucketId: '', + fileId: '', +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId:'' , + fileId:'' , +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c5d6b2a820 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,51 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFilePreview( + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.center, // optional + quality: 0, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat.jpg, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId:'' , + fileId:'' , + width:0 , // optional + height:0 , // optional + gravity: ImageGravity.center, // optional + quality:0 , // optional + borderWidth:0 , // optional + borderColor:'' , // optional + borderRadius:0 , // optional + opacity:0 , // optional + rotation:-360 , // optional + background:'' , // optional + output: ImageFormat.jpg, // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 0000000000..e75b33b1e5 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,29 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileView( + bucketId: '', + fileId: '', +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId:'' , + fileId:'' , +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 0000000000..bceb4ea1d8 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/list-files.md b/docs/examples/1.7.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 0000000000..8bc482277b --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/list-files.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/update-file.md b/docs/examples/1.7.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 0000000000..42f337f15e --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '', + fileId: '', + name: '', // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/create-membership.md b/docs/examples/1.7.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 0000000000..a5f46f8322 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/create.md b/docs/examples/1.7.x/client-flutter/examples/teams/create.md new file mode 100644 index 0000000000..51df29ebdd --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/create.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '', + name: '', + roles: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 0000000000..7bdb13bd1c --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/delete.md b/docs/examples/1.7.x/client-flutter/examples/teams/delete.md new file mode 100644 index 0000000000..c75b558186 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/delete.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.delete( + teamId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/get-membership.md b/docs/examples/1.7.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 0000000000..6afe423fd5 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-flutter/examples/teams/get-prefs.md new file mode 100644 index 0000000000..fa77459194 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/get-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/get.md b/docs/examples/1.7.x/client-flutter/examples/teams/get.md new file mode 100644 index 0000000000..ca5dc92055 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/get.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-flutter/examples/teams/list-memberships.md new file mode 100644 index 0000000000..fe1a551aab --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/list.md b/docs/examples/1.7.x/client-flutter/examples/teams/list.md new file mode 100644 index 0000000000..12c2bfd0f2 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/list.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c3727359c4 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '', + membershipId: '', + userId: '', + secret: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/update-membership.md b/docs/examples/1.7.x/client-flutter/examples/teams/update-membership.md new file mode 100644 index 0000000000..734b330c19 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/update-membership.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '', + membershipId: '', + roles: [], +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/update-name.md b/docs/examples/1.7.x/client-flutter/examples/teams/update-name.md new file mode 100644 index 0000000000..a742515899 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/update-name.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '', + name: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-flutter/examples/teams/update-prefs.md new file mode 100644 index 0000000000..16d004d874 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/teams/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '', + prefs: {}, +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-flutter/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..ef22ff190a --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.createFileToken( + bucketId: '', + fileId: '', + expire: '', // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/delete.md b/docs/examples/1.7.x/client-flutter/examples/tokens/delete.md new file mode 100644 index 0000000000..c44c27138f --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/delete.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +await tokens.delete( + tokenId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-flutter/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..9e896fea46 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/get-j-w-t.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +Jwt result = await tokens.getJWT( + tokenId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/get.md b/docs/examples/1.7.x/client-flutter/examples/tokens/get.md new file mode 100644 index 0000000000..1bbd5c3e67 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/get.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.get( + tokenId: '', +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/list.md b/docs/examples/1.7.x/client-flutter/examples/tokens/list.md new file mode 100644 index 0000000000..4583a084dc --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/list.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +ResourceTokenList result = await tokens.list( + bucketId: '', + fileId: '', + queries: [], // optional +); diff --git a/docs/examples/1.7.x/client-flutter/examples/tokens/update.md b/docs/examples/1.7.x/client-flutter/examples/tokens/update.md new file mode 100644 index 0000000000..9111e66e61 --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/tokens/update.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.update( + tokenId: '', + expire: '', // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-email-token.md b/docs/examples/1.7.x/client-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-push-target.md b/docs/examples/1.7.x/client-graphql/examples/account/create-push-target.md new file mode 100644 index 0000000000..63802a782e --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +mutation { + accountCreatePushTarget( + targetId: "", + identifier: "", + providerId: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-recovery.md b/docs/examples/1.7.x/client-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-session.md b/docs/examples/1.7.x/client-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create-verification.md b/docs/examples/1.7.x/client-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/create.md b/docs/examples/1.7.x/client-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "", + email: "email@example.com", + password: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/delete-identity.md b/docs/examples/1.7.x/client-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-graphql/examples/account/delete-push-target.md new file mode 100644 index 0000000000..894c0b2e02 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +mutation { + accountDeletePushTarget( + targetId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/delete-session.md b/docs/examples/1.7.x/client-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e2de72b57f --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +query { + accountGetMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/get-prefs.md b/docs/examples/1.7.x/client-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..6cb48d2b58 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/get-prefs.md @@ -0,0 +1,5 @@ +query { + accountGetPrefs { + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/get-session.md b/docs/examples/1.7.x/client-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..65c824f68b --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/get-session.md @@ -0,0 +1,35 @@ +query { + accountGetSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/get.md b/docs/examples/1.7.x/client-graphql/examples/account/get.md new file mode 100644 index 0000000000..f4f07c187f --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/get.md @@ -0,0 +1,35 @@ +query { + accountGet { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/list-identities.md b/docs/examples/1.7.x/client-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..b7a2a6d39a --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/list-identities.md @@ -0,0 +1,19 @@ +query { + accountListIdentities( + queries: [] + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/list-logs.md b/docs/examples/1.7.x/client-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..1e17b2f69f --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/list-logs.md @@ -0,0 +1,30 @@ +query { + accountListLogs( + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..2a78b901b3 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/list-mfa-factors.md @@ -0,0 +1,8 @@ +query { + accountListMfaFactors { + totp + phone + email + recoveryCode + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/list-sessions.md b/docs/examples/1.7.x/client-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..6d45f1d4ae --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/list-sessions.md @@ -0,0 +1,36 @@ +query { + accountListSessions { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-email.md b/docs/examples/1.7.x/client-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "", + otp: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-name.md b/docs/examples/1.7.x/client-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-password.md b/docs/examples/1.7.x/client-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-phone.md b/docs/examples/1.7.x/client-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-prefs.md b/docs/examples/1.7.x/client-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-push-target.md b/docs/examples/1.7.x/client-graphql/examples/account/update-push-target.md new file mode 100644 index 0000000000..3c402cdf12 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +mutation { + accountUpdatePushTarget( + targetId: "", + identifier: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-recovery.md b/docs/examples/1.7.x/client-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "", + secret: "", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-session.md b/docs/examples/1.7.x/client-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-status.md b/docs/examples/1.7.x/client-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/account/update-verification.md b/docs/examples/1.7.x/client-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..817e1e54c2 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-browser.md @@ -0,0 +1,10 @@ +query { + avatarsGetBrowser( + code: "aa", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e4b5dc18d9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,10 @@ +query { + avatarsGetCreditCard( + code: "amex", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bfea71f498 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..1502128581 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-flag.md @@ -0,0 +1,10 @@ +query { + avatarsGetFlag( + code: "af", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-image.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..3b9aa104dc --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-image.md @@ -0,0 +1,9 @@ +query { + avatarsGetImage( + url: "https://example.com", + width: 0, + height: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..51ae36136b --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +query { + avatarsGetInitials( + name: "", + width: 0, + height: 0, + background: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a19f218412 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/avatars/get-q-r.md @@ -0,0 +1,10 @@ +query { + avatarsGetQR( + text: "", + size: 1, + margin: 0, + download: false + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/create-document.md b/docs/examples/1.7.x/client-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4e2d90660b --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/create-document.md @@ -0,0 +1,17 @@ +mutation { + databasesCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/delete-document.md b/docs/examples/1.7.x/client-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/get-document.md b/docs/examples/1.7.x/client-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..7cff0a18c1 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/get-document.md @@ -0,0 +1,16 @@ +query { + databasesGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/list-documents.md b/docs/examples/1.7.x/client-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..077d7c8f12 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/list-documents.md @@ -0,0 +1,18 @@ +query { + databasesListDocuments( + databaseId: "", + collectionId: "", + queries: [] + ) { + total + documents { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/update-document.md b/docs/examples/1.7.x/client-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..5e80894620 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/update-document.md @@ -0,0 +1,17 @@ +mutation { + databasesUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.7.x/client-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "", + body: "", + async: false, + path: "", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/functions/get-execution.md b/docs/examples/1.7.x/client-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..6ded51a50c --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/functions/get-execution.md @@ -0,0 +1,30 @@ +query { + functionsGetExecution( + functionId: "", + executionId: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/functions/list-executions.md b/docs/examples/1.7.x/client-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..ba504e31c7 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/functions/list-executions.md @@ -0,0 +1,33 @@ +query { + functionsListExecutions( + functionId: "", + queries: [] + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/get.md b/docs/examples/1.7.x/client-graphql/examples/locale/get.md new file mode 100644 index 0000000000..2b2bbcc1f1 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/get.md @@ -0,0 +1,11 @@ +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-codes.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..0164cc3782 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-continents.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..41f672c565 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +query { + localeListContinents { + total + continents { + name + code + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..00cd4652f9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..33d2296850 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-countries.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..9312bc94b1 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +query { + localeListCountries { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..cde3ab488a --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/locale/list-languages.md b/docs/examples/1.7.x/client-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..b0d76c522b --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "", + subscriberId: "", + targetId: "" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "", + subscriberId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.7.x/client-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..97e2150c39 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/create-file.md @@ -0,0 +1,25 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "", "fileId": "", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/delete-file.md b/docs/examples/1.7.x/client-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "", + fileId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8325e8a230 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +query { + storageGetFileDownload( + bucketId: "", + fileId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..df32e88350 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,19 @@ +query { + storageGetFilePreview( + bucketId: "", + fileId: "", + width: 0, + height: 0, + gravity: "center", + quality: 0, + borderWidth: 0, + borderColor: "", + borderRadius: 0, + opacity: 0, + rotation: -360, + background: "", + output: "jpg" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..434328a1ec --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +query { + storageGetFileView( + bucketId: "", + fileId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/get-file.md b/docs/examples/1.7.x/client-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..60886b0f6f --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/get-file.md @@ -0,0 +1,18 @@ +query { + storageGetFile( + bucketId: "", + fileId: "" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/list-files.md b/docs/examples/1.7.x/client-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..774cc51b97 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/list-files.md @@ -0,0 +1,22 @@ +query { + storageListFiles( + bucketId: "", + queries: [], + search: "" + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/storage/update-file.md b/docs/examples/1.7.x/client-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "", + fileId: "", + name: "", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/create-membership.md b/docs/examples/1.7.x/client-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "", + roles: [], + email: "email@example.com", + userId: "", + phone: "+12065550100", + url: "https://example.com", + name: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/create.md b/docs/examples/1.7.x/client-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "", + name: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "", + membershipId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/delete.md b/docs/examples/1.7.x/client-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/get-membership.md b/docs/examples/1.7.x/client-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..c33528609e --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/get-membership.md @@ -0,0 +1,20 @@ +query { + teamsGetMembership( + teamId: "", + membershipId: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..fe498079cf --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +query { + teamsGetPrefs( + teamId: "" + ) { + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/get.md b/docs/examples/1.7.x/client-graphql/examples/teams/get.md new file mode 100644 index 0000000000..a3fbb491e0 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/get.md @@ -0,0 +1,14 @@ +query { + teamsGet( + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..bf7f0d1eed --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/list-memberships.md @@ -0,0 +1,24 @@ +query { + teamsListMemberships( + teamId: "", + queries: [], + search: "" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/list.md b/docs/examples/1.7.x/client-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e7005b5326 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/list.md @@ -0,0 +1,18 @@ +query { + teamsList( + queries: [], + search: "" + ) { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/update-membership.md b/docs/examples/1.7.x/client-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "", + membershipId: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/update-name.md b/docs/examples/1.7.x/client-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-graphql/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c8cc96baf8 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +mutation { + tokensCreateFileToken( + bucketId: "", + fileId: "", + expire: "", + permissions: ["read("any")"] + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/delete.md b/docs/examples/1.7.x/client-graphql/examples/tokens/delete.md new file mode 100644 index 0000000000..b13ad72f6b --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/delete.md @@ -0,0 +1,7 @@ +mutation { + tokensDelete( + tokenId: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-graphql/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..ab1d3982ca --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/get-j-w-t.md @@ -0,0 +1,7 @@ +query { + tokensGetJWT( + tokenId: "" + ) { + jwt + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/get.md b/docs/examples/1.7.x/client-graphql/examples/tokens/get.md new file mode 100644 index 0000000000..00cae5459c --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/get.md @@ -0,0 +1,12 @@ +query { + tokensGet( + tokenId: "" + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/list.md b/docs/examples/1.7.x/client-graphql/examples/tokens/list.md new file mode 100644 index 0000000000..0d68b014e6 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/list.md @@ -0,0 +1,17 @@ +query { + tokensList( + bucketId: "", + fileId: "", + queries: [] + ) { + total + tokens { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/tokens/update.md b/docs/examples/1.7.x/client-graphql/examples/tokens/update.md new file mode 100644 index 0000000000..61d75a27d5 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/tokens/update.md @@ -0,0 +1,14 @@ +mutation { + tokensUpdate( + tokenId: "", + expire: "", + permissions: ["read("any")"] + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-react-native/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..bd293b959c --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-react-native/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..2b29af43ea --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-email-token.md b/docs/examples/1.7.x/client-react-native/examples/account/create-email-token.md new file mode 100644 index 0000000000..b67b06b0bc --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-react-native/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..91f7849763 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-react-native/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..736b405de1 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..bc8bba90d7 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..4efd857168 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..15d982f6fa --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..32c67f8f06 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..01a79ae6f8 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-react-native/examples/account/create-phone-token.md new file mode 100644 index 0000000000..536eba7277 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-react-native/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..9db44247aa --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-push-target.md b/docs/examples/1.7.x/client-react-native/examples/account/create-push-target.md new file mode 100644 index 0000000000..73ac94d64e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-recovery.md b/docs/examples/1.7.x/client-react-native/examples/account/create-recovery.md new file mode 100644 index 0000000000..3a057d9288 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-session.md b/docs/examples/1.7.x/client-react-native/examples/account/create-session.md new file mode 100644 index 0000000000..fe15bd7874 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create-verification.md b/docs/examples/1.7.x/client-react-native/examples/account/create-verification.md new file mode 100644 index 0000000000..06d500c9e4 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/create.md b/docs/examples/1.7.x/client-react-native/examples/account/create.md new file mode 100644 index 0000000000..fae8a81e72 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/delete-identity.md b/docs/examples/1.7.x/client-react-native/examples/account/delete-identity.md new file mode 100644 index 0000000000..1682039f38 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-react-native/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..a52421a82e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-react-native/examples/account/delete-push-target.md new file mode 100644 index 0000000000..e51aa4f391 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/delete-session.md b/docs/examples/1.7.x/client-react-native/examples/account/delete-session.md new file mode 100644 index 0000000000..fee82cc026 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-react-native/examples/account/delete-sessions.md new file mode 100644 index 0000000000..c449653b7f --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-react-native/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..10640e1535 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/get-prefs.md b/docs/examples/1.7.x/client-react-native/examples/account/get-prefs.md new file mode 100644 index 0000000000..effbc1858b --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/get-session.md b/docs/examples/1.7.x/client-react-native/examples/account/get-session.md new file mode 100644 index 0000000000..8d81716723 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/get.md b/docs/examples/1.7.x/client-react-native/examples/account/get.md new file mode 100644 index 0000000000..7be0871808 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/list-identities.md b/docs/examples/1.7.x/client-react-native/examples/account/list-identities.md new file mode 100644 index 0000000000..f536bdc24b --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/list-logs.md b/docs/examples/1.7.x/client-react-native/examples/account/list-logs.md new file mode 100644 index 0000000000..99f24d297d --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-react-native/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..1ecaae3b1e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/list-sessions.md b/docs/examples/1.7.x/client-react-native/examples/account/list-sessions.md new file mode 100644 index 0000000000..bec3250f31 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-email.md b/docs/examples/1.7.x/client-react-native/examples/account/update-email.md new file mode 100644 index 0000000000..bc3ec917e7 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-react-native/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..5e79239545 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-react-native/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..da0f7f7e54 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..7723bfe23b --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ff17455808 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a1284b064d --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-name.md b/docs/examples/1.7.x/client-react-native/examples/account/update-name.md new file mode 100644 index 0000000000..4e8bd24b98 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-password.md b/docs/examples/1.7.x/client-react-native/examples/account/update-password.md new file mode 100644 index 0000000000..24fa5c5c25 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-react-native/examples/account/update-phone-session.md new file mode 100644 index 0000000000..1e372c1149 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-react-native/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..3039df64f7 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-phone.md b/docs/examples/1.7.x/client-react-native/examples/account/update-phone.md new file mode 100644 index 0000000000..7f3363eb12 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-prefs.md b/docs/examples/1.7.x/client-react-native/examples/account/update-prefs.md new file mode 100644 index 0000000000..5f8b485997 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-push-target.md b/docs/examples/1.7.x/client-react-native/examples/account/update-push-target.md new file mode 100644 index 0000000000..bf2d22acab --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-recovery.md b/docs/examples/1.7.x/client-react-native/examples/account/update-recovery.md new file mode 100644 index 0000000000..4a78c119b3 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-session.md b/docs/examples/1.7.x/client-react-native/examples/account/update-session.md new file mode 100644 index 0000000000..1087c60cd1 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-status.md b/docs/examples/1.7.x/client-react-native/examples/account/update-status.md new file mode 100644 index 0000000000..860cfdaf29 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/account/update-verification.md b/docs/examples/1.7.x/client-react-native/examples/account/update-verification.md new file mode 100644 index 0000000000..d07009f13c --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md new file mode 100644 index 0000000000..d89461934c --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..2f9ebfbad2 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..46315c1820 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md new file mode 100644 index 0000000000..c640aae0ab --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-image.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-image.md new file mode 100644 index 0000000000..e5a1339ada --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-initials.md new file mode 100644 index 0000000000..795a27b06f --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..52da047122 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.7.x/client-react-native/examples/databases/create-document.md new file mode 100644 index 0000000000..bb0ac3a59e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/delete-document.md b/docs/examples/1.7.x/client-react-native/examples/databases/delete-document.md new file mode 100644 index 0000000000..9f417f9057 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/get-document.md b/docs/examples/1.7.x/client-react-native/examples/databases/get-document.md new file mode 100644 index 0000000000..7fe5fb5435 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/list-documents.md b/docs/examples/1.7.x/client-react-native/examples/databases/list-documents.md new file mode 100644 index 0000000000..be16f9135e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/update-document.md b/docs/examples/1.7.x/client-react-native/examples/databases/update-document.md new file mode 100644 index 0000000000..9400230f15 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.7.x/client-react-native/examples/functions/create-execution.md new file mode 100644 index 0000000000..291ff6eca9 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/functions/get-execution.md b/docs/examples/1.7.x/client-react-native/examples/functions/get-execution.md new file mode 100644 index 0000000000..92b07c9cf0 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/functions/list-executions.md b/docs/examples/1.7.x/client-react-native/examples/functions/list-executions.md new file mode 100644 index 0000000000..2396e8b475 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/graphql/mutation.md b/docs/examples/1.7.x/client-react-native/examples/graphql/mutation.md new file mode 100644 index 0000000000..3eb94b71e6 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/graphql/query.md b/docs/examples/1.7.x/client-react-native/examples/graphql/query.md new file mode 100644 index 0000000000..dffe09f24c --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/get.md b/docs/examples/1.7.x/client-react-native/examples/locale/get.md new file mode 100644 index 0000000000..d3b862ab18 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-codes.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-codes.md new file mode 100644 index 0000000000..6057634b7e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-continents.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-continents.md new file mode 100644 index 0000000000..2a501151ac --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..eaa2f30442 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..85d2149d2a --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-countries.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries.md new file mode 100644 index 0000000000..b720320ef2 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-currencies.md new file mode 100644 index 0000000000..0182e504ba --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/locale/list-languages.md b/docs/examples/1.7.x/client-react-native/examples/locale/list-languages.md new file mode 100644 index 0000000000..d3b9242b28 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-react-native/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..819840555e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-react-native/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..385ef3079e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/create-file.md b/docs/examples/1.7.x/client-react-native/examples/storage/create-file.md new file mode 100644 index 0000000000..4108908bbc --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + await pickSingle(), // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/delete-file.md b/docs/examples/1.7.x/client-react-native/examples/storage/delete-file.md new file mode 100644 index 0000000000..1a5b5402c9 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md new file mode 100644 index 0000000000..30e70e3fdd --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6e88a47350 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg // output (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md new file mode 100644 index 0000000000..239bb7c0ec --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file.md new file mode 100644 index 0000000000..313e9bb2db --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/list-files.md b/docs/examples/1.7.x/client-react-native/examples/storage/list-files.md new file mode 100644 index 0000000000..8baa914df7 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/update-file.md b/docs/examples/1.7.x/client-react-native/examples/storage/update-file.md new file mode 100644 index 0000000000..e36f841542 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/create-membership.md b/docs/examples/1.7.x/client-react-native/examples/teams/create-membership.md new file mode 100644 index 0000000000..f3b1498c04 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/create.md b/docs/examples/1.7.x/client-react-native/examples/teams/create.md new file mode 100644 index 0000000000..0e7d1ba1e2 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-react-native/examples/teams/delete-membership.md new file mode 100644 index 0000000000..aeb7ab7a66 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/delete.md b/docs/examples/1.7.x/client-react-native/examples/teams/delete.md new file mode 100644 index 0000000000..8bf8ea43ab --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/get-membership.md b/docs/examples/1.7.x/client-react-native/examples/teams/get-membership.md new file mode 100644 index 0000000000..e3f90615aa --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-react-native/examples/teams/get-prefs.md new file mode 100644 index 0000000000..f3aef13831 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/get.md b/docs/examples/1.7.x/client-react-native/examples/teams/get.md new file mode 100644 index 0000000000..9e73ba5fcf --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-react-native/examples/teams/list-memberships.md new file mode 100644 index 0000000000..f4fb0aa90a --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/list.md b/docs/examples/1.7.x/client-react-native/examples/teams/list.md new file mode 100644 index 0000000000..5127527ecf --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-react-native/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..8eb937f254 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/update-membership.md b/docs/examples/1.7.x/client-react-native/examples/teams/update-membership.md new file mode 100644 index 0000000000..4452e4474e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/update-name.md b/docs/examples/1.7.x/client-react-native/examples/teams/update-name.md new file mode 100644 index 0000000000..cee27cdbc0 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-react-native/examples/teams/update-prefs.md new file mode 100644 index 0000000000..5824fb1f67 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-react-native/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c23d16c825 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '', // bucketId + '', // fileId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/delete.md b/docs/examples/1.7.x/client-react-native/examples/tokens/delete.md new file mode 100644 index 0000000000..7cf2b41f63 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-react-native/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..664dda5038 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.getJWT( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/get.md b/docs/examples/1.7.x/client-react-native/examples/tokens/get.md new file mode 100644 index 0000000000..720cf7980e --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/list.md b/docs/examples/1.7.x/client-react-native/examples/tokens/list.md new file mode 100644 index 0000000000..94d5a32bbc --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '', // bucketId + '', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/tokens/update.md b/docs/examples/1.7.x/client-react-native/examples/tokens/update.md new file mode 100644 index 0000000000..31e49a97ba --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/tokens/update.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '', // tokenId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.7.x/client-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "factor": "email" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..121114a3c2 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..51b1126cc1 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,6 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "phone": "+12065550100" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.7.x/client-rest/examples/account/create-push-target.md new file mode 100644 index 0000000000..5844ccc19e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-push-target.md @@ -0,0 +1,12 @@ +POST /v1/account/targets/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "targetId": "", + "identifier": "", + "providerId": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.7.x/client-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-session.md b/docs/examples/1.7.x/client-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create-verification.md b/docs/examples/1.7.x/client-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/create.md b/docs/examples/1.7.x/client-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "password": , + "name": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.7.x/client-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-rest/examples/account/delete-push-target.md new file mode 100644 index 0000000000..fdfc75a41b --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +DELETE /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/delete-session.md b/docs/examples/1.7.x/client-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..d2f0d71aac --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.7.x/client-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..f8bda5317f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/get-prefs.md @@ -0,0 +1,8 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/get-session.md b/docs/examples/1.7.x/client-rest/examples/account/get-session.md new file mode 100644 index 0000000000..988066a253 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/get-session.md @@ -0,0 +1,8 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/get.md b/docs/examples/1.7.x/client-rest/examples/account/get.md new file mode 100644 index 0000000000..b0fd14b3ef --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/get.md @@ -0,0 +1,8 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/list-identities.md b/docs/examples/1.7.x/client-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..d6b36b373c --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/list-identities.md @@ -0,0 +1,8 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/list-logs.md b/docs/examples/1.7.x/client-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..7267345856 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/list-logs.md @@ -0,0 +1,8 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e7eb7fe61b --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,8 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.7.x/client-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..04c9045def --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/list-sessions.md @@ -0,0 +1,8 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-email.md b/docs/examples/1.7.x/client-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "mfa": false +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "otp": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "challengeId": "", + "otp": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-name.md b/docs/examples/1.7.x/client-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-password.md b/docs/examples/1.7.x/client-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-phone.md b/docs/examples/1.7.x/client-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.7.x/client-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.7.x/client-rest/examples/account/update-push-target.md new file mode 100644 index 0000000000..2e42a2d67f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-push-target.md @@ -0,0 +1,10 @@ +PUT /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "identifier": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.7.x/client-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "", + "password": +} diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-session.md b/docs/examples/1.7.x/client-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-status.md b/docs/examples/1.7.x/client-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/account/update-verification.md b/docs/examples/1.7.x/client-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..343fe9eb41 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-browser.md @@ -0,0 +1,8 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..1a34786d8e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,8 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c06e5d45ca --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-favicon.md @@ -0,0 +1,8 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d1f887dea2 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-flag.md @@ -0,0 +1,8 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..3d0ae87712 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-image.md @@ -0,0 +1,8 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e1de5b9349 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-initials.md @@ -0,0 +1,8 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..f8e045e217 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/avatars/get-q-r.md @@ -0,0 +1,8 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/databases/create-document.md b/docs/examples/1.7.x/client-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..3126197555 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/create-document.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documentId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.7.x/client-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..6b86aba853 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/delete-document.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/databases/get-document.md b/docs/examples/1.7.x/client-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..ec734c7605 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/get-document.md @@ -0,0 +1,8 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.7.x/client-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..b3cd1ca42c --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/list-documents.md @@ -0,0 +1,8 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/databases/update-document.md b/docs/examples/1.7.x/client-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..945b957c6e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/update-document.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.7.x/client-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..fec92ddab0 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/functions/create-execution.md @@ -0,0 +1,16 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "body": "", + "async": false, + "path": "", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.7.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.7.x/client-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..26800838d9 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/functions/get-execution.md @@ -0,0 +1,8 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.7.x/client-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..89304e05bd --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/functions/list-executions.md @@ -0,0 +1,8 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.7.x/client-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..db3b1c0c78 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.7.x/client-rest/examples/graphql/query.md b/docs/examples/1.7.x/client-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8fc41efcfe --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/graphql/query.md @@ -0,0 +1,12 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.7.x/client-rest/examples/locale/get.md b/docs/examples/1.7.x/client-rest/examples/locale/get.md new file mode 100644 index 0000000000..4633556224 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/get.md @@ -0,0 +1,8 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.7.x/client-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..ed65f6b48c --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-codes.md @@ -0,0 +1,8 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.7.x/client-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..96a0ed8da9 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-continents.md @@ -0,0 +1,8 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..03e25f5a3e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..6595a2b3bf --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.7.x/client-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..dca7532e7f --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-countries.md @@ -0,0 +1,8 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..1d9adcc4d3 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-currencies.md @@ -0,0 +1,8 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.7.x/client-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..5f62d05bb1 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/locale/list-languages.md @@ -0,0 +1,8 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..94e98c4438 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + +{ + "subscriberId": "", + "targetId": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..e5ac0830a3 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/create-file.md b/docs/examples/1.7.x/client-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..f044b577b2 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.7.x/client-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..8d074341fe --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..0ef135c1c7 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..39deb05d07 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/get-file-preview.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..b6861fb210 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/get-file.md b/docs/examples/1.7.x/client-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..c3472cea03 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/get-file.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/list-files.md b/docs/examples/1.7.x/client-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..3d6e8013f9 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/list-files.md @@ -0,0 +1,8 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/storage/update-file.md b/docs/examples/1.7.x/client-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..210433622b --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/storage/update-file.md @@ -0,0 +1,12 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.7.x/client-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..83e4803502 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "userId": "", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/create.md b/docs/examples/1.7.x/client-rest/examples/teams/create.md new file mode 100644 index 0000000000..c80b2bda8e --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/create.md @@ -0,0 +1,13 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "teamId": "", + "name": "", + "roles": [] +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0fc17e11ee --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/delete.md b/docs/examples/1.7.x/client-rest/examples/teams/delete.md new file mode 100644 index 0000000000..ad614b17d1 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/delete.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.7.x/client-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..b28d62ae63 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/get-membership.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e49b4c7855 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/get-prefs.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/get.md b/docs/examples/1.7.x/client-rest/examples/teams/get.md new file mode 100644 index 0000000000..5976ba6fb4 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/get.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..eafff407ba --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/list-memberships.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/list.md b/docs/examples/1.7.x/client-rest/examples/teams/list.md new file mode 100644 index 0000000000..1dcac8e4d4 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/list.md @@ -0,0 +1,8 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.7.x/client-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..3768499d16 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/update-membership.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "roles": [] +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/update-name.md b/docs/examples/1.7.x/client-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..ec381348e8 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/update-name.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.7.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-rest/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..2037b370c6 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/create-file-token.md @@ -0,0 +1,12 @@ +POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "expire": , + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/delete.md b/docs/examples/1.7.x/client-rest/examples/tokens/delete.md new file mode 100644 index 0000000000..1bfa1b2e39 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/delete.md @@ -0,0 +1,8 @@ +DELETE /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-rest/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..cee8b8853c --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/get-j-w-t.md @@ -0,0 +1,8 @@ +GET /v1/tokens/{tokenId}/jwt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/get.md b/docs/examples/1.7.x/client-rest/examples/tokens/get.md new file mode 100644 index 0000000000..7ed398f59a --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/get.md @@ -0,0 +1,8 @@ +GET /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/list.md b/docs/examples/1.7.x/client-rest/examples/tokens/list.md new file mode 100644 index 0000000000..99c3dc84a6 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/list.md @@ -0,0 +1,8 @@ +GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.7.x/client-rest/examples/tokens/update.md b/docs/examples/1.7.x/client-rest/examples/tokens/update.md new file mode 100644 index 0000000000..bbfa750916 --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/tokens/update.md @@ -0,0 +1,12 @@ +PATCH /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "expire": , + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..4e9ac6207a --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-email-password-session.md b/docs/examples/1.7.x/client-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..d987e92d8c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-email-token.md b/docs/examples/1.7.x/client-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..742a46a971 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-j-w-t.md b/docs/examples/1.7.x/client-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fc1f8078ee --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/client-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..06425359f0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/client-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..58a5393a6a --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/client-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..175f03f49b --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/client-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..849658a766 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/client-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..58bf6347a0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/client-web/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/client-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..51ee488cc5 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/client-web/examples/account/create-phone-token.md b/docs/examples/1.7.x/client-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..fae0e1b9fa --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-phone-verification.md b/docs/examples/1.7.x/client-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..258cbe956d --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-push-target.md b/docs/examples/1.7.x/client-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..b2f8abbf7f --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-recovery.md b/docs/examples/1.7.x/client-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..551063b738 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-session.md b/docs/examples/1.7.x/client-web/examples/account/create-session.md new file mode 100644 index 0000000000..1acc957c17 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create-verification.md b/docs/examples/1.7.x/client-web/examples/account/create-verification.md new file mode 100644 index 0000000000..4da19f1e92 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/create.md b/docs/examples/1.7.x/client-web/examples/account/create.md new file mode 100644 index 0000000000..04b1799604 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/delete-identity.md b/docs/examples/1.7.x/client-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..63e4b34b01 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/client-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..08f0cb406a --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/delete-push-target.md b/docs/examples/1.7.x/client-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..96f2a4aa28 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/delete-session.md b/docs/examples/1.7.x/client-web/examples/account/delete-session.md new file mode 100644 index 0000000000..7a84c965f2 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/delete-sessions.md b/docs/examples/1.7.x/client-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..bbeefec9b4 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/client-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..11fbe8e618 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/get-prefs.md b/docs/examples/1.7.x/client-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..0949fce4c7 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/get-session.md b/docs/examples/1.7.x/client-web/examples/account/get-session.md new file mode 100644 index 0000000000..d84242269e --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/get.md b/docs/examples/1.7.x/client-web/examples/account/get.md new file mode 100644 index 0000000000..6083ae9b10 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/list-identities.md b/docs/examples/1.7.x/client-web/examples/account/list-identities.md new file mode 100644 index 0000000000..f60bda1490 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/list-logs.md b/docs/examples/1.7.x/client-web/examples/account/list-logs.md new file mode 100644 index 0000000000..7b4d46efba --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/client-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..148bf68e6f --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/list-sessions.md b/docs/examples/1.7.x/client-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..c69e58361d --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-email.md b/docs/examples/1.7.x/client-web/examples/account/update-email.md new file mode 100644 index 0000000000..774cd19b0b --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-m-f-a.md b/docs/examples/1.7.x/client-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..dfab2f5fd0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/client-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d597048f05 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/client-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..e5edaf2e96 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/client-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..af0350c797 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/client-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..b3fec679b9 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-name.md b/docs/examples/1.7.x/client-web/examples/account/update-name.md new file mode 100644 index 0000000000..ac4934c242 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-password.md b/docs/examples/1.7.x/client-web/examples/account/update-password.md new file mode 100644 index 0000000000..833e2e7e7a --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-phone-session.md b/docs/examples/1.7.x/client-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f0c945e9ca --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-phone-verification.md b/docs/examples/1.7.x/client-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..58ab4a49c8 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-phone.md b/docs/examples/1.7.x/client-web/examples/account/update-phone.md new file mode 100644 index 0000000000..a4dd6d9880 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-prefs.md b/docs/examples/1.7.x/client-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..7b89ff3fc9 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-push-target.md b/docs/examples/1.7.x/client-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..3596194b6e --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-recovery.md b/docs/examples/1.7.x/client-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..857ff65c82 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-session.md b/docs/examples/1.7.x/client-web/examples/account/update-session.md new file mode 100644 index 0000000000..f9669e080b --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-status.md b/docs/examples/1.7.x/client-web/examples/account/update-status.md new file mode 100644 index 0000000000..a851e03738 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/account/update-verification.md b/docs/examples/1.7.x/client-web/examples/account/update-verification.md new file mode 100644 index 0000000000..128fa393a4 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..a80c250be0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..538459de74 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-favicon.md b/docs/examples/1.7.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..19fb9b2cd1 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..1b37aa0846 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-image.md b/docs/examples/1.7.x/client-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..2e53b1d552 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-initials.md b/docs/examples/1.7.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..c853390dfe --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-q-r.md b/docs/examples/1.7.x/client-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..898e47f7b6 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/create-document.md b/docs/examples/1.7.x/client-web/examples/databases/create-document.md new file mode 100644 index 0000000000..0a0b0550d2 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/delete-document.md b/docs/examples/1.7.x/client-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..ade1f198f3 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/get-document.md b/docs/examples/1.7.x/client-web/examples/databases/get-document.md new file mode 100644 index 0000000000..5a062b81e7 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/list-documents.md b/docs/examples/1.7.x/client-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..51ba791620 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/update-document.md b/docs/examples/1.7.x/client-web/examples/databases/update-document.md new file mode 100644 index 0000000000..5961f5839c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/functions/create-execution.md b/docs/examples/1.7.x/client-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..4f848bf45e --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/functions/get-execution.md b/docs/examples/1.7.x/client-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..cf7611db31 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/functions/list-executions.md b/docs/examples/1.7.x/client-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..b95e01982d --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/graphql/mutation.md b/docs/examples/1.7.x/client-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..5a52475d1c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/graphql/query.md b/docs/examples/1.7.x/client-web/examples/graphql/query.md new file mode 100644 index 0000000000..30ab01c9ab --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/get.md b/docs/examples/1.7.x/client-web/examples/locale/get.md new file mode 100644 index 0000000000..7676a6ff1f --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-codes.md b/docs/examples/1.7.x/client-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..03cd234434 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-continents.md b/docs/examples/1.7.x/client-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..d662b7e6e9 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/client-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..76e7c67223 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/client-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..7e4dd0c91a --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-countries.md b/docs/examples/1.7.x/client-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..c72f15cef8 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-currencies.md b/docs/examples/1.7.x/client-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..9fb17409a3 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/locale/list-languages.md b/docs/examples/1.7.x/client-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..c17fa907b9 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/client-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..e0f2fb96e1 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/client-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..85295f162b --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/create-file.md b/docs/examples/1.7.x/client-web/examples/storage/create-file.md new file mode 100644 index 0000000000..c40fae55b0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/delete-file.md b/docs/examples/1.7.x/client-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..2468c3b57c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..fda8b0b351 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c6670a4878 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg // output (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..f82df13192 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file.md b/docs/examples/1.7.x/client-web/examples/storage/get-file.md new file mode 100644 index 0000000000..76b2c5ff1d --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/list-files.md b/docs/examples/1.7.x/client-web/examples/storage/list-files.md new file mode 100644 index 0000000000..31b97b7d39 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/update-file.md b/docs/examples/1.7.x/client-web/examples/storage/update-file.md new file mode 100644 index 0000000000..5fd534794b --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/create-membership.md b/docs/examples/1.7.x/client-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..641a65fcea --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/create.md b/docs/examples/1.7.x/client-web/examples/teams/create.md new file mode 100644 index 0000000000..80caf310e8 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/delete-membership.md b/docs/examples/1.7.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..c38bf0701c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/delete.md b/docs/examples/1.7.x/client-web/examples/teams/delete.md new file mode 100644 index 0000000000..7ba36409ad --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/get-membership.md b/docs/examples/1.7.x/client-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..20205d5e72 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/get-prefs.md b/docs/examples/1.7.x/client-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ced967c947 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/get.md b/docs/examples/1.7.x/client-web/examples/teams/get.md new file mode 100644 index 0000000000..e54c95b4fc --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/list-memberships.md b/docs/examples/1.7.x/client-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..09033823d1 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/list.md b/docs/examples/1.7.x/client-web/examples/teams/list.md new file mode 100644 index 0000000000..bbc874b7be --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/update-membership-status.md b/docs/examples/1.7.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..27bf17c24f --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/update-membership.md b/docs/examples/1.7.x/client-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..2b8a03695e --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/update-name.md b/docs/examples/1.7.x/client-web/examples/teams/update-name.md new file mode 100644 index 0000000000..783623dc3d --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/teams/update-prefs.md b/docs/examples/1.7.x/client-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..6c9f2c87d0 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/create-file-token.md b/docs/examples/1.7.x/client-web/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..5606411964 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '', // bucketId + '', // fileId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/delete.md b/docs/examples/1.7.x/client-web/examples/tokens/delete.md new file mode 100644 index 0000000000..5450e2bd26 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/client-web/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..f6fe079f86 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.getJWT( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/get.md b/docs/examples/1.7.x/client-web/examples/tokens/get.md new file mode 100644 index 0000000000..d4c0852049 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/list.md b/docs/examples/1.7.x/client-web/examples/tokens/list.md new file mode 100644 index 0000000000..71baff031c --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '', // bucketId + '', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/tokens/update.md b/docs/examples/1.7.x/client-web/examples/tokens/update.md new file mode 100644 index 0000000000..1ae1da38ea --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/tokens/update.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "appwrite"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '', // tokenId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..a7eb9c5be3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..951293b4b2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md @@ -0,0 +1,3 @@ +appwrite account createEmailPasswordSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md new file mode 100644 index 0000000000..0aaf2476c9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md @@ -0,0 +1,4 @@ +appwrite account createEmailToken \ + --userId \ + --email email@example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..7b5337993d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..69203b085d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,5 @@ +appwrite account createMagicURLToken \ + --userId \ + --email email@example.com \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..7634217700 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account createMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..8696be7ec1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md @@ -0,0 +1,2 @@ +appwrite account createMfaChallenge \ + --factor email diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..0ef25446fd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account createMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9159b8f25f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..b36f350d99 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Token \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md new file mode 100644 index 0000000000..23f7f19cac --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md @@ -0,0 +1,3 @@ +appwrite account createPhoneToken \ + --userId \ + --phone +12065550100 diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..3c4402ba1f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1 @@ +appwrite account createPhoneVerification diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md new file mode 100644 index 0000000000..41c380b288 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md @@ -0,0 +1,4 @@ +appwrite account createPushTarget \ + --targetId \ + --identifier \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md b/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 0000000000..ea8c145abb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-session.md new file mode 100644 index 0000000000..426713ef50 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-session.md @@ -0,0 +1,3 @@ +appwrite account createSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-verification.md b/docs/examples/1.7.x/console-cli/examples/account/create-verification.md new file mode 100644 index 0000000000..402038b4b6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/account/create.md b/docs/examples/1.7.x/console-cli/examples/account/create.md new file mode 100644 index 0000000000..09686a2454 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId \ + --email email@example.com \ + --password '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md b/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 0000000000..acd8511dfb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,2 @@ +appwrite account deleteIdentity \ + --identityId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d4664855b5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account deleteMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md new file mode 100644 index 0000000000..610ea232d8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md @@ -0,0 +1,2 @@ +appwrite account deletePushTarget \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-session.md b/docs/examples/1.7.x/console-cli/examples/account/delete-session.md new file mode 100644 index 0000000000..9774552408 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md b/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 0000000000..dd11877a5d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete.md b/docs/examples/1.7.x/console-cli/examples/account/delete.md new file mode 100644 index 0000000000..dac412f7c2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete.md @@ -0,0 +1 @@ +appwrite account delete diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0e61d658de --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account getMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 0000000000..6569925d99 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-session.md b/docs/examples/1.7.x/console-cli/examples/account/get-session.md new file mode 100644 index 0000000000..120dc8277f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/get.md b/docs/examples/1.7.x/console-cli/examples/account/get.md new file mode 100644 index 0000000000..c8b46e34c7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-identities.md b/docs/examples/1.7.x/console-cli/examples/account/list-identities.md new file mode 100644 index 0000000000..877b443ea8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,2 @@ +appwrite account listIdentities \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-logs.md b/docs/examples/1.7.x/console-cli/examples/account/list-logs.md new file mode 100644 index 0000000000..e92f49063a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-logs.md @@ -0,0 +1,2 @@ +appwrite account listLogs \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a29f287d24 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md @@ -0,0 +1 @@ +appwrite account listMfaFactors diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md b/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 0000000000..87cbab0f66 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1 @@ +appwrite account listSessions diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-email.md b/docs/examples/1.7.x/console-cli/examples/account/update-email.md new file mode 100644 index 0000000000..81938ff3a9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md b/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..f714d4dbe9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md @@ -0,0 +1,2 @@ +appwrite account updateMFA \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..919bd70a30 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b51796a79e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite account updateMfaAuthenticator \ + --type totp \ + --otp diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..37e09ef4e8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md @@ -0,0 +1,3 @@ +appwrite account updateMfaChallenge \ + --challengeId \ + --otp diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a129ca6f98 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account updateMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-name.md b/docs/examples/1.7.x/console-cli/examples/account/update-name.md new file mode 100644 index 0000000000..6f3b5977f4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-password.md b/docs/examples/1.7.x/console-cli/examples/account/update-password.md new file mode 100644 index 0000000000..340baec562 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 0000000000..d70f33fab5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..cef2b5a40d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneVerification \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone.md new file mode 100644 index 0000000000..93a619a801 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,3 @@ +appwrite account updatePhone \ + --phone +12065550100 \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 0000000000..568ac66e48 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md new file mode 100644 index 0000000000..f3aa1a906a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md @@ -0,0 +1,3 @@ +appwrite account updatePushTarget \ + --targetId \ + --identifier diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md b/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 0000000000..903a99cc99 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,4 @@ +appwrite account updateRecovery \ + --userId \ + --secret \ + --password '' diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-session.md new file mode 100644 index 0000000000..5fb6a2e8d5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-status.md b/docs/examples/1.7.x/console-cli/examples/account/update-status.md new file mode 100644 index 0000000000..8886dbbc6a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-verification.md b/docs/examples/1.7.x/console-cli/examples/account/update-verification.md new file mode 100644 index 0000000000..afdfaa8372 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/assistant/chat.md b/docs/examples/1.7.x/console-cli/examples/assistant/chat.md new file mode 100644 index 0000000000..cf62d30515 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/assistant/chat.md @@ -0,0 +1,2 @@ +appwrite assistant chat \ + --prompt diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6b4f0b8007 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..365568ba19 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c658f1a483 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 0000000000..9f11fef840 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 0000000000..7df150610c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b0b3da71c9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +appwrite avatars getInitials \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..01e5085732 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/console/get-resource.md b/docs/examples/1.7.x/console-cli/examples/console/get-resource.md new file mode 100644 index 0000000000..3e55163966 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/console/get-resource.md @@ -0,0 +1,3 @@ +appwrite console getResource \ + --value \ + --type rules diff --git a/docs/examples/1.7.x/console-cli/examples/console/variables.md b/docs/examples/1.7.x/console-cli/examples/console/variables.md new file mode 100644 index 0000000000..1c67cf5ad8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..6babbfb5af --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 0000000000..d97c424d16 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,7 @@ +appwrite databases createCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..f6aaf54fa2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-document.md b/docs/examples/1.7.x/console-cli/examples/databases/create-document.md new file mode 100644 index 0000000000..513cfc4f33 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,6 @@ +appwrite databases createDocument \ + --databaseId \ + --collectionId \ + --documentId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..5c23f940de --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..5d3c614410 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases createEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..5a6ef4e4ef --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-index.md b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md new file mode 100644 index 0000000000..d8f96c0e55 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,7 @@ +appwrite databases createIndex \ + --databaseId \ + --collectionId \ + --key '' \ + --type key \ + --attributes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..791f3770c9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..4f39d84bab --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c7d8ae568a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createRelationshipAttribute \ + --databaseId \ + --collectionId \ + --relatedCollectionId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..37b1db644a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4406ed7879 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create.md b/docs/examples/1.7.x/console-cli/examples/databases/create.md new file mode 100644 index 0000000000..9e7523974f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create.md @@ -0,0 +1,4 @@ +appwrite databases create \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..88e7df985f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,4 @@ +appwrite databases deleteAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 0000000000..0db185a7d7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,3 @@ +appwrite databases deleteCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 0000000000..3a96d35798 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 0000000000..56485e7a78 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,4 @@ +appwrite databases deleteIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete.md b/docs/examples/1.7.x/console-cli/examples/databases/delete.md new file mode 100644 index 0000000000..a24a3a04d3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete.md @@ -0,0 +1,2 @@ +appwrite databases delete \ + --databaseId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 0000000000..821698011f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,4 @@ +appwrite databases getAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..b57e6c92a9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md @@ -0,0 +1,4 @@ +appwrite databases getCollectionUsage \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 0000000000..e763b5bbfb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,3 @@ +appwrite databases getCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..1001e9cd11 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite databases getDatabaseUsage \ + --databaseId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-document.md b/docs/examples/1.7.x/console-cli/examples/databases/get-document.md new file mode 100644 index 0000000000..35d9615503 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,5 @@ +appwrite databases getDocument \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-index.md b/docs/examples/1.7.x/console-cli/examples/databases/get-index.md new file mode 100644 index 0000000000..0071834a8c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,4 @@ +appwrite databases getIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md new file mode 100644 index 0000000000..53c85fc849 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md @@ -0,0 +1,2 @@ +appwrite databases getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get.md b/docs/examples/1.7.x/console-cli/examples/databases/get.md new file mode 100644 index 0000000000..35480b64cc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get.md @@ -0,0 +1,2 @@ +appwrite databases get \ + --databaseId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md b/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 0000000000..a2382feb3a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,4 @@ +appwrite databases listAttributes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..eadac47a6b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite databases listCollectionLogs \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md b/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 0000000000..b05c330be2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,4 @@ +appwrite databases listCollections \ + --databaseId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..63b5394647 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite databases listDocumentLogs \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 0000000000..98e389579d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,4 @@ +appwrite databases listDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md b/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 0000000000..50acb4d7ad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,4 @@ +appwrite databases listIndexes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md new file mode 100644 index 0000000000..38547c7c3c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md @@ -0,0 +1,3 @@ +appwrite databases listLogs \ + --databaseId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list.md b/docs/examples/1.7.x/console-cli/examples/databases/list.md new file mode 100644 index 0000000000..e723bc32ec --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list.md @@ -0,0 +1,3 @@ +appwrite databases list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..f5adb497ec --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 0000000000..eab3617c80 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,7 @@ +appwrite databases updateCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..fe4a462664 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-document.md b/docs/examples/1.7.x/console-cli/examples/databases/update-document.md new file mode 100644 index 0000000000..a4ac55bf6b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +appwrite databases updateDocument \ + --databaseId \ + --collectionId \ + --documentId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..58510a6f8e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..21d56d3e64 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..a9bba3eb5e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..660cd4d148 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..a400eadc1e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6e2dbd927d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateRelationshipAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..526ece0b72 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e6f401b8ca --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update.md b/docs/examples/1.7.x/console-cli/examples/databases/update.md new file mode 100644 index 0000000000..a1e0a844e5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +appwrite databases update \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6ac80bd73a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +appwrite functions createDeployment \ + --functionId \ + --code 'path/to/file.png' \ + --activate false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..4839155bd2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,4 @@ +appwrite functions createDuplicateDeployment \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 0000000000..febe88c541 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,8 @@ +appwrite functions createExecution \ + --functionId \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..a6164a3d0b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite functions createTemplateDeployment \ + --functionId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 0000000000..f35f228d41 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,5 @@ +appwrite functions createVariable \ + --functionId \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..89f4caca66 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite functions createVcsDeployment \ + --functionId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create.md b/docs/examples/1.7.x/console-cli/examples/functions/create.md new file mode 100644 index 0000000000..ebca5741ed --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create.md @@ -0,0 +1,19 @@ +appwrite functions create \ + --functionId \ + --name \ + --runtime node-14.5 \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2c9a6aa04a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md new file mode 100644 index 0000000000..2926b5aaf1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md @@ -0,0 +1,3 @@ +appwrite functions deleteExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 0000000000..835d125dc6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,3 @@ +appwrite functions deleteVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete.md b/docs/examples/1.7.x/console-cli/examples/functions/delete.md new file mode 100644 index 0000000000..0eea41c849 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..485b608623 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite functions getDeploymentDownload \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3da1605fea --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 0000000000..d593f07c43 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-template.md b/docs/examples/1.7.x/console-cli/examples/functions/get-template.md new file mode 100644 index 0000000000..15c6068f35 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-template.md @@ -0,0 +1,2 @@ +appwrite functions getTemplate \ + --templateId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md b/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 0000000000..469db0f171 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,3 @@ +appwrite functions getUsage \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 0000000000..241a91d936 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,3 @@ +appwrite functions getVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get.md b/docs/examples/1.7.x/console-cli/examples/functions/get.md new file mode 100644 index 0000000000..f678ef7663 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md b/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 0000000000..2befb86abc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,4 @@ +appwrite functions listDeployments \ + --functionId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md b/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 0000000000..8d3136e6a4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,3 @@ +appwrite functions listExecutions \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..15dc019c44 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md b/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md new file mode 100644 index 0000000000..1d64bc68e7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md @@ -0,0 +1 @@ +appwrite functions listSpecifications diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md b/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md new file mode 100644 index 0000000000..b48bab53e1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md @@ -0,0 +1,5 @@ +appwrite functions listTemplates \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md b/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md new file mode 100644 index 0000000000..8ae7855f45 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md @@ -0,0 +1,2 @@ +appwrite functions listUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md b/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 0000000000..21bf2eb506 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,2 @@ +appwrite functions listVariables \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list.md b/docs/examples/1.7.x/console-cli/examples/functions/list.md new file mode 100644 index 0000000000..3b7551266e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list.md @@ -0,0 +1,3 @@ +appwrite functions list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..06d2dcdcf0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite functions updateDeploymentStatus \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..652bfe809e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateFunctionDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 0000000000..a2b10491c6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,6 @@ +appwrite functions updateVariable \ + --functionId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update.md b/docs/examples/1.7.x/console-cli/examples/functions/update.md new file mode 100644 index 0000000000..7ac63e0cd1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update.md @@ -0,0 +1,19 @@ +appwrite functions update \ + --functionId \ + --name \ + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md b/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 0000000000..f6127a175c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,2 @@ +appwrite graphql mutation \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/graphql/query.md b/docs/examples/1.7.x/console-cli/examples/graphql/query.md new file mode 100644 index 0000000000..1d84bcaa6a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/graphql/query.md @@ -0,0 +1,2 @@ +appwrite graphql query \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md b/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 0000000000..96dd7e78b2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-cache.md b/docs/examples/1.7.x/console-cli/examples/health/get-cache.md new file mode 100644 index 0000000000..ad1111ccf0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md b/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md new file mode 100644 index 0000000000..4659415822 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md @@ -0,0 +1,2 @@ +appwrite health getCertificate \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md b/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 0000000000..b0ea2d3eac --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..724299e384 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md @@ -0,0 +1,3 @@ +appwrite health getFailedJobs \ + --name v1-database \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md b/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..aa1773b35b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md @@ -0,0 +1 @@ +appwrite health getPubSub diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..7204c2c896 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md @@ -0,0 +1,2 @@ +appwrite health getQueueBuilds \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..203e8650cc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1,2 @@ +appwrite health getQueueCertificates \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..f30b941cbc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md @@ -0,0 +1,3 @@ +appwrite health getQueueDatabases \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..1d44146dc4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md @@ -0,0 +1,2 @@ +appwrite health getQueueDeletes \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..4aca467306 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1,2 @@ +appwrite health getQueueFunctions \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..3f1386b73a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1,2 @@ +appwrite health getQueueLogs \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a41f4c308b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md @@ -0,0 +1,2 @@ +appwrite health getQueueMails \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..11b7ff832b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md @@ -0,0 +1,2 @@ +appwrite health getQueueMessaging \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..2f17bb56f4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md @@ -0,0 +1,2 @@ +appwrite health getQueueMigrations \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..9cce963748 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md @@ -0,0 +1,2 @@ +appwrite health getQueueStatsResources \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..fed2f5fa46 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,2 @@ +appwrite health getQueueStatsUsageDump \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..d021a3faa1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md @@ -0,0 +1,2 @@ +appwrite health getQueueUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..471175bbe4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1,2 @@ +appwrite health getQueueWebhooks \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md b/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b5df39fae0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-storage.md b/docs/examples/1.7.x/console-cli/examples/health/get-storage.md new file mode 100644 index 0000000000..eccd21acc3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-storage.md @@ -0,0 +1 @@ +appwrite health getStorage diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-time.md b/docs/examples/1.7.x/console-cli/examples/health/get-time.md new file mode 100644 index 0000000000..067e5daf9e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/1.7.x/console-cli/examples/health/get.md b/docs/examples/1.7.x/console-cli/examples/health/get.md new file mode 100644 index 0000000000..94c08e5aa3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/1.7.x/console-cli/examples/locale/get.md b/docs/examples/1.7.x/console-cli/examples/locale/get.md new file mode 100644 index 0000000000..2002a06c20 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md b/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 0000000000..5586d1566c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1 @@ +appwrite locale listCodes diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md b/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 0000000000..775af5d9df --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1 @@ +appwrite locale listContinents diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..43b7eff7ad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale listCountriesEU diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..072516bf71 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1 @@ +appwrite locale listCountriesPhones diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 0000000000..ee7101df68 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1 @@ +appwrite locale listCountries diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md b/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 0000000000..01b1b3c4b2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1 @@ +appwrite locale listCurrencies diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md b/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 0000000000..d47622c570 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1 @@ +appwrite locale listLanguages diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..8b369f403d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createApnsProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md new file mode 100644 index 0000000000..2a8e03b7da --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md @@ -0,0 +1,13 @@ +appwrite messaging createEmail \ + --messageId \ + --subject \ + --content \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a19dcbe28c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging createFcmProvider \ + --providerId \ + --name \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6b07359194 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging createMailgunProvider \ + --providerId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..f687e36472 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging createMsg91Provider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md new file mode 100644 index 0000000000..18d8ec5aec --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md @@ -0,0 +1,20 @@ +appwrite messaging createPush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..de8d059abb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createSendgridProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md new file mode 100644 index 0000000000..dfc9b27ff3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md @@ -0,0 +1,8 @@ +appwrite messaging createSms \ + --messageId \ + --content \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..13f04fe648 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging createSmtpProvider \ + --providerId \ + --name \ + --host \ + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5e65c36df7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md @@ -0,0 +1,4 @@ +appwrite messaging createSubscriber \ + --topicId \ + --subscriberId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..783f7594fd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTelesignProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..77185c71de --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTextmagicProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md new file mode 100644 index 0000000000..1d57e1cee0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md @@ -0,0 +1,4 @@ +appwrite messaging createTopic \ + --topicId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..91fdaae96b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTwilioProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..1939d1c04b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createVonageProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a93885573c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md @@ -0,0 +1,2 @@ +appwrite messaging deleteProvider \ + --providerId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c535154df6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging deleteSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..1fa387c6ab --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md @@ -0,0 +1,2 @@ +appwrite messaging deleteTopic \ + --topicId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete.md new file mode 100644 index 0000000000..82ff141b03 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete.md @@ -0,0 +1,2 @@ +appwrite messaging delete \ + --messageId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md new file mode 100644 index 0000000000..0144f79699 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md @@ -0,0 +1,2 @@ +appwrite messaging getMessage \ + --messageId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md new file mode 100644 index 0000000000..9da9f2d864 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md @@ -0,0 +1,2 @@ +appwrite messaging getProvider \ + --providerId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..02f8bc0e57 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging getSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md new file mode 100644 index 0000000000..feb2dc66b6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md @@ -0,0 +1,2 @@ +appwrite messaging getTopic \ + --topicId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..91366f35f7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listMessageLogs \ + --messageId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md new file mode 100644 index 0000000000..6ab04b0fd2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md @@ -0,0 +1,3 @@ +appwrite messaging listMessages \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0dee2e3f4b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listProviderLogs \ + --providerId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md new file mode 100644 index 0000000000..0a2ce47a3f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md @@ -0,0 +1,3 @@ +appwrite messaging listProviders \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..4a04ac4373 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listSubscriberLogs \ + --subscriberId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..2eed8bd3f0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md @@ -0,0 +1,4 @@ +appwrite messaging listSubscribers \ + --topicId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md new file mode 100644 index 0000000000..7efa50ee3b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md @@ -0,0 +1,3 @@ +appwrite messaging listTargets \ + --messageId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..f23c10aba6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listTopicLogs \ + --topicId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1810a7bd7b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md @@ -0,0 +1,3 @@ +appwrite messaging listTopics \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..9e895a066a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateApnsProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md new file mode 100644 index 0000000000..934fd29213 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md @@ -0,0 +1,13 @@ +appwrite messaging updateEmail \ + --messageId \ + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..000022361f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging updateFcmProvider \ + --providerId \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f35c5e9157 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging updateMailgunProvider \ + --providerId \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..8e2d604a19 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateMsg91Provider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md new file mode 100644 index 0000000000..1f4427cee7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md @@ -0,0 +1,20 @@ +appwrite messaging updatePush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..7f2e97dbf7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateSendgridProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md new file mode 100644 index 0000000000..a30ff43d0c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md @@ -0,0 +1,8 @@ +appwrite messaging updateSms \ + --messageId \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..4e0f7b6b8d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging updateSmtpProvider \ + --providerId \ + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..0a92f2cacd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTelesignProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..79160b2461 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTextmagicProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md new file mode 100644 index 0000000000..d10b0edde3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md @@ -0,0 +1,4 @@ +appwrite messaging updateTopic \ + --topicId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..c967d724af --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTwilioProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..11f7963be2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateVonageProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..73e9ee62d8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,5 @@ +appwrite migrations createAppwriteMigration \ + --resources one two three \ + --endpoint https://example.com \ + --projectId \ + --apiKey diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..594bc85052 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md @@ -0,0 +1,4 @@ +appwrite migrations createCsvMigration \ + --bucketId \ + --fileId \ + --resourceId [ID1:ID2] diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..3dfb3aeac6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseMigration \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..d959897109 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md @@ -0,0 +1,9 @@ +appwrite migrations createNHostMigration \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..0620f3ba2e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md @@ -0,0 +1,8 @@ +appwrite migrations createSupabaseMigration \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/delete.md b/docs/examples/1.7.x/console-cli/examples/migrations/delete.md new file mode 100644 index 0000000000..9dac1aa3db --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/delete.md @@ -0,0 +1,2 @@ +appwrite migrations delete \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..745e9fb98c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md @@ -0,0 +1,5 @@ +appwrite migrations getAppwriteReport \ + --resources one two three \ + --endpoint https://example.com \ + --projectID \ + --key diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..73c7e1ca14 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReport \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..6b7e2eaff2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md @@ -0,0 +1,9 @@ +appwrite migrations getNHostReport \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..9754f38e24 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md @@ -0,0 +1,8 @@ +appwrite migrations getSupabaseReport \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get.md b/docs/examples/1.7.x/console-cli/examples/migrations/get.md new file mode 100644 index 0000000000..8810646c7e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get.md @@ -0,0 +1,2 @@ +appwrite migrations get \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/list.md b/docs/examples/1.7.x/console-cli/examples/migrations/list.md new file mode 100644 index 0000000000..c120a61e80 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/list.md @@ -0,0 +1,3 @@ +appwrite migrations list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/retry.md b/docs/examples/1.7.x/console-cli/examples/migrations/retry.md new file mode 100644 index 0000000000..518f86cee7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/retry.md @@ -0,0 +1,2 @@ +appwrite migrations retry \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/project/create-variable.md b/docs/examples/1.7.x/console-cli/examples/project/create-variable.md new file mode 100644 index 0000000000..253d6ddf75 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,4 @@ +appwrite project createVariable \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 0000000000..7fdda874fd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,2 @@ +appwrite project deleteVariable \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/project/get-usage.md b/docs/examples/1.7.x/console-cli/examples/project/get-usage.md new file mode 100644 index 0000000000..9b4c296a8c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/get-usage.md @@ -0,0 +1,4 @@ +appwrite project getUsage \ + --startDate '' \ + --endDate '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/project/get-variable.md b/docs/examples/1.7.x/console-cli/examples/project/get-variable.md new file mode 100644 index 0000000000..b2d482586b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,2 @@ +appwrite project getVariable \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/project/list-variables.md b/docs/examples/1.7.x/console-cli/examples/project/list-variables.md new file mode 100644 index 0000000000..bd26c7db6b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/list-variables.md @@ -0,0 +1 @@ +appwrite project listVariables diff --git a/docs/examples/1.7.x/console-cli/examples/project/update-variable.md b/docs/examples/1.7.x/console-cli/examples/project/update-variable.md new file mode 100644 index 0000000000..4365b64888 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,5 @@ +appwrite project updateVariable \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..d703d36b65 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite projects createJWT \ + --projectId \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-key.md b/docs/examples/1.7.x/console-cli/examples/projects/create-key.md new file mode 100644 index 0000000000..fb986dcebc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,5 @@ +appwrite projects createKey \ + --projectId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 0000000000..8727d21d64 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId \ + --type web \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md b/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..66ce5880aa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md @@ -0,0 +1,11 @@ +appwrite projects createSmtpTest \ + --projectId \ + --emails one two three \ + --senderName \ + --senderEmail email@example.com \ + --host '' \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 0000000000..03ecf4110d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,9 @@ +appwrite projects createWebhook \ + --projectId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create.md b/docs/examples/1.7.x/console-cli/examples/projects/create.md new file mode 100644 index 0000000000..0504785503 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create.md @@ -0,0 +1,14 @@ +appwrite projects create \ + --projectId '' \ + --name \ + --teamId \ + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..01ce0fac68 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 0000000000..6baf05706e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 0000000000..a85bd865ba --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..3afcf649c7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..a67301ef07 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete.md b/docs/examples/1.7.x/console-cli/examples/projects/delete.md new file mode 100644 index 0000000000..a4ffc70c91 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete.md @@ -0,0 +1,2 @@ +appwrite projects delete \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md new file mode 100644 index 0000000000..6e4c21e52b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md @@ -0,0 +1,4 @@ +appwrite projects getEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-key.md b/docs/examples/1.7.x/console-cli/examples/projects/get-key.md new file mode 100644 index 0000000000..f69b51bbe2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 0000000000..67648be035 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..c655953c8e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects getSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 0000000000..890bf37069 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get.md b/docs/examples/1.7.x/console-cli/examples/projects/get.md new file mode 100644 index 0000000000..919321b81d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md b/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 0000000000..cc37680b5b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md b/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 0000000000..5fc2ea4106 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..dcf9953f80 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list.md b/docs/examples/1.7.x/console-cli/examples/projects/list.md new file mode 100644 index 0000000000..0d3dd7a539 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list.md @@ -0,0 +1,3 @@ +appwrite projects list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..e5f63c59a3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateApiStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md new file mode 100644 index 0000000000..01120957af --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md @@ -0,0 +1,4 @@ +appwrite projects updateApiStatus \ + --projectId \ + --api rest \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..ad6f8ac97c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthDuration \ + --projectId \ + --duration 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..9d01fa5a1a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..f477bba56d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordDictionary \ + --projectId \ + --enabled false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..8b9b90a32a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordHistory \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..2a1294d17b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthSessionsLimit \ + --projectId \ + --limit 1 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..848987b2f8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId \ + --method email-password \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md new file mode 100644 index 0000000000..a3acd066ec --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md @@ -0,0 +1,9 @@ +appwrite projects updateEmailTemplate \ + --projectId \ + --type verification \ + --locale af \ + --subject \ + --message \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-key.md b/docs/examples/1.7.x/console-cli/examples/projects/update-key.md new file mode 100644 index 0000000000..6d3dc198da --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,6 @@ +appwrite projects updateKey \ + --projectId \ + --keyId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md b/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..6c811ccfce --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md @@ -0,0 +1,5 @@ +appwrite projects updateMembershipsPrivacy \ + --projectId \ + --userName false \ + --userEmail false \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md b/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..733cc16887 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md @@ -0,0 +1,3 @@ +appwrite projects updateMockNumbers \ + --projectId \ + --numbers one two three diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..92f6718962 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,6 @@ +appwrite projects updateOAuth2 \ + --projectId \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md b/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..21dca78369 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md @@ -0,0 +1,3 @@ +appwrite projects updatePersonalDataCheck \ + --projectId \ + --enabled false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 0000000000..05b1602ae9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId \ + --platformId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..1ffb77e085 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateServiceStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 0000000000..03963a1214 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId \ + --service account \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md b/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..bd23b7417a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionAlerts \ + --projectId \ + --alerts false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..fc8310eb25 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSmsTemplate \ + --projectId \ + --type verification \ + --locale af \ + --message diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md b/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md new file mode 100644 index 0000000000..0afbe9cec9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md @@ -0,0 +1,11 @@ +appwrite projects updateSmtp \ + --projectId \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-team.md b/docs/examples/1.7.x/console-cli/examples/projects/update-team.md new file mode 100644 index 0000000000..49214ad9f3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-team.md @@ -0,0 +1,3 @@ +appwrite projects updateTeam \ + --projectId \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..6034ef01f6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md @@ -0,0 +1,3 @@ +appwrite projects updateWebhookSignature \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 0000000000..51c536d74c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,10 @@ +appwrite projects updateWebhook \ + --projectId \ + --webhookId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update.md b/docs/examples/1.7.x/console-cli/examples/projects/update.md new file mode 100644 index 0000000000..d4df289636 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId \ + --name \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..5746b94b1e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,2 @@ +appwrite proxy createAPIRule \ + --domain '' diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..380650c208 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createFunctionRule \ + --domain '' \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..f975ce686e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createRedirectRule \ + --domain '' \ + --url https://example.com \ + --statusCode 301 diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..eb41bd7158 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createSiteRule \ + --domain '' \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..b11b6ca23e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,2 @@ +appwrite proxy deleteRule \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 0000000000..85d11a50b1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,2 @@ +appwrite proxy getRule \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md b/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 0000000000..bc654bac5c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,3 @@ +appwrite proxy listRules \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md b/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..8200d15702 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md @@ -0,0 +1,2 @@ +appwrite proxy updateRuleVerification \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md new file mode 100644 index 0000000000..a83d7f3cfe --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createDeployment \ + --siteId \ + --code 'path/to/file.png' \ + --activate false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..bab63ca8a3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,3 @@ +appwrite sites createDuplicateDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..2aaaf445db --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createTemplateDeployment \ + --siteId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md new file mode 100644 index 0000000000..b640321317 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md @@ -0,0 +1,5 @@ +appwrite sites createVariable \ + --siteId \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..85c96f93ec --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite sites createVcsDeployment \ + --siteId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create.md b/docs/examples/1.7.x/console-cli/examples/sites/create.md new file mode 100644 index 0000000000..bd7e86e70f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create.md @@ -0,0 +1,19 @@ +appwrite sites create \ + --siteId \ + --name \ + --framework analog \ + --buildRuntime node-14.5 \ + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c1cbf49637 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite sites deleteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md new file mode 100644 index 0000000000..6769be255c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md @@ -0,0 +1,3 @@ +appwrite sites deleteLog \ + --siteId \ + --logId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md new file mode 100644 index 0000000000..60d9ecf4eb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md @@ -0,0 +1,3 @@ +appwrite sites deleteVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete.md b/docs/examples/1.7.x/console-cli/examples/sites/delete.md new file mode 100644 index 0000000000..9071454850 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete.md @@ -0,0 +1,2 @@ +appwrite sites delete \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..1fae298796 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite sites getDeploymentDownload \ + --siteId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md new file mode 100644 index 0000000000..93680ff70d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md @@ -0,0 +1,3 @@ +appwrite sites getDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-log.md b/docs/examples/1.7.x/console-cli/examples/sites/get-log.md new file mode 100644 index 0000000000..7867aba05e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-log.md @@ -0,0 +1,3 @@ +appwrite sites getLog \ + --siteId \ + --logId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-template.md b/docs/examples/1.7.x/console-cli/examples/sites/get-template.md new file mode 100644 index 0000000000..e04dd2e120 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-template.md @@ -0,0 +1,2 @@ +appwrite sites getTemplate \ + --templateId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md b/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md new file mode 100644 index 0000000000..6de7d6bde8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md @@ -0,0 +1,3 @@ +appwrite sites getUsage \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md new file mode 100644 index 0000000000..b60b577c38 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md @@ -0,0 +1,3 @@ +appwrite sites getVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get.md b/docs/examples/1.7.x/console-cli/examples/sites/get.md new file mode 100644 index 0000000000..7922efa5f0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get.md @@ -0,0 +1,2 @@ +appwrite sites get \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md b/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md new file mode 100644 index 0000000000..5ab2cdc104 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md @@ -0,0 +1,4 @@ +appwrite sites listDeployments \ + --siteId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md b/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..1d9b6b4b87 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md @@ -0,0 +1 @@ +appwrite sites listFrameworks diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md b/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md new file mode 100644 index 0000000000..f13864fe6b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md @@ -0,0 +1,3 @@ +appwrite sites listLogs \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md b/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md new file mode 100644 index 0000000000..dc1a16c9dc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md @@ -0,0 +1 @@ +appwrite sites listSpecifications diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md b/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md new file mode 100644 index 0000000000..9d93913d94 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md @@ -0,0 +1,5 @@ +appwrite sites listTemplates \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md b/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md new file mode 100644 index 0000000000..a6f43f61e7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md @@ -0,0 +1,2 @@ +appwrite sites listUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md b/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md new file mode 100644 index 0000000000..13a258b054 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md @@ -0,0 +1,2 @@ +appwrite sites listVariables \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list.md b/docs/examples/1.7.x/console-cli/examples/sites/list.md new file mode 100644 index 0000000000..0cad70e894 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list.md @@ -0,0 +1,3 @@ +appwrite sites list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..7923b384f6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite sites updateDeploymentStatus \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..de877d8ae7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md @@ -0,0 +1,3 @@ +appwrite sites updateSiteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md new file mode 100644 index 0000000000..e968771056 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md @@ -0,0 +1,6 @@ +appwrite sites updateVariable \ + --siteId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update.md b/docs/examples/1.7.x/console-cli/examples/sites/update.md new file mode 100644 index 0000000000..192ee26e3e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update.md @@ -0,0 +1,19 @@ +appwrite sites update \ + --siteId \ + --name \ + --framework analog \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 0000000000..878c10d253 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/create-file.md b/docs/examples/1.7.x/console-cli/examples/storage/create-file.md new file mode 100644 index 0000000000..67bd4da2c0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,5 @@ +appwrite storage createFile \ + --bucketId \ + --fileId \ + --file 'path/to/file.png' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e51797e12c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md b/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 0000000000..79c03e8288 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..df3659c60a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 0000000000..cf8725b35d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 0000000000..c97c074b35 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,3 @@ +appwrite storage getFileDownload \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..82565fb5e7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,14 @@ +appwrite storage getFilePreview \ + --bucketId \ + --fileId \ + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 0000000000..ac3bb9d742 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,3 @@ +appwrite storage getFileView \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file.md new file mode 100644 index 0000000000..641c20d2b0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md b/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 0000000000..29466e02f0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md b/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a5cad1988f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,3 @@ +appwrite storage listBuckets \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/list-files.md b/docs/examples/1.7.x/console-cli/examples/storage/list-files.md new file mode 100644 index 0000000000..0e1c2f09c0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,4 @@ +appwrite storage listFiles \ + --bucketId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b006a7bf74 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/update-file.md b/docs/examples/1.7.x/console-cli/examples/storage/update-file.md new file mode 100644 index 0000000000..593ea658a0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId \ + --fileId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 0000000000..0d0fc8df09 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,8 @@ +appwrite teams createMembership \ + --teamId \ + --roles one two three \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/create.md b/docs/examples/1.7.x/console-cli/examples/teams/create.md new file mode 100644 index 0000000000..e0f9a126f2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 0000000000..58d0adbac7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/delete.md b/docs/examples/1.7.x/console-cli/examples/teams/delete.md new file mode 100644 index 0000000000..5b018158cd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 0000000000..5e6af4c1a1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 0000000000..2ab1f1dc01 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,2 @@ +appwrite teams getPrefs \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get.md b/docs/examples/1.7.x/console-cli/examples/teams/get.md new file mode 100644 index 0000000000..c8e75b7543 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md b/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 0000000000..66149350d8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,3 @@ +appwrite teams listLogs \ + --teamId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md b/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 0000000000..050ea961d2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,4 @@ +appwrite teams listMemberships \ + --teamId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list.md b/docs/examples/1.7.x/console-cli/examples/teams/list.md new file mode 100644 index 0000000000..dfffc4d4dd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list.md @@ -0,0 +1,3 @@ +appwrite teams list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..aa4acf9457 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId \ + --membershipId \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md new file mode 100644 index 0000000000..6cfda92920 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,4 @@ +appwrite teams updateMembership \ + --teamId \ + --membershipId \ + --roles one two three diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-name.md b/docs/examples/1.7.x/console-cli/examples/teams/update-name.md new file mode 100644 index 0000000000..8c73e00d7b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,3 @@ +appwrite teams updateName \ + --teamId \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b6fc5a8f6e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,3 @@ +appwrite teams updatePrefs \ + --teamId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..6cb1fef5ba --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md @@ -0,0 +1,5 @@ +appwrite tokens createFileToken \ + --bucketId \ + --fileId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/delete.md b/docs/examples/1.7.x/console-cli/examples/tokens/delete.md new file mode 100644 index 0000000000..c25ea4a4b4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/delete.md @@ -0,0 +1,2 @@ +appwrite tokens delete \ + --tokenId diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..7214f07ef2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/get-j-w-t.md @@ -0,0 +1,2 @@ +appwrite tokens getJWT \ + --tokenId diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/get.md b/docs/examples/1.7.x/console-cli/examples/tokens/get.md new file mode 100644 index 0000000000..2c48280b0d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/get.md @@ -0,0 +1,2 @@ +appwrite tokens get \ + --tokenId diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/list.md b/docs/examples/1.7.x/console-cli/examples/tokens/list.md new file mode 100644 index 0000000000..a808e545ca --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/list.md @@ -0,0 +1,4 @@ +appwrite tokens list \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/update.md b/docs/examples/1.7.x/console-cli/examples/tokens/update.md new file mode 100644 index 0000000000..089b535167 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/update.md @@ -0,0 +1,4 @@ +appwrite tokens update \ + --tokenId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md b/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md new file mode 100644 index 0000000000..b0c7494e20 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md @@ -0,0 +1,5 @@ +appwrite users createArgon2User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..b5686721b5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,5 @@ +appwrite users createBcryptUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..220086bb1a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite users createJWT \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md b/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..ba37a78be2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md @@ -0,0 +1,5 @@ +appwrite users createMD5User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..4dbd98ff8a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users createMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9dc378dc99 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md @@ -0,0 +1,5 @@ +appwrite users createPHPassUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..57483625e9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md @@ -0,0 +1,6 @@ +appwrite users createSHAUser \ + --userId \ + --email email@example.com \ + --password password \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..25fc60b6e1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,8 @@ +appwrite users createScryptModifiedUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordSaltSeparator \ + --passwordSignerKey \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..3fc56b1ee3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,10 @@ +appwrite users createScryptUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordCpu null \ + --passwordMemory null \ + --passwordParallel null \ + --passwordLength null \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-session.md b/docs/examples/1.7.x/console-cli/examples/users/create-session.md new file mode 100644 index 0000000000..c8938fa706 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-session.md @@ -0,0 +1,2 @@ +appwrite users createSession \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-target.md b/docs/examples/1.7.x/console-cli/examples/users/create-target.md new file mode 100644 index 0000000000..8d9306b00e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-target.md @@ -0,0 +1,7 @@ +appwrite users createTarget \ + --userId \ + --targetId \ + --providerType email \ + --identifier \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-token.md b/docs/examples/1.7.x/console-cli/examples/users/create-token.md new file mode 100644 index 0000000000..9962e72c73 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-token.md @@ -0,0 +1,4 @@ +appwrite users createToken \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create.md b/docs/examples/1.7.x/console-cli/examples/users/create.md new file mode 100644 index 0000000000..e828f56ecb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create.md @@ -0,0 +1,6 @@ +appwrite users create \ + --userId \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md b/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 0000000000..f3d2d6d980 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,2 @@ +appwrite users deleteIdentity \ + --identityId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..edc67d0b9a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite users deleteMfaAuthenticator \ + --userId \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-session.md b/docs/examples/1.7.x/console-cli/examples/users/delete-session.md new file mode 100644 index 0000000000..9f1fbdbfb3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md b/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 0000000000..4c683d270a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-target.md b/docs/examples/1.7.x/console-cli/examples/users/delete-target.md new file mode 100644 index 0000000000..e9780911fd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-target.md @@ -0,0 +1,3 @@ +appwrite users deleteTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete.md b/docs/examples/1.7.x/console-cli/examples/users/delete.md new file mode 100644 index 0000000000..293a5b040d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cefcce607a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users getMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 0000000000..324aa4f508 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-target.md b/docs/examples/1.7.x/console-cli/examples/users/get-target.md new file mode 100644 index 0000000000..b80dbd9728 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-target.md @@ -0,0 +1,3 @@ +appwrite users getTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-usage.md b/docs/examples/1.7.x/console-cli/examples/users/get-usage.md new file mode 100644 index 0000000000..ad7895d3aa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,2 @@ +appwrite users getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/get.md b/docs/examples/1.7.x/console-cli/examples/users/get.md new file mode 100644 index 0000000000..47002c5063 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-identities.md b/docs/examples/1.7.x/console-cli/examples/users/list-identities.md new file mode 100644 index 0000000000..c6cd6d5e28 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,3 @@ +appwrite users listIdentities \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-logs.md b/docs/examples/1.7.x/console-cli/examples/users/list-logs.md new file mode 100644 index 0000000000..0b0bc1f50f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-logs.md @@ -0,0 +1,3 @@ +appwrite users listLogs \ + --userId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md b/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 0000000000..119f446ec9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,4 @@ +appwrite users listMemberships \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e5d111b8ee --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md @@ -0,0 +1,2 @@ +appwrite users listMfaFactors \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md b/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 0000000000..cb85d15ff6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,2 @@ +appwrite users listSessions \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-targets.md b/docs/examples/1.7.x/console-cli/examples/users/list-targets.md new file mode 100644 index 0000000000..9b5614bd32 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-targets.md @@ -0,0 +1,3 @@ +appwrite users listTargets \ + --userId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list.md b/docs/examples/1.7.x/console-cli/examples/users/list.md new file mode 100644 index 0000000000..e5fdb9e5c5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list.md @@ -0,0 +1,3 @@ +appwrite users list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md b/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md new file mode 100644 index 0000000000..990436f38b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,3 @@ +appwrite users updateEmailVerification \ + --userId \ + --emailVerification false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-email.md b/docs/examples/1.7.x/console-cli/examples/users/update-email.md new file mode 100644 index 0000000000..cce20e9ebf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId \ + --email email@example.com diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-labels.md b/docs/examples/1.7.x/console-cli/examples/users/update-labels.md new file mode 100644 index 0000000000..ca60c59683 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,3 @@ +appwrite users updateLabels \ + --userId \ + --labels one two three diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..63fb7f25eb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users updateMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md b/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ccdbd8fdf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md @@ -0,0 +1,3 @@ +appwrite users updateMfa \ + --userId \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-name.md b/docs/examples/1.7.x/console-cli/examples/users/update-name.md new file mode 100644 index 0000000000..9bf20eb117 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-password.md b/docs/examples/1.7.x/console-cli/examples/users/update-password.md new file mode 100644 index 0000000000..c05197b3c2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId \ + --password '' diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b88a282d48 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite users updatePhoneVerification \ + --userId \ + --phoneVerification false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-phone.md b/docs/examples/1.7.x/console-cli/examples/users/update-phone.md new file mode 100644 index 0000000000..118c8e3557 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,3 @@ +appwrite users updatePhone \ + --userId \ + --number +12065550100 diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 0000000000..f3fa995e4d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-status.md b/docs/examples/1.7.x/console-cli/examples/users/update-status.md new file mode 100644 index 0000000000..b587b70e9e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-target.md b/docs/examples/1.7.x/console-cli/examples/users/update-target.md new file mode 100644 index 0000000000..d6541a0600 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-target.md @@ -0,0 +1,6 @@ +appwrite users updateTarget \ + --userId \ + --targetId \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..d12a093d2d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md @@ -0,0 +1,5 @@ +appwrite vcs createRepositoryDetection \ + --installationId \ + --providerRepositoryId \ + --type runtime \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md new file mode 100644 index 0000000000..a4934d5ef5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md @@ -0,0 +1,4 @@ +appwrite vcs createRepository \ + --installationId \ + --name \ + --private false diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md b/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..f7d3a92001 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md @@ -0,0 +1,2 @@ +appwrite vcs deleteInstallation \ + --installationId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md new file mode 100644 index 0000000000..df51853ea4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md @@ -0,0 +1,2 @@ +appwrite vcs getInstallation \ + --installationId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..7d378d7efa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md @@ -0,0 +1,4 @@ +appwrite vcs getRepositoryContents \ + --installationId \ + --providerRepositoryId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md new file mode 100644 index 0000000000..9f88e18eef --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md @@ -0,0 +1,3 @@ +appwrite vcs getRepository \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md new file mode 100644 index 0000000000..a0af28dfbb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md @@ -0,0 +1,3 @@ +appwrite vcs listInstallations \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..15c3a643bb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md @@ -0,0 +1,4 @@ +appwrite vcs listRepositories \ + --installationId \ + --type runtime \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..ea2fbd29fb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositoryBranches \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md b/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..417b59431d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md @@ -0,0 +1,4 @@ +appwrite vcs updateExternalDeployments \ + --installationId \ + --repositoryId \ + --providerPullRequestId diff --git a/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..039762000c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md b/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..495141233f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-email-token.md b/docs/examples/1.7.x/console-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..cdb9a17a14 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..2bddca5999 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..9a6720e1b1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..e504c46d07 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..ee1856f694 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..97c21cf000 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..0397096273 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..6a5410cfac --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md b/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..c1b13a59a0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md b/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..2e6fb254b8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-push-target.md b/docs/examples/1.7.x/console-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..4d2e40e050 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-recovery.md b/docs/examples/1.7.x/console-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..7ea62f5044 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-session.md b/docs/examples/1.7.x/console-web/examples/account/create-session.md new file mode 100644 index 0000000000..c846044ac6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-verification.md b/docs/examples/1.7.x/console-web/examples/account/create-verification.md new file mode 100644 index 0000000000..83e0ef210e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create.md b/docs/examples/1.7.x/console-web/examples/account/create.md new file mode 100644 index 0000000000..1b690751f1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-identity.md b/docs/examples/1.7.x/console-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..d76c2ca973 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..ee7ac2182d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md b/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..339778702a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-session.md b/docs/examples/1.7.x/console-web/examples/account/delete-session.md new file mode 100644 index 0000000000..bd571a1c49 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md b/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..038d44722a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete.md b/docs/examples/1.7.x/console-web/examples/account/delete.md new file mode 100644 index 0000000000..9117d0362a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.delete(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0e41b2af64 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-prefs.md b/docs/examples/1.7.x/console-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..e396b21cd0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-session.md b/docs/examples/1.7.x/console-web/examples/account/get-session.md new file mode 100644 index 0000000000..acebeed3b8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get.md b/docs/examples/1.7.x/console-web/examples/account/get.md new file mode 100644 index 0000000000..e1ee3f2a30 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-identities.md b/docs/examples/1.7.x/console-web/examples/account/list-identities.md new file mode 100644 index 0000000000..454de11ad3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-logs.md b/docs/examples/1.7.x/console-web/examples/account/list-logs.md new file mode 100644 index 0000000000..d10bba4e04 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..8dad6f6d81 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-sessions.md b/docs/examples/1.7.x/console-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..a12572356a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-email.md b/docs/examples/1.7.x/console-web/examples/account/update-email.md new file mode 100644 index 0000000000..97e8d277e3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md b/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..c0d19160ab --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..7c32609f8a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9da8a85dbb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..abe45ae56f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..bf2e831ffc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-name.md b/docs/examples/1.7.x/console-web/examples/account/update-name.md new file mode 100644 index 0000000000..157e5a0637 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-password.md b/docs/examples/1.7.x/console-web/examples/account/update-password.md new file mode 100644 index 0000000000..4067ec48a2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..a2f7c25fde --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..c2124ee9dd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone.md b/docs/examples/1.7.x/console-web/examples/account/update-phone.md new file mode 100644 index 0000000000..1f872bb008 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-prefs.md b/docs/examples/1.7.x/console-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..881cbdc01d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-push-target.md b/docs/examples/1.7.x/console-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..8fa69ae2c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-recovery.md b/docs/examples/1.7.x/console-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..e805da3c50 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-session.md b/docs/examples/1.7.x/console-web/examples/account/update-session.md new file mode 100644 index 0000000000..0e2a034d25 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-status.md b/docs/examples/1.7.x/console-web/examples/account/update-status.md new file mode 100644 index 0000000000..7b520eaffe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-verification.md b/docs/examples/1.7.x/console-web/examples/account/update-verification.md new file mode 100644 index 0000000000..7a5f808883 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/assistant/chat.md b/docs/examples/1.7.x/console-web/examples/assistant/chat.md new file mode 100644 index 0000000000..a8c8bc3bc4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/assistant/chat.md @@ -0,0 +1,13 @@ +import { Client, Assistant } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const assistant = new Assistant(client); + +const result = await assistant.chat( + '' // prompt +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..63964248df --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a7ae420555 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..943738448d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..c4fc90f05a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-image.md b/docs/examples/1.7.x/console-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..52d576423d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..572fef9aa0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..814262a0a7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/console/get-resource.md b/docs/examples/1.7.x/console-web/examples/console/get-resource.md new file mode 100644 index 0000000000..d543140075 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/console/get-resource.md @@ -0,0 +1,14 @@ +import { Client, Console, ConsoleResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.getResource( + '', // value + ConsoleResourceType.Rules // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/console/variables.md b/docs/examples/1.7.x/console-web/examples/console/variables.md new file mode 100644 index 0000000000..af164e8d29 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/console/variables.md @@ -0,0 +1,11 @@ +import { Client, Console } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.variables(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..a36b038537 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-collection.md b/docs/examples/1.7.x/console-web/examples/databases/create-collection.md new file mode 100644 index 0000000000..5eb2deb849 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..931e830410 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-document.md b/docs/examples/1.7.x/console-web/examples/databases/create-document.md new file mode 100644 index 0000000000..8ac52730b1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..473d080492 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..8b9ee05036 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c2c514e96c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-index.md b/docs/examples/1.7.x/console-web/examples/databases/create-index.md new file mode 100644 index 0000000000..af0a1c1099 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import { Client, Databases, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIndex( + '', // databaseId + '', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [] // orders (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..5e5a86ab67 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..df6b3053b5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b92ca66cd6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..684644f097 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createStringAttribute( + '', // databaseId + '', // collectionId + '', // key + 1, // size + false, // required + '', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..09818ec555 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create.md b/docs/examples/1.7.x/console-web/examples/databases/create.md new file mode 100644 index 0000000000..4f7dd3b01c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.create( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8fa5240bbe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 0000000000..bf68fd2ef8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-document.md b/docs/examples/1.7.x/console-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..f9a291d7a0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-index.md b/docs/examples/1.7.x/console-web/examples/databases/delete-index.md new file mode 100644 index 0000000000..efd2177dc5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete.md b/docs/examples/1.7.x/console-web/examples/databases/delete.md new file mode 100644 index 0000000000..22d4e85c6b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.delete( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 0000000000..5043a2bf63 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..c20d43d8f5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md @@ -0,0 +1,15 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollectionUsage( + '', // databaseId + '', // collectionId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-collection.md b/docs/examples/1.7.x/console-web/examples/databases/get-collection.md new file mode 100644 index 0000000000..c6c344f300 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..c97d32baca --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDatabaseUsage( + '', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-document.md b/docs/examples/1.7.x/console-web/examples/databases/get-document.md new file mode 100644 index 0000000000..0445711f22 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-index.md b/docs/examples/1.7.x/console-web/examples/databases/get-index.md new file mode 100644 index 0000000000..055ce9d332 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-usage.md new file mode 100644 index 0000000000..e50baf9c27 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get.md b/docs/examples/1.7.x/console-web/examples/databases/get.md new file mode 100644 index 0000000000..98fb181aa9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.get( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 0000000000..f6f63e3095 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listAttributes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..84965ef1c1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollectionLogs( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-collections.md b/docs/examples/1.7.x/console-web/examples/databases/list-collections.md new file mode 100644 index 0000000000..5af0d4d2f1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollections( + '', // databaseId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..2d47eddcfe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocumentLogs( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-documents.md b/docs/examples/1.7.x/console-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..b6ebc69b10 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 0000000000..c6b14e2df9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listIndexes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-logs.md new file mode 100644 index 0000000000..e42c634f23 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listLogs( + '', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list.md b/docs/examples/1.7.x/console-web/examples/databases/list.md new file mode 100644 index 0000000000..f745cc06c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..e5ac5a1914 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-collection.md b/docs/examples/1.7.x/console-web/examples/databases/update-collection.md new file mode 100644 index 0000000000..1953ca98c0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..505575e90a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-document.md b/docs/examples/1.7.x/console-web/examples/databases/update-document.md new file mode 100644 index 0000000000..6f81f2e612 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e07cd31c26 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..0303363658 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..3cdcd62107 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..72aa2379b3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..c5d368ab1d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..ea0c2adb12 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..81ab2db86f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateStringAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..ea256ce7bd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update.md b/docs/examples/1.7.x/console-web/examples/databases/update.md new file mode 100644 index 0000000000..4b98d8c205 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.update( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 0000000000..3538da048f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDeployment( + '', // functionId + document.getElementById('uploader').files[0], // code + false, // activate + '', // entrypoint (optional) + '' // commands (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..e5bd9243b3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDuplicateDeployment( + '', // functionId + '', // deploymentId + '' // buildId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-execution.md b/docs/examples/1.7.x/console-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..881c906464 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..f36e64b422 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createTemplateDeployment( + '', // functionId + '', // repository + '', // owner + '', // rootDirectory + '', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-variable.md b/docs/examples/1.7.x/console-web/examples/functions/create-variable.md new file mode 100644 index 0000000000..98203beeb8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVariable( + '', // functionId + '', // key + '', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..8378938443 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVcsDeployment( + '', // functionId + VCSDeploymentType.Branch, // type + '', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create.md b/docs/examples/1.7.x/console-web/examples/functions/create.md new file mode 100644 index 0000000000..12616ce60e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.create( + '', // functionId + '', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..4fc6cc3130 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md b/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md new file mode 100644 index 0000000000..5cf63e6c07 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 0000000000..f2b6335b3f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete.md b/docs/examples/1.7.x/console-web/examples/functions/delete.md new file mode 100644 index 0000000000..8d3a1a3b7d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.delete( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..27627efbea --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Functions, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '', // functionId + '', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 0000000000..0416192405 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-execution.md b/docs/examples/1.7.x/console-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..a1831fee1d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-template.md b/docs/examples/1.7.x/console-web/examples/functions/get-template.md new file mode 100644 index 0000000000..2babd703ea --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-template.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getTemplate( + '' // templateId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-usage.md b/docs/examples/1.7.x/console-web/examples/functions/get-usage.md new file mode 100644 index 0000000000..c99daf22a3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getUsage( + '', // functionId + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-variable.md b/docs/examples/1.7.x/console-web/examples/functions/get-variable.md new file mode 100644 index 0000000000..5346b34c3e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get.md b/docs/examples/1.7.x/console-web/examples/functions/get.md new file mode 100644 index 0000000000..5dc67493fe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.get( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 0000000000..efd6939ce6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listDeployments( + '', // functionId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-executions.md b/docs/examples/1.7.x/console-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..36564706d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md b/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c4f2596f1e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listRuntimes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md b/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md new file mode 100644 index 0000000000..98bc7b6c4d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-templates.md b/docs/examples/1.7.x/console-web/examples/functions/list-templates.md new file mode 100644 index 0000000000..d4cbb033cc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listTemplates( + [], // runtimes (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-usage.md b/docs/examples/1.7.x/console-web/examples/functions/list-usage.md new file mode 100644 index 0000000000..7ce9e5a32a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listUsage( + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-variables.md b/docs/examples/1.7.x/console-web/examples/functions/list-variables.md new file mode 100644 index 0000000000..a7f29e9d3a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listVariables( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list.md b/docs/examples/1.7.x/console-web/examples/functions/list.md new file mode 100644 index 0000000000..2ff23df365 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..74e6a68dfa --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateDeploymentStatus( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..cf5536aef1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateFunctionDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-variable.md b/docs/examples/1.7.x/console-web/examples/functions/update-variable.md new file mode 100644 index 0000000000..a6a9e19f83 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateVariable( + '', // functionId + '', // variableId + '', // key + '', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update.md b/docs/examples/1.7.x/console-web/examples/functions/update.md new file mode 100644 index 0000000000..f4db1ac7a9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.update( + '', // functionId + '', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/graphql/mutation.md b/docs/examples/1.7.x/console-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..fc847a28b2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/graphql/query.md b/docs/examples/1.7.x/console-web/examples/graphql/query.md new file mode 100644 index 0000000000..559359ad89 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md b/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 0000000000..811cc4bcb0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getAntivirus(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-cache.md b/docs/examples/1.7.x/console-web/examples/health/get-cache.md new file mode 100644 index 0000000000..0f946bbed4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCache(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-certificate.md b/docs/examples/1.7.x/console-web/examples/health/get-certificate.md new file mode 100644 index 0000000000..e7738bd5bb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-d-b.md b/docs/examples/1.7.x/console-web/examples/health/get-d-b.md new file mode 100644 index 0000000000..702625adde --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getDB(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..dbd26dabbd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md @@ -0,0 +1,14 @@ +import { Client, Health, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md b/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..b39144ef8b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getPubSub(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..e5a9c013fe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..ee2243e7d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..40ad365630 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDatabases( + '', // name (optional) + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..ac04127d08 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..75c12965eb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..c7493543a1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..f55a2241ca --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..172d6471d3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..23060471dc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..5d3bd14ca1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..3aa2a0147f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueStatsUsageDump( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..909bea9c4d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3149b92e27 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md b/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 0000000000..5ee45ef4fe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorageLocal(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-storage.md b/docs/examples/1.7.x/console-web/examples/health/get-storage.md new file mode 100644 index 0000000000..b09de4cd2f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorage(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-time.md b/docs/examples/1.7.x/console-web/examples/health/get-time.md new file mode 100644 index 0000000000..d2fd03b772 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-time.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getTime(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get.md b/docs/examples/1.7.x/console-web/examples/health/get.md new file mode 100644 index 0000000000..57a45b1650 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/get.md b/docs/examples/1.7.x/console-web/examples/locale/get.md new file mode 100644 index 0000000000..2638f8a070 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-codes.md b/docs/examples/1.7.x/console-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..4f6d1a0924 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-continents.md b/docs/examples/1.7.x/console-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..21f852fde3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..d012d1cba3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..6287179068 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..45f2b215bc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md b/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..6fa2435f20 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-languages.md b/docs/examples/1.7.x/console-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..009b9aa80a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..581b53078a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createApnsProvider( + '', // providerId + '', // name + '', // authKey (optional) + '', // authKeyId (optional) + '', // teamId (optional) + '', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-email.md b/docs/examples/1.7.x/console-web/examples/messaging/create-email.md new file mode 100644 index 0000000000..012cb80014 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createEmail( + '', // messageId + '', // subject + '', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..34044e6acb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createFcmProvider( + '', // providerId + '', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..2503e28bbc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMailgunProvider( + '', // providerId + '', // name + '', // apiKey (optional) + '', // domain (optional) + false, // isEuRegion (optional) + '', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..606bd431bf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMsg91Provider( + '', // providerId + '', // name + '', // templateId (optional) + '', // senderId (optional) + '', // authKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-push.md b/docs/examples/1.7.x/console-web/examples/messaging/create-push.md new file mode 100644 index 0000000000..806cb00115 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createPush( + '', // messageId + '', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..6fb40dbda0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md b/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md new file mode 100644 index 0000000000..4a765d7479 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..874fb3e662 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..adab26f0ff --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..2c62ea2674 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..0d0cf4bec0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md new file mode 100644 index 0000000000..270b14f7cf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..d61cdc30e9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..27d8a4ac47 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..2769e20055 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9e6b5ca9f2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..21b55bf6d5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete.md b/docs/examples/1.7.x/console-web/examples/messaging/delete.md new file mode 100644 index 0000000000..32035b1ef0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-message.md b/docs/examples/1.7.x/console-web/examples/messaging/get-message.md new file mode 100644 index 0000000000..207eb7172e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md new file mode 100644 index 0000000000..9cc6b2487f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..08ed2bc065 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md new file mode 100644 index 0000000000..d8e3264f28 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..ebfec27fc3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md b/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md new file mode 100644 index 0000000000..d601a7a598 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..b971682d3d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md b/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md new file mode 100644 index 0000000000..af17259837 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8c1979c00b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..ae49a8cbb7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md b/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md new file mode 100644 index 0000000000..390ecc3665 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..4b816d0a00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md b/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md new file mode 100644 index 0000000000..7a6357b27e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..5df779ee8d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-email.md b/docs/examples/1.7.x/console-web/examples/messaging/update-email.md new file mode 100644 index 0000000000..26da58bdcc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..b28c239373 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..67c704ffd9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..e4d5376193 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-push.md b/docs/examples/1.7.x/console-web/examples/messaging/update-push.md new file mode 100644 index 0000000000..6cd148bb75 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..cd64cb8f86 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md b/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md new file mode 100644 index 0000000000..e860f0b584 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..c17f4165d8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..958391410b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..e09dc40d9d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md new file mode 100644 index 0000000000..f5a8826906 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..9f22c6e625 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..5c60f6734d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..ecf9149bd0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createAppwriteMigration( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectId + '<API_KEY>' // apiKey +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..35596978e1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md @@ -0,0 +1,15 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCsvMigration( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '[ID1:ID2]' // resourceId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..dd770c0293 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createFirebaseMigration( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..98a0aba81a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createNHostMigration( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..7e77d03111 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createSupabaseMigration( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/delete.md b/docs/examples/1.7.x/console-web/examples/migrations/delete.md new file mode 100644 index 0000000000..03499340bf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/delete.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.delete( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..cd6f3e838e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getAppwriteReport( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectID + '<KEY>' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..e6fa85db69 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getFirebaseReport( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..a9c9e73a91 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getNHostReport( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..eb6ee76949 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getSupabaseReport( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get.md b/docs/examples/1.7.x/console-web/examples/migrations/get.md new file mode 100644 index 0000000000..03544ca7c6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.get( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/list.md b/docs/examples/1.7.x/console-web/examples/migrations/list.md new file mode 100644 index 0000000000..0b85fd98b9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/list.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/retry.md b/docs/examples/1.7.x/console-web/examples/migrations/retry.md new file mode 100644 index 0000000000..d5e513ea37 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/retry.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.retry( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/create-variable.md b/docs/examples/1.7.x/console-web/examples/project/create-variable.md new file mode 100644 index 0000000000..b203d2f0ac --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.createVariable( + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/delete-variable.md b/docs/examples/1.7.x/console-web/examples/project/delete-variable.md new file mode 100644 index 0000000000..884cfb0d19 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.deleteVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/get-usage.md b/docs/examples/1.7.x/console-web/examples/project/get-usage.md new file mode 100644 index 0000000000..58c770a7d7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Project, ProjectUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getUsage( + '', // startDate + '', // endDate + ProjectUsageRange.OneHour // period (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/get-variable.md b/docs/examples/1.7.x/console-web/examples/project/get-variable.md new file mode 100644 index 0000000000..ae99a66e79 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/list-variables.md b/docs/examples/1.7.x/console-web/examples/project/list-variables.md new file mode 100644 index 0000000000..5ad3e8d1af --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/list-variables.md @@ -0,0 +1,11 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.listVariables(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/update-variable.md b/docs/examples/1.7.x/console-web/examples/project/update-variable.md new file mode 100644 index 0000000000..5568cd9806 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.updateVariable( + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..2259092a88 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createJWT( + '<PROJECT_ID>', // projectId + [], // scopes + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-key.md b/docs/examples/1.7.x/console-web/examples/projects/create-key.md new file mode 100644 index 0000000000..2d5100360f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-platform.md b/docs/examples/1.7.x/console-web/examples/projects/create-platform.md new file mode 100644 index 0000000000..159e00ea14 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects, PlatformType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createPlatform( + '<PROJECT_ID>', // projectId + PlatformType.Web, // type + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md b/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..e4e13d59b7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createSmtpTest( + '<PROJECT_ID>', // projectId + [], // emails + '<SENDER_NAME>', // senderName + 'email@example.com', // senderEmail + '', // host + 'email@example.com', // replyTo (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 0000000000..5911a14255 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,20 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createWebhook( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create.md b/docs/examples/1.7.x/console-web/examples/projects/create.md new file mode 100644 index 0000000000..3fe4aa643a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create.md @@ -0,0 +1,25 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.create( + '', // projectId + '<NAME>', // name + '<TEAM_ID>', // teamId + .Default, // region (optional) + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..c9b28c3a7f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-key.md b/docs/examples/1.7.x/console-web/examples/projects/delete-key.md new file mode 100644 index 0000000000..4baf3fb98c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 0000000000..64049bfaf7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deletePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..38e72c20ce --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..23abcbae6b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete.md b/docs/examples/1.7.x/console-web/examples/projects/delete.md new file mode 100644 index 0000000000..f57b3f36b0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.delete( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md new file mode 100644 index 0000000000..5340a9b50f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-key.md b/docs/examples/1.7.x/console-web/examples/projects/get-key.md new file mode 100644 index 0000000000..cc950d7e15 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-platform.md b/docs/examples/1.7.x/console-web/examples/projects/get-platform.md new file mode 100644 index 0000000000..ca48d66161 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getPlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..b551441f00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 0000000000..946c24fc20 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get.md b/docs/examples/1.7.x/console-web/examples/projects/get.md new file mode 100644 index 0000000000..932bf8ce9c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.get( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-keys.md b/docs/examples/1.7.x/console-web/examples/projects/list-keys.md new file mode 100644 index 0000000000..b5833c9cca --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listKeys( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 0000000000..6d8cf382b4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listPlatforms( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..f781b17dd8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listWebhooks( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list.md b/docs/examples/1.7.x/console-web/examples/projects/list.md new file mode 100644 index 0000000000..4166098de7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md b/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..d073cd76c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md new file mode 100644 index 0000000000..a31b24490b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatus( + '<PROJECT_ID>', // projectId + .Rest, // api + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..e751a0bd38 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthDuration( + '<PROJECT_ID>', // projectId + 0 // duration +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..0ac023977e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthLimit( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..7a94d7e890 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordDictionary( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..1658096f77 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordHistory( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..9a8da57914 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthSessionsLimit( + '<PROJECT_ID>', // projectId + 1 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..a8cfe88740 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, AuthMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthStatus( + '<PROJECT_ID>', // projectId + AuthMethod.EmailPassword, // method + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md new file mode 100644 index 0000000000..c9aefdc63c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md @@ -0,0 +1,20 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af, // locale + '<SUBJECT>', // subject + '<MESSAGE>', // message + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com' // replyTo (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-key.md b/docs/examples/1.7.x/console-web/examples/projects/update-key.md new file mode 100644 index 0000000000..e23d3e44d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-key.md @@ -0,0 +1,17 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..d2e8ef9896 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMembershipsPrivacy( + '<PROJECT_ID>', // projectId + false, // userName + false, // userEmail + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md b/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..42487c9443 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMockNumbers( + '<PROJECT_ID>', // projectId + [] // numbers +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..7552d6f9cc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,17 @@ +import { Client, Projects, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateOAuth2( + '<PROJECT_ID>', // projectId + OAuthProvider.Amazon, // provider + '<APP_ID>', // appId (optional) + '<SECRET>', // secret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..ddbc334324 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePersonalDataCheck( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-platform.md b/docs/examples/1.7.x/console-web/examples/projects/update-platform.md new file mode 100644 index 0000000000..b87d252057 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>', // platformId + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..cbda39db85 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 0000000000..82a714bc81 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, ApiService } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatus( + '<PROJECT_ID>', // projectId + ApiService.Account, // service + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md b/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..4c12108e15 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionAlerts( + '<PROJECT_ID>', // projectId + false // alerts +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..4fc8a00a0b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md @@ -0,0 +1,16 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af, // locale + '<MESSAGE>' // message +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md b/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md new file mode 100644 index 0000000000..00b5393389 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmtp( + '<PROJECT_ID>', // projectId + false, // enabled + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com', // replyTo (optional) + '', // host (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-team.md b/docs/examples/1.7.x/console-web/examples/projects/update-team.md new file mode 100644 index 0000000000..8f21f8eea2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-team.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateTeam( + '<PROJECT_ID>', // projectId + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..93bf094836 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhookSignature( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 0000000000..7094dd3287 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,21 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>', // webhookId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update.md b/docs/examples/1.7.x/console-web/examples/projects/update.md new file mode 100644 index 0000000000..d0f9fd0590 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update.md @@ -0,0 +1,23 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.update( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..2d75a26681 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createAPIRule( + '' // domain +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..1c57365be9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createFunctionRule( + '', // domain + '<FUNCTION_ID>', // functionId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..713d2c469b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createRedirectRule( + '', // domain + 'https://example.com', // url + .MovedPermanently301 // statusCode +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..fd759fb7c5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createSiteRule( + '', // domain + '<SITE_ID>', // siteId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..a27c8040c3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.deleteRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 0000000000..c63b5c6dbe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.getRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 0000000000..73d2904590 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,14 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.listRules( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..39357eaa04 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.updateRuleVerification( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md new file mode 100644 index 0000000000..ef8935b37e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + document.getElementById('uploader').files[0], // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..e0c18226fc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..0a0f44a783 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-variable.md b/docs/examples/1.7.x/console-web/examples/sites/create-variable.md new file mode 100644 index 0000000000..7581595101 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..105576c561 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Sites, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create.md b/docs/examples/1.7.x/console-web/examples/sites/create.md new file mode 100644 index 0000000000..5adc43e919 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..f96f308b65 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-log.md b/docs/examples/1.7.x/console-web/examples/sites/delete-log.md new file mode 100644 index 0000000000..8cd0a7e18e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md b/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md new file mode 100644 index 0000000000..41ac503fa7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete.md b/docs/examples/1.7.x/console-web/examples/sites/delete.md new file mode 100644 index 0000000000..ef9b9588cc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..cdd1581b7a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Sites, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md new file mode 100644 index 0000000000..8418f2e038 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-log.md b/docs/examples/1.7.x/console-web/examples/sites/get-log.md new file mode 100644 index 0000000000..215d0643de --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-template.md b/docs/examples/1.7.x/console-web/examples/sites/get-template.md new file mode 100644 index 0000000000..f22657070b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-template.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getTemplate( + '<TEMPLATE_ID>' // templateId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-usage.md b/docs/examples/1.7.x/console-web/examples/sites/get-usage.md new file mode 100644 index 0000000000..d1193b3f39 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getUsage( + '<SITE_ID>', // siteId + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-variable.md b/docs/examples/1.7.x/console-web/examples/sites/get-variable.md new file mode 100644 index 0000000000..ce1901a066 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get.md b/docs/examples/1.7.x/console-web/examples/sites/get.md new file mode 100644 index 0000000000..33da930547 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md b/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md new file mode 100644 index 0000000000..4375552f00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md b/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..b2ea1b6960 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listFrameworks(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-logs.md b/docs/examples/1.7.x/console-web/examples/sites/list-logs.md new file mode 100644 index 0000000000..6ffd72bbe3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md b/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md new file mode 100644 index 0000000000..b39bd23e7d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-templates.md b/docs/examples/1.7.x/console-web/examples/sites/list-templates.md new file mode 100644 index 0000000000..f113175d57 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listTemplates( + [], // frameworks (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-usage.md b/docs/examples/1.7.x/console-web/examples/sites/list-usage.md new file mode 100644 index 0000000000..e19cfbc68c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listUsage( + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-variables.md b/docs/examples/1.7.x/console-web/examples/sites/list-variables.md new file mode 100644 index 0000000000..15a9da308e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list.md b/docs/examples/1.7.x/console-web/examples/sites/list.md new file mode 100644 index 0000000000..9535537c4c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..52cac88059 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..c4c57b0203 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-variable.md b/docs/examples/1.7.x/console-web/examples/sites/update-variable.md new file mode 100644 index 0000000000..fc6ea5ea12 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update.md b/docs/examples/1.7.x/console-web/examples/sites/update.md new file mode 100644 index 0000000000..17bac5e002 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a0ffc47b40 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/create-file.md b/docs/examples/1.7.x/console-web/examples/storage/create-file.md new file mode 100644 index 0000000000..291abb9133 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..0224aad77c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/delete-file.md b/docs/examples/1.7.x/console-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..fb10e8eac4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..e56f41f84c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,14 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucketUsage( + '<BUCKET_ID>', // bucketId + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 0000000000..b04134f7dc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..0bd106f807 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e68f31cdb3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg // output (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..13a351ed59 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file.md b/docs/examples/1.7.x/console-web/examples/storage/get-file.md new file mode 100644 index 0000000000..791a764825 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-usage.md b/docs/examples/1.7.x/console-web/examples/storage/get-usage.md new file mode 100644 index 0000000000..b352f38ceb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getUsage( + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 0000000000..f51139f3e7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/list-files.md b/docs/examples/1.7.x/console-web/examples/storage/list-files.md new file mode 100644 index 0000000000..6bc2350df3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 0000000000..0568f5690b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/update-file.md b/docs/examples/1.7.x/console-web/examples/storage/update-file.md new file mode 100644 index 0000000000..b596b2e64b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/create-membership.md b/docs/examples/1.7.x/console-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..4e8ae7521d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/create.md b/docs/examples/1.7.x/console-web/examples/teams/create.md new file mode 100644 index 0000000000..72f5eab59a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..91a696ad50 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/delete.md b/docs/examples/1.7.x/console-web/examples/teams/delete.md new file mode 100644 index 0000000000..cdccbbe434 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get-membership.md b/docs/examples/1.7.x/console-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..8dfedf053b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..f0858ea08a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get.md b/docs/examples/1.7.x/console-web/examples/teams/get.md new file mode 100644 index 0000000000..d9d057b595 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list-logs.md b/docs/examples/1.7.x/console-web/examples/teams/list-logs.md new file mode 100644 index 0000000000..4ffa9db020 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listLogs( + '<TEAM_ID>', // teamId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..c12826844c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list.md b/docs/examples/1.7.x/console-web/examples/teams/list.md new file mode 100644 index 0000000000..fd6354f97a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..a20769da25 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-membership.md b/docs/examples/1.7.x/console-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..aac8640b43 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-name.md b/docs/examples/1.7.x/console-web/examples/teams/update-name.md new file mode 100644 index 0000000000..91a93db24c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..4785eb15f4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..ea785589a2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/delete.md b/docs/examples/1.7.x/console-web/examples/tokens/delete.md new file mode 100644 index 0000000000..78ae489bcd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/console-web/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..7f6c2f6106 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.getJWT( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/get.md b/docs/examples/1.7.x/console-web/examples/tokens/get.md new file mode 100644 index 0000000000..5a832871c1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/list.md b/docs/examples/1.7.x/console-web/examples/tokens/list.md new file mode 100644 index 0000000000..a7ee594f70 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/update.md b/docs/examples/1.7.x/console-web/examples/tokens/update.md new file mode 100644 index 0000000000..032114ddd4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/update.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md new file mode 100644 index 0000000000..85f44f22f0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..fea0c82b0c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..5a07bdb793 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..38681d767c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..7c689440a6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..7bb681e181 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5819426846 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +import { Client, Users, PasswordHash } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..052037074f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..d6e328cc02 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-session.md b/docs/examples/1.7.x/console-web/examples/users/create-session.md new file mode 100644 index 0000000000..30f777f9d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-target.md b/docs/examples/1.7.x/console-web/examples/users/create-target.md new file mode 100644 index 0000000000..d80efc41e8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-target.md @@ -0,0 +1,18 @@ +import { Client, Users, MessagingProviderType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-token.md b/docs/examples/1.7.x/console-web/examples/users/create-token.md new file mode 100644 index 0000000000..f0c6b8f0f6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-token.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create.md b/docs/examples/1.7.x/console-web/examples/users/create.md new file mode 100644 index 0000000000..82966cc7ac --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-identity.md b/docs/examples/1.7.x/console-web/examples/users/delete-identity.md new file mode 100644 index 0000000000..e76ef8d0b8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..20ac2415d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Users, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-session.md b/docs/examples/1.7.x/console-web/examples/users/delete-session.md new file mode 100644 index 0000000000..ac5207e622 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 0000000000..fc3d1cc6a6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-target.md b/docs/examples/1.7.x/console-web/examples/users/delete-target.md new file mode 100644 index 0000000000..8581d28cb6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete.md b/docs/examples/1.7.x/console-web/examples/users/delete.md new file mode 100644 index 0000000000..eaa4f59b42 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..9ea973b71d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-prefs.md b/docs/examples/1.7.x/console-web/examples/users/get-prefs.md new file mode 100644 index 0000000000..15048848ef --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-target.md b/docs/examples/1.7.x/console-web/examples/users/get-target.md new file mode 100644 index 0000000000..862d64959b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-usage.md b/docs/examples/1.7.x/console-web/examples/users/get-usage.md new file mode 100644 index 0000000000..4e9a37ac79 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Users, UserUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getUsage( + UserUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get.md b/docs/examples/1.7.x/console-web/examples/users/get.md new file mode 100644 index 0000000000..8273d54e3f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-identities.md b/docs/examples/1.7.x/console-web/examples/users/list-identities.md new file mode 100644 index 0000000000..c79224a338 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-logs.md b/docs/examples/1.7.x/console-web/examples/users/list-logs.md new file mode 100644 index 0000000000..b1fdb6ab61 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-memberships.md b/docs/examples/1.7.x/console-web/examples/users/list-memberships.md new file mode 100644 index 0000000000..03113b9687 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..7e143fde22 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-sessions.md b/docs/examples/1.7.x/console-web/examples/users/list-sessions.md new file mode 100644 index 0000000000..3f0ab7f09f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-targets.md b/docs/examples/1.7.x/console-web/examples/users/list-targets.md new file mode 100644 index 0000000000..90d05d1cc2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list.md b/docs/examples/1.7.x/console-web/examples/users/list.md new file mode 100644 index 0000000000..0401a253bb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 0000000000..37d95bc93d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-email.md b/docs/examples/1.7.x/console-web/examples/users/update-email.md new file mode 100644 index 0000000000..d72e6549ea --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-email.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-labels.md b/docs/examples/1.7.x/console-web/examples/users/update-labels.md new file mode 100644 index 0000000000..6ab821f013 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..8faed3f534 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-mfa.md b/docs/examples/1.7.x/console-web/examples/users/update-mfa.md new file mode 100644 index 0000000000..1c20ad25d4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-name.md b/docs/examples/1.7.x/console-web/examples/users/update-name.md new file mode 100644 index 0000000000..2810435414 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-name.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-password.md b/docs/examples/1.7.x/console-web/examples/users/update-password.md new file mode 100644 index 0000000000..b356eaa8dd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-password.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..5763b53f67 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-phone.md b/docs/examples/1.7.x/console-web/examples/users/update-phone.md new file mode 100644 index 0000000000..6f0de0e21c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-prefs.md b/docs/examples/1.7.x/console-web/examples/users/update-prefs.md new file mode 100644 index 0000000000..784ceab9b5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-status.md b/docs/examples/1.7.x/console-web/examples/users/update-status.md new file mode 100644 index 0000000000..99a1526626 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-status.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-target.md b/docs/examples/1.7.x/console-web/examples/users/update-target.md new file mode 100644 index 0000000000..379b6ad2c2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-target.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..a70093bb1e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,16 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepositoryDetection( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + VCSDetectionType.Runtime, // type + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 0000000000..d25b3ed540 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepository( + '<INSTALLATION_ID>', // installationId + '<NAME>', // name + false // private +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..82b0c2598f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.deleteInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 0000000000..f023d13bff --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md b/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..d75046505b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepositoryContents( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 0000000000..6e508d12ac --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepository( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 0000000000..da35475250 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listInstallations( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..9fbc59609a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,15 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositories( + '<INSTALLATION_ID>', // installationId + VCSDetectionType.Runtime, // type + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..0e163dd5ca --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositoryBranches( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..68feb1c607 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.updateExternalDeployments( + '<INSTALLATION_ID>', // installationId + '<REPOSITORY_ID>', // repositoryId + '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId +); + +console.log(result); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-dart/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..7c310755f5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-dart/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..2d0680388c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-email-token.md b/docs/examples/1.7.x/server-dart/examples/account/create-email-token.md new file mode 100644 index 0000000000..b473f0611e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-dart/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..141d652387 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-dart/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..e81a0b1a52 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // (optional) + phrase: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..caa47aa7c1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..1696da5d36 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..84a64f73d2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-dart/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..034d1c4c52 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // (optional) + failure: 'https://example.com', // (optional) + scopes: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-dart/examples/account/create-phone-token.md new file mode 100644 index 0000000000..222e3e7442 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-dart/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..2d26881708 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-recovery.md b/docs/examples/1.7.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 0000000000..34838d0ce2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-session.md b/docs/examples/1.7.x/server-dart/examples/account/create-session.md new file mode 100644 index 0000000000..a1685a9743 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create-verification.md b/docs/examples/1.7.x/server-dart/examples/account/create-verification.md new file mode 100644 index 0000000000..f75f6dbe68 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/create.md b/docs/examples/1.7.x/server-dart/examples/account/create.md new file mode 100644 index 0000000000..1d942869b4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/delete-identity.md b/docs/examples/1.7.x/server-dart/examples/account/delete-identity.md new file mode 100644 index 0000000000..d3d46f9482 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-dart/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..79257f055c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/delete-session.md b/docs/examples/1.7.x/server-dart/examples/account/delete-session.md new file mode 100644 index 0000000000..f9be348949 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-dart/examples/account/delete-sessions.md new file mode 100644 index 0000000000..22bdd3ad9b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0095f3bf0d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/get-prefs.md b/docs/examples/1.7.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 0000000000..fdc7163baf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/get-session.md b/docs/examples/1.7.x/server-dart/examples/account/get-session.md new file mode 100644 index 0000000000..010e94d05c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/get-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/get.md b/docs/examples/1.7.x/server-dart/examples/account/get.md new file mode 100644 index 0000000000..fbd35db20e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/list-identities.md b/docs/examples/1.7.x/server-dart/examples/account/list-identities.md new file mode 100644 index 0000000000..0da3488fd7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/list-logs.md b/docs/examples/1.7.x/server-dart/examples/account/list-logs.md new file mode 100644 index 0000000000..11c8e82130 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-dart/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e043794167 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/list-sessions.md b/docs/examples/1.7.x/server-dart/examples/account/list-sessions.md new file mode 100644 index 0000000000..d2fd7e19ef --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-email.md b/docs/examples/1.7.x/server-dart/examples/account/update-email.md new file mode 100644 index 0000000000..213291e22b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-dart/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..adaa71521a --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-dart/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..8cd62a8e97 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9844393075 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '<OTP>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..65afb2ba6f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d478d006d8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-name.md b/docs/examples/1.7.x/server-dart/examples/account/update-name.md new file mode 100644 index 0000000000..20d4bbf4d2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-name.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateName( + name: '<NAME>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-password.md b/docs/examples/1.7.x/server-dart/examples/account/update-password.md new file mode 100644 index 0000000000..b2f9308aa1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-dart/examples/account/update-phone-session.md new file mode 100644 index 0000000000..8363617ef2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-dart/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..3ec5e49027 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-phone.md b/docs/examples/1.7.x/server-dart/examples/account/update-phone.md new file mode 100644 index 0000000000..686cbfbb1f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-prefs.md b/docs/examples/1.7.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 0000000000..8c2c7fbb8b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-recovery.md b/docs/examples/1.7.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 0000000000..656473cc14 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-session.md b/docs/examples/1.7.x/server-dart/examples/account/update-session.md new file mode 100644 index 0000000000..dd0bb03859 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-status.md b/docs/examples/1.7.x/server-dart/examples/account/update-status.md new file mode 100644 index 0000000000..163bdfea13 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-status.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.7.x/server-dart/examples/account/update-verification.md b/docs/examples/1.7.x/server-dart/examples/account/update-verification.md new file mode 100644 index 0000000000..41e2afd9c7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..d126462982 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // (optional) + height: 0, // (optional) + quality: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..229145471f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // (optional) + height: 0, // (optional) + quality: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..439be5439d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFavicon( + url: 'https://example.com', +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d8fc4631cf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // (optional) + height: 0, // (optional) + quality: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-image.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..2e382993df --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getImage( + url: 'https://example.com', + width: 0, // (optional) + height: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..5d4fc6e2e1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getInitials( + name: '<NAME>', // (optional) + width: 0, // (optional) + height: 0, // (optional) + background: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..9e1875acc9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getQR( + text: '<TEXT>', + size: 1, // (optional) + margin: 0, // (optional) + download: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..1da549c227 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-collection.md b/docs/examples/1.7.x/server-dart/examples/databases/create-collection.md new file mode 100644 index 0000000000..24eb6fae9a --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..3bdc0c9029 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-document.md b/docs/examples/1.7.x/server-dart/examples/databases/create-document.md new file mode 100644 index 0000000000..794528a1c5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-document.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..bea9ac4dfe --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..1ed163ab96 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..abae322c94 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-index.md b/docs/examples/1.7.x/server-dart/examples/databases/create-index.md new file mode 100644 index 0000000000..59b53dd939 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-index.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType.key, + attributes: [], + orders: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..bdb00eb4f7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..e113e520bf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..569652f1bf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..e91c331c9b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..aa997e9f07 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create.md b/docs/examples/1.7.x/server-dart/examples/databases/create.md new file mode 100644 index 0000000000..45b8c3e359 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..ef3e5d13f3 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-dart/examples/databases/delete-collection.md new file mode 100644 index 0000000000..013be88d61 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/delete-document.md b/docs/examples/1.7.x/server-dart/examples/databases/delete-document.md new file mode 100644 index 0000000000..5a2b74f2ba --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/delete-index.md b/docs/examples/1.7.x/server-dart/examples/databases/delete-index.md new file mode 100644 index 0000000000..d35af329d3 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/delete.md b/docs/examples/1.7.x/server-dart/examples/databases/delete.md new file mode 100644 index 0000000000..b8bb718ad5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.delete( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/get-attribute.md new file mode 100644 index 0000000000..f0bab13aed --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + + result = await databases.getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/get-collection.md b/docs/examples/1.7.x/server-dart/examples/databases/get-collection.md new file mode 100644 index 0000000000..e1e9894dca --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/get-document.md b/docs/examples/1.7.x/server-dart/examples/databases/get-document.md new file mode 100644 index 0000000000..4de72ca502 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/get-index.md b/docs/examples/1.7.x/server-dart/examples/databases/get-index.md new file mode 100644 index 0000000000..c19a42d4c8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/get.md b/docs/examples/1.7.x/server-dart/examples/databases/get.md new file mode 100644 index 0000000000..ed04e87f46 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.get( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-dart/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e42c425be8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeList result = await databases.listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/list-collections.md b/docs/examples/1.7.x/server-dart/examples/databases/list-collections.md new file mode 100644 index 0000000000..26070b3006 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +CollectionList result = await databases.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/list-documents.md b/docs/examples/1.7.x/server-dart/examples/databases/list-documents.md new file mode 100644 index 0000000000..91e9fcedb4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-dart/examples/databases/list-indexes.md new file mode 100644 index 0000000000..0d078c624b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +IndexList result = await databases.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/list.md b/docs/examples/1.7.x/server-dart/examples/databases/list.md new file mode 100644 index 0000000000..848363cbbe --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DatabaseList result = await databases.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..8fcd8d62ca --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-collection.md b/docs/examples/1.7.x/server-dart/examples/databases/update-collection.md new file mode 100644 index 0000000000..df21078cff --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..43c1c53cb4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-document.md b/docs/examples/1.7.x/server-dart/examples/databases/update-document.md new file mode 100644 index 0000000000..74631e49c9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..56fce3511f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..9488dc0005 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..6218918cdd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..cb9c76d840 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..d1af4d1466 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..72ec149d4b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..09233cf944 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-dart/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..69e92539ac --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/update.md b/docs/examples/1.7.x/server-dart/examples/databases/update.md new file mode 100644 index 0000000000..a4a3978740 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/databases/update.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 0000000000..410d4434d6 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..942629fb53 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.7.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 0000000000..3d03e56116 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // (optional) + xasync: false, // (optional) + path: '<PATH>', // (optional) + method: ExecutionMethod.gET, // (optional) + headers: {}, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..5df3988017 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-variable.md b/docs/examples/1.7.x/server-dart/examples/functions/create-variable.md new file mode 100644 index 0000000000..0007759971 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..dcbfc62b0c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/create.md b/docs/examples/1.7.x/server-dart/examples/functions/create.md new file mode 100644 index 0000000000..e359716429 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..e619ae6324 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-dart/examples/functions/delete-execution.md new file mode 100644 index 0000000000..b01d1e1068 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-dart/examples/functions/delete-variable.md new file mode 100644 index 0000000000..bf5fee51dd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/delete.md b/docs/examples/1.7.x/server-dart/examples/functions/delete.md new file mode 100644 index 0000000000..16aaa76dd1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.delete( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-dart/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..4412575483 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +UInt8List result = await functions.getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 0000000000..7b140eae00 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/get-execution.md b/docs/examples/1.7.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 0000000000..521c72e438 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/get-variable.md b/docs/examples/1.7.x/server-dart/examples/functions/get-variable.md new file mode 100644 index 0000000000..45216af29d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/get.md b/docs/examples/1.7.x/server-dart/examples/functions/get.md new file mode 100644 index 0000000000..c18d8634cc --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.get( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 0000000000..29ae2767f8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +DeploymentList result = await functions.listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list-executions.md b/docs/examples/1.7.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 0000000000..7adb048e70 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-dart/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..ae3b8eb9c8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +RuntimeList result = await functions.listRuntimes(); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-dart/examples/functions/list-specifications.md new file mode 100644 index 0000000000..bace6122d8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +SpecificationList result = await functions.listSpecifications(); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list-variables.md b/docs/examples/1.7.x/server-dart/examples/functions/list-variables.md new file mode 100644 index 0000000000..ffe4c2659e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +VariableList result = await functions.listVariables( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/list.md b/docs/examples/1.7.x/server-dart/examples/functions/list.md new file mode 100644 index 0000000000..881518d2e0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +FunctionList result = await functions.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-dart/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..c58bff607f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-dart/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..3b2038ae98 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/update-variable.md b/docs/examples/1.7.x/server-dart/examples/functions/update-variable.md new file mode 100644 index 0000000000..393354c3e9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/functions/update.md b/docs/examples/1.7.x/server-dart/examples/functions/update.md new file mode 100644 index 0000000000..177cad3d2f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/functions/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, // (optional) + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/graphql/mutation.md b/docs/examples/1.7.x/server-dart/examples/graphql/mutation.md new file mode 100644 index 0000000000..c1f594210c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.7.x/server-dart/examples/graphql/query.md b/docs/examples/1.7.x/server-dart/examples/graphql/query.md new file mode 100644 index 0000000000..2ee5e0be71 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/graphql/query.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-dart/examples/health/get-antivirus.md new file mode 100644 index 0000000000..7814fe1bb8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthAntivirus result = await health.getAntivirus(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-cache.md b/docs/examples/1.7.x/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..f202de0011 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getCache(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-certificate.md b/docs/examples/1.7.x/server-dart/examples/health/get-certificate.md new file mode 100644 index 0000000000..c2654465b2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthCertificate result = await health.getCertificate( + domain: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-d-b.md b/docs/examples/1.7.x/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..442cbfa6df --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getDB(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-dart/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..0e67444415 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getFailedJobs( + name: .v1Database, + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-dart/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..67d5a9d1a5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getPubSub(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..17a5ff2c49 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueBuilds( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..4f2103e8c8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueCertificates( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..dc403033e0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDatabases( + name: '<NAME>', // (optional) + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..96a858e898 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDeletes( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..b9c616006c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueFunctions( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..553bcd7403 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueLogs( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..94eed57e36 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMails( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..dfcc9cd427 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMessaging( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..5fe54b0eff --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMigrations( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..b38fe69e17 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueStatsResources( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..72e69bb146 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueStatsUsageDump( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..ff3416e691 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueUsage( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..b6f7d2f1a9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueWebhooks( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..c25227e6f5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorageLocal(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-storage.md b/docs/examples/1.7.x/server-dart/examples/health/get-storage.md new file mode 100644 index 0000000000..573c1ae1a4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorage(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get-time.md b/docs/examples/1.7.x/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..9cca7fdb8c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get-time.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthTime result = await health.getTime(); diff --git a/docs/examples/1.7.x/server-dart/examples/health/get.md b/docs/examples/1.7.x/server-dart/examples/health/get.md new file mode 100644 index 0000000000..a04678d92e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/health/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.get(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/get.md b/docs/examples/1.7.x/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..99261d9fbd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-codes.md b/docs/examples/1.7.x/server-dart/examples/locale/list-codes.md new file mode 100644 index 0000000000..e7c594a117 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-continents.md b/docs/examples/1.7.x/server-dart/examples/locale/list-continents.md new file mode 100644 index 0000000000..b256545735 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-dart/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..83b9ab31b5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-dart/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..5ad214422b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-countries.md b/docs/examples/1.7.x/server-dart/examples/locale/list-countries.md new file mode 100644 index 0000000000..caa5917c2c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-dart/examples/locale/list-currencies.md new file mode 100644 index 0000000000..9655201f6d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.7.x/server-dart/examples/locale/list-languages.md b/docs/examples/1.7.x/server-dart/examples/locale/list-languages.md new file mode 100644 index 0000000000..794634c05c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..5ed90c37cb --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-email.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-email.md new file mode 100644 index 0000000000..e5c4fb6af6 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + cc: [], // (optional) + bcc: [], // (optional) + attachments: [], // (optional) + draft: false, // (optional) + html: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..828269f131 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..e231fa468b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..331fbc4243 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-push.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-push.md new file mode 100644 index 0000000000..c827359da5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..d45399e2c7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-sms.md new file mode 100644 index 0000000000..9aa8a72b13 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..f35dfaebab --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..eeb030936b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..1437511ee3 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..e3c9c44501 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-topic.md new file mode 100644 index 0000000000..14894afcb0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..461f305113 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..c7fc168f6f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..f02d99a933 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-dart/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..76bcd9c9d8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-dart/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..fce7834078 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/delete.md b/docs/examples/1.7.x/server-dart/examples/messaging/delete.md new file mode 100644 index 0000000000..ad694176c9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.delete( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/get-message.md b/docs/examples/1.7.x/server-dart/examples/messaging/get-message.md new file mode 100644 index 0000000000..e9cb89d710 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.getMessage( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/get-provider.md new file mode 100644 index 0000000000..001aeba00a --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.getProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-dart/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..daa9a6451e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-dart/examples/messaging/get-topic.md new file mode 100644 index 0000000000..b9c2b4fd45 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.getTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..b483a66bd3 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-messages.md new file mode 100644 index 0000000000..2f1987b1af --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +MessageList result = await messaging.listMessages( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..9afbbc4631 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-providers.md new file mode 100644 index 0000000000..7bbd1161e8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +ProviderList result = await messaging.listProviders( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..3aa8f89aaf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..09bea07920 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +SubscriberList result = await messaging.listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-targets.md new file mode 100644 index 0000000000..173b012f57 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TargetList result = await messaging.listTargets( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..61021c6292 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-dart/examples/messaging/list-topics.md new file mode 100644 index 0000000000..0a9506ee03 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TopicList result = await messaging.listTopics( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..2cd2caabb5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-email.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-email.md new file mode 100644 index 0000000000..81ba4e83be --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + subject: '<SUBJECT>', // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + html: false, // (optional) + cc: [], // (optional) + bcc: [], // (optional) + scheduledAt: '', // (optional) + attachments: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..d00efceb0f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + serviceAccountJSON: {}, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..9c1175dbac --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + enabled: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..02cc5bf900 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-push.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-push.md new file mode 100644 index 0000000000..a58d701970 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..e1ea74e9fd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-sms.md new file mode 100644 index 0000000000..6407cd9d10 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..7f77636f73 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + host: '<HOST>', // (optional) + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..022c9a378e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..8d405a6954 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-topic.md new file mode 100644 index 0000000000..3edee0a178 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // (optional) + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..bf6e0e6636 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-dart/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..287451c6b1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/create-deployment.md new file mode 100644 index 0000000000..c3cfe937b9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDeployment( + siteId: '<SITE_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..ee50457cc2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..e37bf20cda --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create-variable.md b/docs/examples/1.7.x/server-dart/examples/sites/create-variable.md new file mode 100644 index 0000000000..9563a1bb50 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..dfa7391dfd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/create.md b/docs/examples/1.7.x/server-dart/examples/sites/create.md new file mode 100644 index 0000000000..835408d84d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + buildRuntime: .node145, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + adapter: .static, // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..5066c41678 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/delete-log.md b/docs/examples/1.7.x/server-dart/examples/sites/delete-log.md new file mode 100644 index 0000000000..1eee378dc4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-dart/examples/sites/delete-variable.md new file mode 100644 index 0000000000..025851f344 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/delete.md b/docs/examples/1.7.x/server-dart/examples/sites/delete.md new file mode 100644 index 0000000000..2c0f3c3bbd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.delete( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-dart/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..00e51ec88d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +UInt8List result = await sites.getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/get-deployment.md new file mode 100644 index 0000000000..e3bb3e683c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/get-log.md b/docs/examples/1.7.x/server-dart/examples/sites/get-log.md new file mode 100644 index 0000000000..0d023b2a06 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Execution result = await sites.getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/get-variable.md b/docs/examples/1.7.x/server-dart/examples/sites/get-variable.md new file mode 100644 index 0000000000..d35f47704a --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/get.md b/docs/examples/1.7.x/server-dart/examples/sites/get.md new file mode 100644 index 0000000000..b48fbfaf58 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.get( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-dart/examples/sites/list-deployments.md new file mode 100644 index 0000000000..c79873c765 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +DeploymentList result = await sites.listDeployments( + siteId: '<SITE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-dart/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..2aa5617733 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +FrameworkList result = await sites.listFrameworks(); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list-logs.md b/docs/examples/1.7.x/server-dart/examples/sites/list-logs.md new file mode 100644 index 0000000000..affdfb8883 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +ExecutionList result = await sites.listLogs( + siteId: '<SITE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-dart/examples/sites/list-specifications.md new file mode 100644 index 0000000000..781db763ba --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SpecificationList result = await sites.listSpecifications(); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list-variables.md b/docs/examples/1.7.x/server-dart/examples/sites/list-variables.md new file mode 100644 index 0000000000..2f9553803d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +VariableList result = await sites.listVariables( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/list.md b/docs/examples/1.7.x/server-dart/examples/sites/list.md new file mode 100644 index 0000000000..8cf063d70c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SiteList result = await sites.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-dart/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..496d5974ef --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-dart/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..c3960fa352 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/update-variable.md b/docs/examples/1.7.x/server-dart/examples/sites/update-variable.md new file mode 100644 index 0000000000..edc0ca63f0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/sites/update.md b/docs/examples/1.7.x/server-dart/examples/sites/update.md new file mode 100644 index 0000000000..04710013b0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/sites/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + buildRuntime: .node145, // (optional) + adapter: .static, // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 0000000000..b03ece09af --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/create-file.md b/docs/examples/1.7.x/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..951b36a3d2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..a8a761b36d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +await storage.deleteBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/delete-file.md b/docs/examples/1.7.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..da4281e72d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 0000000000..3caf0bc9d5 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.getBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..da50cafc1f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..81a4857f42 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // (optional) + height: 0, // (optional) + gravity: ImageGravity.center, // (optional) + quality: 0, // (optional) + borderWidth: 0, // (optional) + borderColor: '', // (optional) + borderRadius: 0, // (optional) + opacity: 0, // (optional) + rotation: -360, // (optional) + background: '', // (optional) + output: ImageFormat.jpg, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..7299a6a301 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..9ff6636c54 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 0000000000..bfe464766d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +BucketList result = await storage.listBuckets( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/list-files.md b/docs/examples/1.7.x/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..872d15be0d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 0000000000..21bf8eb30c --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/update-file.md b/docs/examples/1.7.x/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..7f9b1bf752 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/create-membership.md b/docs/examples/1.7.x/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..27dc25a530 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // (optional) + userId: '<USER_ID>', // (optional) + phone: '+12065550100', // (optional) + url: 'https://example.com', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/create.md b/docs/examples/1.7.x/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..bf7a1ab56f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..b6bbff9ebd --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/delete.md b/docs/examples/1.7.x/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..869b95e7d0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.delete( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/get-membership.md b/docs/examples/1.7.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 0000000000..de71cb5a08 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-dart/examples/teams/get-prefs.md new file mode 100644 index 0000000000..33b0169dd7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/get.md b/docs/examples/1.7.x/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..a8c7971d68 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-dart/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4ede8b059e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '<TEAM_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/list.md b/docs/examples/1.7.x/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..8aeabb40bf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..b652f1a666 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/update-membership.md b/docs/examples/1.7.x/server-dart/examples/teams/update-membership.md new file mode 100644 index 0000000000..b057db9436 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/update-name.md b/docs/examples/1.7.x/server-dart/examples/teams/update-name.md new file mode 100644 index 0000000000..12424d50a2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '<TEAM_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-dart/examples/teams/update-prefs.md new file mode 100644 index 0000000000..2b43e6d0dc --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '<TEAM_ID>', + prefs: {}, +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c3dfe43b63 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '', // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/delete.md b/docs/examples/1.7.x/server-dart/examples/tokens/delete.md new file mode 100644 index 0000000000..b6e280c009 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +await tokens.delete( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-dart/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..4a7f1a56d2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/get-j-w-t.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +Jwt result = await tokens.getJWT( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/get.md b/docs/examples/1.7.x/server-dart/examples/tokens/get.md new file mode 100644 index 0000000000..5773874824 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.get( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/list.md b/docs/examples/1.7.x/server-dart/examples/tokens/list.md new file mode 100644 index 0000000000..a8023c850f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +ResourceTokenList result = await tokens.list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/update.md b/docs/examples/1.7.x/server-dart/examples/tokens/update.md new file mode 100644 index 0000000000..88c0d3775a --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/tokens/update.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.update( + tokenId: '<TOKEN_ID>', + expire: '', // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-dart/examples/users/create-argon2user.md new file mode 100644 index 0000000000..53b14b87b8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-dart/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..130a1c5e52 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-dart/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..1d0b695dec --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Jwt result = await users.createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // (optional) + duration: 0, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-dart/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..b5f6a3ccc7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8050b1f927 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.createMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-dart/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..83fa18d45d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-dart/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..e3a12cbe07 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.sha1, // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..fa93dd52f9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..ba39cfda47 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-session.md b/docs/examples/1.7.x/server-dart/examples/users/create-session.md new file mode 100644 index 0000000000..375df97b99 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Session result = await users.createSession( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-target.md b/docs/examples/1.7.x/server-dart/examples/users/create-target.md new file mode 100644 index 0000000000..61a81747e9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-target.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create-token.md b/docs/examples/1.7.x/server-dart/examples/users/create-token.md new file mode 100644 index 0000000000..8de16ddf02 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Token result = await users.createToken( + userId: '<USER_ID>', + length: 4, // (optional) + expire: 60, // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/create.md b/docs/examples/1.7.x/server-dart/examples/users/create.md new file mode 100644 index 0000000000..a9f54d7271 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/create.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.create( + userId: '<USER_ID>', + email: 'email@example.com', // (optional) + phone: '+12065550100', // (optional) + password: '', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete-identity.md b/docs/examples/1.7.x/server-dart/examples/users/delete-identity.md new file mode 100644 index 0000000000..c1ffd7253d --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-dart/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..152baa36fa --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete-session.md b/docs/examples/1.7.x/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..4c9acf39ab --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..50b0f12524 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete-target.md b/docs/examples/1.7.x/server-dart/examples/users/delete-target.md new file mode 100644 index 0000000000..cad0317a48 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/delete.md b/docs/examples/1.7.x/server-dart/examples/users/delete.md new file mode 100644 index 0000000000..871341a676 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.delete( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f5764fb76f --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.getMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/get-prefs.md b/docs/examples/1.7.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..ce706f4fe4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.getPrefs( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/get-target.md b/docs/examples/1.7.x/server-dart/examples/users/get-target.md new file mode 100644 index 0000000000..ce1a740fe6 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/get-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/get.md b/docs/examples/1.7.x/server-dart/examples/users/get.md new file mode 100644 index 0000000000..7b352629c4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.get( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-identities.md b/docs/examples/1.7.x/server-dart/examples/users/list-identities.md new file mode 100644 index 0000000000..cdd1999caf --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +IdentityList result = await users.listIdentities( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-logs.md b/docs/examples/1.7.x/server-dart/examples/users/list-logs.md new file mode 100644 index 0000000000..bb8b74403e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +LogList result = await users.listLogs( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-memberships.md b/docs/examples/1.7.x/server-dart/examples/users/list-memberships.md new file mode 100644 index 0000000000..c2ff069933 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MembershipList result = await users.listMemberships( + userId: '<USER_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-dart/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..f691a093f3 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaFactors result = await users.listMfaFactors( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-sessions.md b/docs/examples/1.7.x/server-dart/examples/users/list-sessions.md new file mode 100644 index 0000000000..f9539d01a0 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +SessionList result = await users.listSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list-targets.md b/docs/examples/1.7.x/server-dart/examples/users/list-targets.md new file mode 100644 index 0000000000..15015a4b7b --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +TargetList result = await users.listTargets( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/list.md b/docs/examples/1.7.x/server-dart/examples/users/list.md new file mode 100644 index 0000000000..96354b65fe --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +UserList result = await users.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-dart/examples/users/update-email-verification.md new file mode 100644 index 0000000000..e19a3577e8 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-email.md b/docs/examples/1.7.x/server-dart/examples/users/update-email.md new file mode 100644 index 0000000000..9086cd7c44 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmail( + userId: '<USER_ID>', + email: 'email@example.com', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-labels.md b/docs/examples/1.7.x/server-dart/examples/users/update-labels.md new file mode 100644 index 0000000000..94d3b4dfa7 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateLabels( + userId: '<USER_ID>', + labels: [], +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dart/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..4a6fcab5d2 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.updateMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-mfa.md b/docs/examples/1.7.x/server-dart/examples/users/update-mfa.md new file mode 100644 index 0000000000..4c70fd6e4e --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateMfa( + userId: '<USER_ID>', + mfa: false, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-name.md b/docs/examples/1.7.x/server-dart/examples/users/update-name.md new file mode 100644 index 0000000000..99aeb9ec84 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateName( + userId: '<USER_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-password.md b/docs/examples/1.7.x/server-dart/examples/users/update-password.md new file mode 100644 index 0000000000..d139955dd4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePassword( + userId: '<USER_ID>', + password: '', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-dart/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b0699d95e1 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-phone.md b/docs/examples/1.7.x/server-dart/examples/users/update-phone.md new file mode 100644 index 0000000000..8d18d64547 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhone( + userId: '<USER_ID>', + number: '+12065550100', +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-prefs.md b/docs/examples/1.7.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..7c20ce30d9 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.updatePrefs( + userId: '<USER_ID>', + prefs: {}, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-status.md b/docs/examples/1.7.x/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..e0374f98d4 --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateStatus( + userId: '<USER_ID>', + status: false, +); diff --git a/docs/examples/1.7.x/server-dart/examples/users/update-target.md b/docs/examples/1.7.x/server-dart/examples/users/update-target.md new file mode 100644 index 0000000000..8a67079aeb --- /dev/null +++ b/docs/examples/1.7.x/server-dart/examples/users/update-target.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // (optional) + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-deno/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..42cb78c16d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createAnonymousSession(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-deno/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..b040a11eeb --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-email-token.md b/docs/examples/1.7.x/server-deno/examples/account/create-email-token.md new file mode 100644 index 0000000000..f9fdce44d9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-deno/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..2b4183d025 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createJWT(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-deno/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..d139086776 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..c9aab400cd --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..2a852cdfe4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import { Client, Account, AuthenticationFactor } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..ee0474f1d3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-deno/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..11531cffc9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import { Client, Account, OAuthProvider } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-deno/examples/account/create-phone-token.md new file mode 100644 index 0000000000..ae415a4ec2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-deno/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a66a40733c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createPhoneVerification(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-recovery.md b/docs/examples/1.7.x/server-deno/examples/account/create-recovery.md new file mode 100644 index 0000000000..cf89120246 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-session.md b/docs/examples/1.7.x/server-deno/examples/account/create-session.md new file mode 100644 index 0000000000..e5b5b924bb --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create-verification.md b/docs/examples/1.7.x/server-deno/examples/account/create-verification.md new file mode 100644 index 0000000000..89c25c7c13 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/create.md b/docs/examples/1.7.x/server-deno/examples/account/create.md new file mode 100644 index 0000000000..bb746be1a8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/create.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/delete-identity.md b/docs/examples/1.7.x/server-deno/examples/account/delete-identity.md new file mode 100644 index 0000000000..003db9d3bb --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-deno/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2ed5e6d58c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/delete-session.md b/docs/examples/1.7.x/server-deno/examples/account/delete-session.md new file mode 100644 index 0000000000..eb7c3444ca --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-deno/examples/account/delete-sessions.md new file mode 100644 index 0000000000..15726cde7a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSessions(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..d7802f7dbb --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/get-prefs.md b/docs/examples/1.7.x/server-deno/examples/account/get-prefs.md new file mode 100644 index 0000000000..0a65da3aa0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getPrefs(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/get-session.md b/docs/examples/1.7.x/server-deno/examples/account/get-session.md new file mode 100644 index 0000000000..c7c5978603 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/get-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/get.md b/docs/examples/1.7.x/server-deno/examples/account/get.md new file mode 100644 index 0000000000..05dba8d7aa --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/get.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.get(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/list-identities.md b/docs/examples/1.7.x/server-deno/examples/account/list-identities.md new file mode 100644 index 0000000000..d16ef22fa7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/list-logs.md b/docs/examples/1.7.x/server-deno/examples/account/list-logs.md new file mode 100644 index 0000000000..7a76478866 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-deno/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..650b9f4e7d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listMfaFactors(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/list-sessions.md b/docs/examples/1.7.x/server-deno/examples/account/list-sessions.md new file mode 100644 index 0000000000..f8a8ebd3f9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listSessions(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-email.md b/docs/examples/1.7.x/server-deno/examples/account/update-email.md new file mode 100644 index 0000000000..427e059644 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-email.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-deno/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..681948f8f7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-deno/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..5ac1019638 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..5f183c2463 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..a1d5abec75 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..3a38415a82 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-name.md b/docs/examples/1.7.x/server-deno/examples/account/update-name.md new file mode 100644 index 0000000000..6849588e90 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-name.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-password.md b/docs/examples/1.7.x/server-deno/examples/account/update-password.md new file mode 100644 index 0000000000..270b96148f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-password.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-deno/examples/account/update-phone-session.md new file mode 100644 index 0000000000..a0c010c3fd --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-deno/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f0cc229dda --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-phone.md b/docs/examples/1.7.x/server-deno/examples/account/update-phone.md new file mode 100644 index 0000000000..94121e1a9a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-prefs.md b/docs/examples/1.7.x/server-deno/examples/account/update-prefs.md new file mode 100644 index 0000000000..4e42b6c844 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-recovery.md b/docs/examples/1.7.x/server-deno/examples/account/update-recovery.md new file mode 100644 index 0000000000..3699085371 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-session.md b/docs/examples/1.7.x/server-deno/examples/account/update-session.md new file mode 100644 index 0000000000..8306bf8b6d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-status.md b/docs/examples/1.7.x/server-deno/examples/account/update-status.md new file mode 100644 index 0000000000..f484871012 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-status.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateStatus(); diff --git a/docs/examples/1.7.x/server-deno/examples/account/update-verification.md b/docs/examples/1.7.x/server-deno/examples/account/update-verification.md new file mode 100644 index 0000000000..133d41915f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1c03e5d9ab --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Browser } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..727b3efe41 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import { Client, Avatars, CreditCard } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c81a398f81 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md new file mode 100644 index 0000000000..dbc808759f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Flag } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-image.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-image.md new file mode 100644 index 0000000000..b69ca2b649 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-initials.md new file mode 100644 index 0000000000..ab2d6cc352 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..6bd22268f0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8d0871256e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-collection.md b/docs/examples/1.7.x/server-deno/examples/databases/create-collection.md new file mode 100644 index 0000000000..960fe6e392 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..ce20dee624 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-document.md b/docs/examples/1.7.x/server-deno/examples/databases/create-document.md new file mode 100644 index 0000000000..70d51ec8df --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..99dc236a3a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..3b377268e6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..eaa4376ce3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-index.md b/docs/examples/1.7.x/server-deno/examples/databases/create-index.md new file mode 100644 index 0000000000..2393b53787 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-index.md @@ -0,0 +1,17 @@ +import { Client, Databases, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [] // orders (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..de4e85ffd9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..19fa2c6d7a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..bf8dd87dd3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..dfc87add1a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..a633234da7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create.md b/docs/examples/1.7.x/server-deno/examples/databases/create.md new file mode 100644 index 0000000000..6f43b55e96 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/create.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..7da4a1044a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-deno/examples/databases/delete-collection.md new file mode 100644 index 0000000000..6f3964ad66 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/delete-document.md b/docs/examples/1.7.x/server-deno/examples/databases/delete-document.md new file mode 100644 index 0000000000..c01de53be4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/delete-index.md b/docs/examples/1.7.x/server-deno/examples/databases/delete-index.md new file mode 100644 index 0000000000..5cac578e14 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/delete.md b/docs/examples/1.7.x/server-deno/examples/databases/delete.md new file mode 100644 index 0000000000..47aec20f9b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/delete.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/get-attribute.md new file mode 100644 index 0000000000..9ed896f37d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/get-collection.md b/docs/examples/1.7.x/server-deno/examples/databases/get-collection.md new file mode 100644 index 0000000000..e635d78f8e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/get-document.md b/docs/examples/1.7.x/server-deno/examples/databases/get-document.md new file mode 100644 index 0000000000..bbab67c01a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/get-index.md b/docs/examples/1.7.x/server-deno/examples/databases/get-index.md new file mode 100644 index 0000000000..d4d04f0583 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/get.md b/docs/examples/1.7.x/server-deno/examples/databases/get.md new file mode 100644 index 0000000000..4c4e3cfcde --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/get.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-deno/examples/databases/list-attributes.md new file mode 100644 index 0000000000..d62c31e05a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/list-collections.md b/docs/examples/1.7.x/server-deno/examples/databases/list-collections.md new file mode 100644 index 0000000000..eb979ffc72 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/list-documents.md b/docs/examples/1.7.x/server-deno/examples/databases/list-documents.md new file mode 100644 index 0000000000..bdb03d4e2e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-deno/examples/databases/list-indexes.md new file mode 100644 index 0000000000..03af038e1d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/list.md b/docs/examples/1.7.x/server-deno/examples/databases/list.md new file mode 100644 index 0000000000..eb531d387a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/list.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..3905f07cc6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-collection.md b/docs/examples/1.7.x/server-deno/examples/databases/update-collection.md new file mode 100644 index 0000000000..32e936a454 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..03e51e2f8e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-document.md b/docs/examples/1.7.x/server-deno/examples/databases/update-document.md new file mode 100644 index 0000000000..ea5ddc2a4e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..c4a7c9033c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..12081c9758 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..d1f9c0e10a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..5dc96dcdd6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..819c9aba5b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..1f3024822c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import { Client, Databases, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..f228930d5e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-deno/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..4e64d3fdf4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/update.md b/docs/examples/1.7.x/server-deno/examples/databases/update.md new file mode 100644 index 0000000000..47da0e10c8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/databases/update.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/create-deployment.md new file mode 100644 index 0000000000..babe3e3dc4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..66087e2336 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.7.x/server-deno/examples/functions/create-execution.md new file mode 100644 index 0000000000..5cae389a82 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions, ExecutionMethod } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..3ac3060720 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-variable.md b/docs/examples/1.7.x/server-deno/examples/functions/create-variable.md new file mode 100644 index 0000000000..b3f3f7a1c7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..704951260b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/create.md b/docs/examples/1.7.x/server-deno/examples/functions/create.md new file mode 100644 index 0000000000..07d8ec87d6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/create.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..57d32ca76a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-deno/examples/functions/delete-execution.md new file mode 100644 index 0000000000..90f6bd984e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-deno/examples/functions/delete-variable.md new file mode 100644 index 0000000000..9aa82a8c30 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/delete.md b/docs/examples/1.7.x/server-deno/examples/functions/delete.md new file mode 100644 index 0000000000..15c3bd1fc8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/delete.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-deno/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..fa0c27061a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Functions, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3d2a799e56 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/get-execution.md b/docs/examples/1.7.x/server-deno/examples/functions/get-execution.md new file mode 100644 index 0000000000..9a605a66c9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/get-variable.md b/docs/examples/1.7.x/server-deno/examples/functions/get-variable.md new file mode 100644 index 0000000000..4db3357484 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/get.md b/docs/examples/1.7.x/server-deno/examples/functions/get.md new file mode 100644 index 0000000000..8923275604 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/get.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-deno/examples/functions/list-deployments.md new file mode 100644 index 0000000000..4659976c0f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list-executions.md b/docs/examples/1.7.x/server-deno/examples/functions/list-executions.md new file mode 100644 index 0000000000..c1c3e09f24 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-deno/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..00f78e26dd --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listRuntimes(); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-deno/examples/functions/list-specifications.md new file mode 100644 index 0000000000..081b0bf249 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listSpecifications(); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list-variables.md b/docs/examples/1.7.x/server-deno/examples/functions/list-variables.md new file mode 100644 index 0000000000..760a298284 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/list.md b/docs/examples/1.7.x/server-deno/examples/functions/list.md new file mode 100644 index 0000000000..af1794042c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/list.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-deno/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..f6bde1b996 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-deno/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..751d390e0b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/update-variable.md b/docs/examples/1.7.x/server-deno/examples/functions/update-variable.md new file mode 100644 index 0000000000..4637309018 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/functions/update.md b/docs/examples/1.7.x/server-deno/examples/functions/update.md new file mode 100644 index 0000000000..87031dcfbc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/functions/update.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/graphql/mutation.md b/docs/examples/1.7.x/server-deno/examples/graphql/mutation.md new file mode 100644 index 0000000000..892c91b173 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.7.x/server-deno/examples/graphql/query.md b/docs/examples/1.7.x/server-deno/examples/graphql/query.md new file mode 100644 index 0000000000..af75e9e637 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/graphql/query.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.query( + {} // query +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-deno/examples/health/get-antivirus.md new file mode 100644 index 0000000000..16a4e3abc0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getAntivirus(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-cache.md b/docs/examples/1.7.x/server-deno/examples/health/get-cache.md new file mode 100644 index 0000000000..c637a180f9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCache(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-certificate.md b/docs/examples/1.7.x/server-deno/examples/health/get-certificate.md new file mode 100644 index 0000000000..de071838e7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-d-b.md b/docs/examples/1.7.x/server-deno/examples/health/get-d-b.md new file mode 100644 index 0000000000..907c121cd5 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getDB(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-deno/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..61d75f2300 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import { Client, Health, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-deno/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..a1fcd409a1 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getPubSub(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..b07e04c9de --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..45bc5415a9 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..418f55a797 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..cb789680ec --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..99b4f7f5af --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..d25641f084 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..648d5ab147 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..fdcda62c50 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..680a2b3979 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..bb0aed6428 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..374020d245 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueStatsUsageDump( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..4849068e8a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-deno/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3e5f7d2140 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-deno/examples/health/get-storage-local.md new file mode 100644 index 0000000000..8d9d17dde3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorageLocal(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-storage.md b/docs/examples/1.7.x/server-deno/examples/health/get-storage.md new file mode 100644 index 0000000000..d711cf3011 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorage(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get-time.md b/docs/examples/1.7.x/server-deno/examples/health/get-time.md new file mode 100644 index 0000000000..eba41b8d4d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get-time.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getTime(); diff --git a/docs/examples/1.7.x/server-deno/examples/health/get.md b/docs/examples/1.7.x/server-deno/examples/health/get.md new file mode 100644 index 0000000000..c8395322d7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/health/get.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.get(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/get.md b/docs/examples/1.7.x/server-deno/examples/locale/get.md new file mode 100644 index 0000000000..bfe69b8ad6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/get.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.get(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-codes.md b/docs/examples/1.7.x/server-deno/examples/locale/list-codes.md new file mode 100644 index 0000000000..3b553cd891 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCodes(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-continents.md b/docs/examples/1.7.x/server-deno/examples/locale/list-continents.md new file mode 100644 index 0000000000..07ae21d320 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listContinents(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-deno/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..6c737a4ffa --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesEU(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-deno/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..970d2e2d4f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesPhones(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-countries.md b/docs/examples/1.7.x/server-deno/examples/locale/list-countries.md new file mode 100644 index 0000000000..c8f3577398 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountries(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-deno/examples/locale/list-currencies.md new file mode 100644 index 0000000000..f723d4b98d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCurrencies(); diff --git a/docs/examples/1.7.x/server-deno/examples/locale/list-languages.md b/docs/examples/1.7.x/server-deno/examples/locale/list-languages.md new file mode 100644 index 0000000000..1627945e05 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listLanguages(); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..9b38ec7b12 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-email.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-email.md new file mode 100644 index 0000000000..4ae8ac0575 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..77e523ebf7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..77471b4e16 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..b16c1ebab5 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-push.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-push.md new file mode 100644 index 0000000000..eb40fb3c65 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..43d3d57d15 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-sms.md new file mode 100644 index 0000000000..b7749a68f3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..862840b3ba --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2b40e64030 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..fce212cf97 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..01d3068fbc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-topic.md new file mode 100644 index 0000000000..b312a271d8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..e00f2d2e95 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..6206c0e7dd --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..e1352f9009 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-deno/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c18df831ad --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-deno/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..f5a4b8834b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/delete.md b/docs/examples/1.7.x/server-deno/examples/messaging/delete.md new file mode 100644 index 0000000000..4ccdaf9d7f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/get-message.md b/docs/examples/1.7.x/server-deno/examples/messaging/get-message.md new file mode 100644 index 0000000000..da50af9ffb --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/get-provider.md new file mode 100644 index 0000000000..48f4f1ca95 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-deno/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..06bcdbcf46 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-deno/examples/messaging/get-topic.md new file mode 100644 index 0000000000..48716a9d4b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..69e6c5fae1 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-messages.md new file mode 100644 index 0000000000..5297365faa --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..8fd380114d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-providers.md new file mode 100644 index 0000000000..3d4ee5d691 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..423112c1f2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..19180fa438 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-targets.md new file mode 100644 index 0000000000..dad9f845bc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..59102c898f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-deno/examples/messaging/list-topics.md new file mode 100644 index 0000000000..85881e4c5f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..9b062362ec --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-email.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-email.md new file mode 100644 index 0000000000..d026abba21 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..174319eecf --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..0ad6827b7b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..cc2766c7a2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-push.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-push.md new file mode 100644 index 0000000000..7dabcea3ae --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..28fdb464e4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-sms.md new file mode 100644 index 0000000000..91593266b6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..6b85cb2985 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..fabdc8e930 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..fb8b45c46f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-topic.md new file mode 100644 index 0000000000..3746430537 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..fc0c02e4d3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-deno/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..5b449c8a09 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/create-deployment.md new file mode 100644 index 0000000000..66e0f0d291 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..cc08fd0e6d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..f5b23d3d65 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create-variable.md b/docs/examples/1.7.x/server-deno/examples/sites/create-variable.md new file mode 100644 index 0000000000..f8326be218 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..fc512b3934 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Sites, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/create.md b/docs/examples/1.7.x/server-deno/examples/sites/create.md new file mode 100644 index 0000000000..b7a1e70d84 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/create.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..4c9981ddb7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/delete-log.md b/docs/examples/1.7.x/server-deno/examples/sites/delete-log.md new file mode 100644 index 0000000000..a480205256 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-deno/examples/sites/delete-variable.md new file mode 100644 index 0000000000..fbb2cb3144 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/delete.md b/docs/examples/1.7.x/server-deno/examples/sites/delete.md new file mode 100644 index 0000000000..9c9b1b9f0b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/delete.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-deno/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..51ef55c497 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Sites, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/get-deployment.md new file mode 100644 index 0000000000..694e9f8323 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/get-log.md b/docs/examples/1.7.x/server-deno/examples/sites/get-log.md new file mode 100644 index 0000000000..39b8c403c0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/get-variable.md b/docs/examples/1.7.x/server-deno/examples/sites/get-variable.md new file mode 100644 index 0000000000..2cafaea93f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/get.md b/docs/examples/1.7.x/server-deno/examples/sites/get.md new file mode 100644 index 0000000000..47ad88d49d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/get.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-deno/examples/sites/list-deployments.md new file mode 100644 index 0000000000..ce32169c66 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-deno/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..4728b1f45f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listFrameworks(); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list-logs.md b/docs/examples/1.7.x/server-deno/examples/sites/list-logs.md new file mode 100644 index 0000000000..a4a294e6f2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-deno/examples/sites/list-specifications.md new file mode 100644 index 0000000000..f13b17ed0d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listSpecifications(); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list-variables.md b/docs/examples/1.7.x/server-deno/examples/sites/list-variables.md new file mode 100644 index 0000000000..1bcd5523ab --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/list.md b/docs/examples/1.7.x/server-deno/examples/sites/list.md new file mode 100644 index 0000000000..ed0c6ab060 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/list.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-deno/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..9fdc06d07f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-deno/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..2d7ebce71e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/update-variable.md b/docs/examples/1.7.x/server-deno/examples/sites/update-variable.md new file mode 100644 index 0000000000..674992ee6c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/sites/update.md b/docs/examples/1.7.x/server-deno/examples/sites/update.md new file mode 100644 index 0000000000..1fcfd48178 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/sites/update.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-deno/examples/storage/create-bucket.md new file mode 100644 index 0000000000..47730270d5 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/create-file.md b/docs/examples/1.7.x/server-deno/examples/storage/create-file.md new file mode 100644 index 0000000000..217506c91c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file.png', 'file.png'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-deno/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e020904677 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/delete-file.md b/docs/examples/1.7.x/server-deno/examples/storage/delete-file.md new file mode 100644 index 0000000000..eff6050ad1 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-deno/examples/storage/get-bucket.md new file mode 100644 index 0000000000..79d79fefcc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md new file mode 100644 index 0000000000..7d8682f8b2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..8c38ae47e7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md @@ -0,0 +1,24 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg // output (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md new file mode 100644 index 0000000000..91b0b1b2fd --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file.md new file mode 100644 index 0000000000..3218deb9bc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-deno/examples/storage/list-buckets.md new file mode 100644 index 0000000000..f01ad2a4d2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/list-files.md b/docs/examples/1.7.x/server-deno/examples/storage/list-files.md new file mode 100644 index 0000000000..73c40aa24d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-deno/examples/storage/update-bucket.md new file mode 100644 index 0000000000..fa72c40cd6 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/update-file.md b/docs/examples/1.7.x/server-deno/examples/storage/update-file.md new file mode 100644 index 0000000000..1388848d35 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/create-membership.md b/docs/examples/1.7.x/server-deno/examples/teams/create-membership.md new file mode 100644 index 0000000000..73ea483b11 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/create.md b/docs/examples/1.7.x/server-deno/examples/teams/create.md new file mode 100644 index 0000000000..e18e5d1f88 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/create.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-deno/examples/teams/delete-membership.md new file mode 100644 index 0000000000..8ec02beac2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/delete.md b/docs/examples/1.7.x/server-deno/examples/teams/delete.md new file mode 100644 index 0000000000..c090d96e70 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/delete.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/get-membership.md b/docs/examples/1.7.x/server-deno/examples/teams/get-membership.md new file mode 100644 index 0000000000..d844ae97f3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-deno/examples/teams/get-prefs.md new file mode 100644 index 0000000000..367f13e33f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/get.md b/docs/examples/1.7.x/server-deno/examples/teams/get.md new file mode 100644 index 0000000000..31208d79c8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/get.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-deno/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4f5d3b1a6c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/list.md b/docs/examples/1.7.x/server-deno/examples/teams/list.md new file mode 100644 index 0000000000..7639539e41 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/list.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-deno/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..42a1ce9667 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/update-membership.md b/docs/examples/1.7.x/server-deno/examples/teams/update-membership.md new file mode 100644 index 0000000000..0af1b01625 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/update-name.md b/docs/examples/1.7.x/server-deno/examples/teams/update-name.md new file mode 100644 index 0000000000..5258cf02da --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-deno/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-deno/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1cb207572c --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..98d8cc7b20 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/delete.md b/docs/examples/1.7.x/server-deno/examples/tokens/delete.md new file mode 100644 index 0000000000..114d0f12a3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-deno/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..63e4fb27ff --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/get-j-w-t.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.getJWT( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/get.md b/docs/examples/1.7.x/server-deno/examples/tokens/get.md new file mode 100644 index 0000000000..6784829d11 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/get.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/list.md b/docs/examples/1.7.x/server-deno/examples/tokens/list.md new file mode 100644 index 0000000000..b58db48d73 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/list.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/update.md b/docs/examples/1.7.x/server-deno/examples/tokens/update.md new file mode 100644 index 0000000000..379645e289 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/tokens/update.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new Tokens(client); + +const response = await tokens.update( + '<TOKEN_ID>', // tokenId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-deno/examples/users/create-argon2user.md new file mode 100644 index 0000000000..34fa49d1ce --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-deno/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..b5b07fe8a3 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-deno/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..844535e803 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-deno/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..2b9a8c5ab5 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..00b60f1e26 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-deno/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4687c8a3e8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-deno/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..44b8f92f49 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import { Client, Users, PasswordHash } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..cf840a0a12 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..beb298b2a4 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-session.md b/docs/examples/1.7.x/server-deno/examples/users/create-session.md new file mode 100644 index 0000000000..eca2f32cc5 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-session.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-target.md b/docs/examples/1.7.x/server-deno/examples/users/create-target.md new file mode 100644 index 0000000000..6209f8f715 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-target.md @@ -0,0 +1,17 @@ +import { Client, Users, MessagingProviderType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create-token.md b/docs/examples/1.7.x/server-deno/examples/users/create-token.md new file mode 100644 index 0000000000..b3c4a892e1 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create-token.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/create.md b/docs/examples/1.7.x/server-deno/examples/users/create.md new file mode 100644 index 0000000000..a27b0da857 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/create.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete-identity.md b/docs/examples/1.7.x/server-deno/examples/users/delete-identity.md new file mode 100644 index 0000000000..8d890b8018 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-deno/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..e05c1c19b7 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Users, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete-session.md b/docs/examples/1.7.x/server-deno/examples/users/delete-session.md new file mode 100644 index 0000000000..3823a9080b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-deno/examples/users/delete-sessions.md new file mode 100644 index 0000000000..10e3b4e6f8 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete-target.md b/docs/examples/1.7.x/server-deno/examples/users/delete-target.md new file mode 100644 index 0000000000..0116c3db33 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/delete.md b/docs/examples/1.7.x/server-deno/examples/users/delete.md new file mode 100644 index 0000000000..dee578da0b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/delete.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c6ac191d1a --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/get-prefs.md b/docs/examples/1.7.x/server-deno/examples/users/get-prefs.md new file mode 100644 index 0000000000..cf6811306d --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/get-target.md b/docs/examples/1.7.x/server-deno/examples/users/get-target.md new file mode 100644 index 0000000000..97a14fed61 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/get-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/get.md b/docs/examples/1.7.x/server-deno/examples/users/get.md new file mode 100644 index 0000000000..2eb31fdb15 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/get.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-identities.md b/docs/examples/1.7.x/server-deno/examples/users/list-identities.md new file mode 100644 index 0000000000..fdc60e6cf0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-logs.md b/docs/examples/1.7.x/server-deno/examples/users/list-logs.md new file mode 100644 index 0000000000..c2858fa057 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-memberships.md b/docs/examples/1.7.x/server-deno/examples/users/list-memberships.md new file mode 100644 index 0000000000..40f4a9d9db --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-deno/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..1f7e6526f0 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-sessions.md b/docs/examples/1.7.x/server-deno/examples/users/list-sessions.md new file mode 100644 index 0000000000..9a834e6674 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list-targets.md b/docs/examples/1.7.x/server-deno/examples/users/list-targets.md new file mode 100644 index 0000000000..880573ad76 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/list.md b/docs/examples/1.7.x/server-deno/examples/users/list.md new file mode 100644 index 0000000000..9104621f31 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/list.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-deno/examples/users/update-email-verification.md new file mode 100644 index 0000000000..c7bbb4d21f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-email.md b/docs/examples/1.7.x/server-deno/examples/users/update-email.md new file mode 100644 index 0000000000..3215497df2 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-email.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-labels.md b/docs/examples/1.7.x/server-deno/examples/users/update-labels.md new file mode 100644 index 0000000000..91a5ff4c70 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-deno/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..f7cac0f5f1 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-mfa.md b/docs/examples/1.7.x/server-deno/examples/users/update-mfa.md new file mode 100644 index 0000000000..47cc541e4e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-name.md b/docs/examples/1.7.x/server-deno/examples/users/update-name.md new file mode 100644 index 0000000000..db1808090b --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-name.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-password.md b/docs/examples/1.7.x/server-deno/examples/users/update-password.md new file mode 100644 index 0000000000..35c3123819 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-password.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-deno/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..893a84b025 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-phone.md b/docs/examples/1.7.x/server-deno/examples/users/update-phone.md new file mode 100644 index 0000000000..670358495e --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-prefs.md b/docs/examples/1.7.x/server-deno/examples/users/update-prefs.md new file mode 100644 index 0000000000..28a1e20339 --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-status.md b/docs/examples/1.7.x/server-deno/examples/users/update-status.md new file mode 100644 index 0000000000..7a9f9bcecc --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-status.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.7.x/server-deno/examples/users/update-target.md b/docs/examples/1.7.x/server-deno/examples/users/update-target.md new file mode 100644 index 0000000000..a5cbb2ad8f --- /dev/null +++ b/docs/examples/1.7.x/server-deno/examples/users/update-target.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..adb390b70c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateAnonymousSession(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..6a3d0bee50 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateEmailPasswordSession( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-email-token.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-email-token.md new file mode 100644 index 0000000000..4f1e35ec15 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..96410ceafb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +JWT result = await account.CreateJWT(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..0255a42fca --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..02733f50cb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaType result = await account.CreateMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..a96831e76c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +MfaChallenge result = await account.CreateMfaChallenge( + factor: AuthenticationFactor.Email +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8156e70e43 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.CreateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..11551e9d58 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +await account.CreateOAuth2Token( + provider: OAuthProvider.Amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-token.md new file mode 100644 index 0000000000..1ec54f5d8e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..50795e5bcd --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreatePhoneVerification(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-recovery.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-recovery.md new file mode 100644 index 0000000000..8f83531eef --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateRecovery( + email: "email@example.com", + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-session.md new file mode 100644 index 0000000000..d1eebdc73e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create-verification.md b/docs/examples/1.7.x/server-dotnet/examples/account/create-verification.md new file mode 100644 index 0000000000..f4fa3749f1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateVerification( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/create.md b/docs/examples/1.7.x/server-dotnet/examples/account/create.md new file mode 100644 index 0000000000..e4323cbbf7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +User result = await account.Create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/delete-identity.md b/docs/examples/1.7.x/server-dotnet/examples/account/delete-identity.md new file mode 100644 index 0000000000..f95cf936d3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-dotnet/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..3e6d56b5a3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/delete-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 0000000000..0858b8b03e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/delete-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-dotnet/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b72a17e5b7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSessions(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e6ae0ab9e0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.GetMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/get-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/account/get-prefs.md new file mode 100644 index 0000000000..7fd207e151 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Preferences result = await account.GetPrefs(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/get-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/get-session.md new file mode 100644 index 0000000000..06949b1da5 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/get-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.GetSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/get.md b/docs/examples/1.7.x/server-dotnet/examples/account/get.md new file mode 100644 index 0000000000..2180703f71 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.Get(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/list-identities.md b/docs/examples/1.7.x/server-dotnet/examples/account/list-identities.md new file mode 100644 index 0000000000..1700014f78 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/list-identities.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +IdentityList result = await account.ListIdentities( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/list-logs.md b/docs/examples/1.7.x/server-dotnet/examples/account/list-logs.md new file mode 100644 index 0000000000..312cceac4a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/list-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +LogList result = await account.ListLogs( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-dotnet/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..b767878f1a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaFactors result = await account.ListMfaFactors(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/list-sessions.md b/docs/examples/1.7.x/server-dotnet/examples/account/list-sessions.md new file mode 100644 index 0000000000..6f88cb7f1d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +SessionList result = await account.ListSessions(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-email.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-email.md new file mode 100644 index 0000000000..6ef25e1b73 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateEmail( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..233caf4e4b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..0c8702ae58 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9f48fd9487 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMfaAuthenticator( + type: AuthenticatorType.Totp, + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..2a9d4cee9f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..ee477129fb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.UpdateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-name.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-name.md new file mode 100644 index 0000000000..9cd98769d6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateName( + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-password.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-password.md new file mode 100644 index 0000000000..0462f0874d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePassword( + password: "", + oldPassword: "password" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-session.md new file mode 100644 index 0000000000..71be40f36c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..4efbfa4aab --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-phone.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone.md new file mode 100644 index 0000000000..5e28b7d2ba --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePhone( + phone: "+12065550100", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-prefs.md new file mode 100644 index 0000000000..e3eacdbe30 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-recovery.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-recovery.md new file mode 100644 index 0000000000..23804c6186 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-session.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-session.md new file mode 100644 index 0000000000..9621ac60ac --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-status.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-status.md new file mode 100644 index 0000000000..17edd00c3b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-status.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateStatus(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/account/update-verification.md b/docs/examples/1.7.x/server-dotnet/examples/account/update-verification.md new file mode 100644 index 0000000000..03c21cf2fc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..5ed39707ff --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..166d32a59a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e0219715a6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..393f1ae283 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-image.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..19a623a0c1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..f3044120cb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..4a001b23c8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..631cc3fdb6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-collection.md new file mode 100644 index 0000000000..db587350b2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..b2868c3c68 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-document.md new file mode 100644 index 0000000000..b3951285de --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..0f492a8983 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..cc0d4d7c3d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..6f52d00e8b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md new file mode 100644 index 0000000000..2c147596e5 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: IndexType.Key, + attributes: new List<string>(), + orders: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..1d3b9f05d8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..fbba90666f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..85818d31c7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..a5238fb9e3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..6675d5e049 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create.md new file mode 100644 index 0000000000..9cc5963098 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..356e83d2ad --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 0000000000..6036eaa6cf --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/delete-document.md b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 0000000000..d853c0baab --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/delete-index.md b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 0000000000..beae15bc8a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/delete.md b/docs/examples/1.7.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 0000000000..1fa1af1e4c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.Delete( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 0000000000..d2dfd0e2aa --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + + result = await databases.GetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/get-collection.md b/docs/examples/1.7.x/server-dotnet/examples/databases/get-collection.md new file mode 100644 index 0000000000..bf321c972b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.GetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/get-document.md b/docs/examples/1.7.x/server-dotnet/examples/databases/get-document.md new file mode 100644 index 0000000000..3bf0eec62e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/get-index.md b/docs/examples/1.7.x/server-dotnet/examples/databases/get-index.md new file mode 100644 index 0000000000..95c94b0d36 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.GetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/get.md b/docs/examples/1.7.x/server-dotnet/examples/databases/get.md new file mode 100644 index 0000000000..1c2b917f65 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Get( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-dotnet/examples/databases/list-attributes.md new file mode 100644 index 0000000000..65b26557a0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/list-collections.md b/docs/examples/1.7.x/server-dotnet/examples/databases/list-collections.md new file mode 100644 index 0000000000..a06ff60405 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/list-documents.md b/docs/examples/1.7.x/server-dotnet/examples/databases/list-documents.md new file mode 100644 index 0000000000..7b97b031f8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-dotnet/examples/databases/list-indexes.md new file mode 100644 index 0000000000..bc7ee6c62a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/list.md b/docs/examples/1.7.x/server-dotnet/examples/databases/list.md new file mode 100644 index 0000000000..6998692225 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DatabaseList result = await databases.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..2062713484 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-collection.md new file mode 100644 index 0000000000..f3922123ee --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..11156cafba --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-document.md new file mode 100644 index 0000000000..c0e7cbbb8b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..35e9af5cf0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..5b2443140b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..96ed9a7197 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..0f244301f6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..d794166627 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..78edef8ab1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..d6dbf03af6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..edea6bdeb3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/update.md b/docs/examples/1.7.x/server-dotnet/examples/databases/update.md new file mode 100644 index 0000000000..b3f220106b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/update.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-deployment.md new file mode 100644 index 0000000000..cd5b8dad66 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..928965937a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-execution.md new file mode 100644 index 0000000000..c23112bacc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: ExecutionMethod.GET, // optional + headers: [object], // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..d116c6a10d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-variable.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-variable.md new file mode 100644 index 0000000000..c5b0c43f68 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..97a65488f1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/create.md b/docs/examples/1.7.x/server-dotnet/examples/functions/create.md new file mode 100644 index 0000000000..7c7deeacd8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8690725bea --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-execution.md new file mode 100644 index 0000000000..838d465045 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 0000000000..153762ef8f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/delete.md b/docs/examples/1.7.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 0000000000..2852931ead --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.Delete( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..b83126718a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +byte[] result = await functions.GetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment.md new file mode 100644 index 0000000000..71bcbc50cc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.GetDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/get-execution.md b/docs/examples/1.7.x/server-dotnet/examples/functions/get-execution.md new file mode 100644 index 0000000000..52d85eb3bd --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.GetExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/get-variable.md b/docs/examples/1.7.x/server-dotnet/examples/functions/get-variable.md new file mode 100644 index 0000000000..c650203ff6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.GetVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/get.md b/docs/examples/1.7.x/server-dotnet/examples/functions/get.md new file mode 100644 index 0000000000..7a0bb248fb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Get( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list-deployments.md new file mode 100644 index 0000000000..509bb567cc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "<FUNCTION_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list-executions.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list-executions.md new file mode 100644 index 0000000000..58d1495043 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +ExecutionList result = await functions.ListExecutions( + functionId: "<FUNCTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a9bb90bb48 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list-specifications.md new file mode 100644 index 0000000000..daf8cca701 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +SpecificationList result = await functions.ListSpecifications(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list-variables.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list-variables.md new file mode 100644 index 0000000000..fa40eab8c5 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +VariableList result = await functions.ListVariables( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/list.md b/docs/examples/1.7.x/server-dotnet/examples/functions/list.md new file mode 100644 index 0000000000..29dd7436cf --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +FunctionList result = await functions.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-dotnet/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..78d5f1149f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.UpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..6ed536cfa0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.UpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/update-variable.md b/docs/examples/1.7.x/server-dotnet/examples/functions/update-variable.md new file mode 100644 index 0000000000..5f02fcabc3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/functions/update.md b/docs/examples/1.7.x/server-dotnet/examples/functions/update.md new file mode 100644 index 0000000000..27cfd7ff75 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, // optional + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/graphql/mutation.md b/docs/examples/1.7.x/server-dotnet/examples/graphql/mutation.md new file mode 100644 index 0000000000..27684cb8eb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/graphql/query.md b/docs/examples/1.7.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 0000000000..c405aec53f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/graphql/query.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-antivirus.md new file mode 100644 index 0000000000..b2205e9e99 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthAntivirus result = await health.GetAntivirus(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-cache.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..79933da511 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetCache(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-certificate.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-certificate.md new file mode 100644 index 0000000000..bb32ec2c4d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthCertificate result = await health.GetCertificate( + domain: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-d-b.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..9f3db84c44 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetDB(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..07c54375db --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetFailedJobs( + name: .V1Database, + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..5229e1eadb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetPubSub(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..b35209e84f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueBuilds( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..35d40161cd --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueCertificates( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..5f180b33b7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..db2ec06dfd --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDeletes( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..6eee977d9e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueFunctions( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..fe78169113 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueLogs( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..4fae999d39 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMails( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..22131ee958 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMessaging( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..98d38696c4 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMigrations( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..a52a652cad --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueStatsResources( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..ac78cd3acc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueStatsUsageDump( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b019b21ee6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueUsage( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..7d65de2fe9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueWebhooks( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..94eb3be89c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorageLocal(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-storage.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-storage.md new file mode 100644 index 0000000000..07b0b8717b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-storage.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorage(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get-time.md b/docs/examples/1.7.x/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..1b1ab64f72 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get-time.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthTime result = await health.GetTime(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/health/get.md b/docs/examples/1.7.x/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..3c5b464a8a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/health/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.Get(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/get.md b/docs/examples/1.7.x/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..86b9602a2b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +Locale result = await locale.Get(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-codes.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-codes.md new file mode 100644 index 0000000000..f6aa77e857 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LocaleCodeList result = await locale.ListCodes(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-continents.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-continents.md new file mode 100644 index 0000000000..bdbfb77f14 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..56ef9daae8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..6e75dadfec --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries.md new file mode 100644 index 0000000000..2cd1c153a8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountries(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-currencies.md new file mode 100644 index 0000000000..fbc0b83f47 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/locale/list-languages.md b/docs/examples/1.7.x/server-dotnet/examples/locale/list-languages.md new file mode 100644 index 0000000000..b4469ff248 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..26019d7a6e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-email.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-email.md new file mode 100644 index 0000000000..c9e0d772db --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + attachments: new List<string>(), // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..ecc7c67144 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [object], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6c51d5e107 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..3ca1c6937e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-push.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-push.md new file mode 100644 index 0000000000..ab6fe8a528 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..c1c5163159 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sms.md new file mode 100644 index 0000000000..4899d4ef5f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..0e8c1cf5fb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..08fd0ba283 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.CreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..41f3880a72 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..bca62d05f7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-topic.md new file mode 100644 index 0000000000..57e1708d4c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.CreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..9e0352eced --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..c14306270f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..878ddd0d43 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..dc1396fa45 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +await messaging.DeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..d67d88065d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/delete.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete.md new file mode 100644 index 0000000000..6b981e938e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.Delete( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/get-message.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-message.md new file mode 100644 index 0000000000..b5183e4e81 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.GetMessage( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-provider.md new file mode 100644 index 0000000000..fdfcaf7710 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.GetProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..d663219082 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.GetSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-topic.md new file mode 100644 index 0000000000..67d889df53 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.GetTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..faecd6ea0e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListMessageLogs( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-messages.md new file mode 100644 index 0000000000..e04dfddbf7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +MessageList result = await messaging.ListMessages( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..65d29ccaa5 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListProviderLogs( + providerId: "<PROVIDER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-providers.md new file mode 100644 index 0000000000..9861e1ebe2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +ProviderList result = await messaging.ListProviders( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8c277f797c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f8dd4a85d7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +SubscriberList result = await messaging.ListSubscribers( + topicId: "<TOPIC_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-targets.md new file mode 100644 index 0000000000..972d12deea --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TargetList result = await messaging.ListTargets( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..66bacc2468 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListTopicLogs( + topicId: "<TOPIC_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topics.md new file mode 100644 index 0000000000..ee13dc7d18 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TopicList result = await messaging.ListTopics( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..e68d9fab97 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-email.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-email.md new file mode 100644 index 0000000000..dcb22fa939 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateEmail( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + scheduledAt: "", // optional + attachments: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..4dd525d189 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [object] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c2a7d07eb1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..647604c1df --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-push.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-push.md new file mode 100644 index 0000000000..798ec0d032 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdatePush( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..bfa9f6fa57 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sms.md new file mode 100644 index 0000000000..16543301d7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateSms( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..2ef0b536b5 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..018b5b6491 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..43b6db67c2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-topic.md new file mode 100644 index 0000000000..5a15e98c4e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.UpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..3517bd52e6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..fc51a15bce --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create-deployment.md new file mode 100644 index 0000000000..72b5afe49f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDeployment( + siteId: "<SITE_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..0ef941558d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..4c54cc61d9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create-variable.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create-variable.md new file mode 100644 index 0000000000..aec9f3fd9f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.CreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..c101ec609d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateVcsDeployment( + siteId: "<SITE_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/create.md b/docs/examples/1.7.x/server-dotnet/examples/sites/create.md new file mode 100644 index 0000000000..a20eaa757c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + buildRuntime: .Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .Static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..3d8e9a297e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/delete-log.md b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-log.md new file mode 100644 index 0000000000..4d6a3f0883 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-variable.md new file mode 100644 index 0000000000..b65fb190a2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/delete.md b/docs/examples/1.7.x/server-dotnet/examples/sites/delete.md new file mode 100644 index 0000000000..ceec8677fb --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.Delete( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..cb664643e0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +byte[] result = await sites.GetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment.md new file mode 100644 index 0000000000..88ddb255db --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.GetDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/get-log.md b/docs/examples/1.7.x/server-dotnet/examples/sites/get-log.md new file mode 100644 index 0000000000..fb7a797f17 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/get-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Execution result = await sites.GetLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/get-variable.md b/docs/examples/1.7.x/server-dotnet/examples/sites/get-variable.md new file mode 100644 index 0000000000..d91229a79e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.GetVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/get.md b/docs/examples/1.7.x/server-dotnet/examples/sites/get.md new file mode 100644 index 0000000000..b58a4943db --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Get( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list-deployments.md new file mode 100644 index 0000000000..328a972950 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +DeploymentList result = await sites.ListDeployments( + siteId: "<SITE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..5d5250d137 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +FrameworkList result = await sites.ListFrameworks(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list-logs.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list-logs.md new file mode 100644 index 0000000000..fc21fc57c1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +ExecutionList result = await sites.ListLogs( + siteId: "<SITE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list-specifications.md new file mode 100644 index 0000000000..547154f14c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SpecificationList result = await sites.ListSpecifications(); diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list-variables.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list-variables.md new file mode 100644 index 0000000000..64da1a0200 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +VariableList result = await sites.ListVariables( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/list.md b/docs/examples/1.7.x/server-dotnet/examples/sites/list.md new file mode 100644 index 0000000000..ca406f995a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SiteList result = await sites.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-dotnet/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..400f95ad55 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.UpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-dotnet/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..25db3bf9c4 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.UpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/update-variable.md b/docs/examples/1.7.x/server-dotnet/examples/sites/update-variable.md new file mode 100644 index 0000000000..769a28d9ef --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.UpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/sites/update.md b/docs/examples/1.7.x/server-dotnet/examples/sites/update.md new file mode 100644 index 0000000000..63cb508924 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/sites/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .Node145, // optional + adapter: .Static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-dotnet/examples/storage/create-bucket.md new file mode 100644 index 0000000000..6011c46f28 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.7.x/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..5430ca3102 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.FromPath("./path-to-files/image.jpg"), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..ce572c4f60 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/delete-file.md b/docs/examples/1.7.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..0759b4054f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-bucket.md new file mode 100644 index 0000000000..fd71774dc0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..377ffd4ff9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..177cb793d7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Center, // optional + quality: 0, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: ImageFormat.Jpg // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..f1be9c611c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..8f0cd9ea6c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.GetFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-dotnet/examples/storage/list-buckets.md new file mode 100644 index 0000000000..38f96df630 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +BucketList result = await storage.ListBuckets( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/list-files.md b/docs/examples/1.7.x/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..888f2db1df --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "<BUCKET_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-dotnet/examples/storage/update-bucket.md new file mode 100644 index 0000000000..718376634a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.7.x/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..72324e1a09 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/create-membership.md b/docs/examples/1.7.x/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..83105ebd54 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "<TEAM_ID>", + roles: new List<string>(), + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/create.md b/docs/examples/1.7.x/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..30da3c7620 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0bee2f71d7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/delete.md b/docs/examples/1.7.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..8a3c83d915 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.Delete( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/get-membership.md b/docs/examples/1.7.x/server-dotnet/examples/teams/get-membership.md new file mode 100644 index 0000000000..67f6297969 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.GetMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/teams/get-prefs.md new file mode 100644 index 0000000000..4a1b82ac33 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.GetPrefs( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/get.md b/docs/examples/1.7.x/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..4141dea3f6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Get( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-dotnet/examples/teams/list-memberships.md new file mode 100644 index 0000000000..030cfeddf3 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "<TEAM_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/list.md b/docs/examples/1.7.x/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..8932261332 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +TeamList result = await teams.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..d13efb2e34 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership.md b/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership.md new file mode 100644 index 0000000000..d55a370066 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/update-name.md b/docs/examples/1.7.x/server-dotnet/examples/teams/update-name.md new file mode 100644 index 0000000000..be8bd0cbcd --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.UpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/teams/update-prefs.md new file mode 100644 index 0000000000..5f9ab0059e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.UpdatePrefs( + teamId: "<TEAM_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..8f7a5f09a9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.CreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "", // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md new file mode 100644 index 0000000000..4a4a261c29 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +await tokens.Delete( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..eaa043324f --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/get-j-w-t.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +JWT result = await tokens.GetJWT( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md new file mode 100644 index 0000000000..5cf439967e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Get( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md new file mode 100644 index 0000000000..08513639f6 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +ResourceTokenList result = await tokens.List( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md new file mode 100644 index 0000000000..cc3d21487c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Update( + tokenId: "<TOKEN_ID>", + expire: "", // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-argon2user.md new file mode 100644 index 0000000000..631ddb8a5d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..4831e016cf --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..1e4c6b8889 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +JWT result = await users.CreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..b5198e168c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..a8ec46ebbc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.CreateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..868083bf47 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..707878e1dc --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: PasswordHash.Sha1, // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..af8e4d9b04 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..c00a76ed9a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-session.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-session.md new file mode 100644 index 0000000000..c83cedf18a --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Session result = await users.CreateSession( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-target.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-target.md new file mode 100644 index 0000000000..81542847a4 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-target.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.CreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: MessagingProviderType.Email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create-token.md b/docs/examples/1.7.x/server-dotnet/examples/users/create-token.md new file mode 100644 index 0000000000..ad65a1540b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Token result = await users.CreateToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/create.md b/docs/examples/1.7.x/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..c9c72d3b1e --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/create.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete-identity.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete-identity.md new file mode 100644 index 0000000000..141a0f55b9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..991dfa85ee --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteMfaAuthenticator( + userId: "<USER_ID>", + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete-session.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..d6b4878257 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..7c8642c3a9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete-target.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete-target.md new file mode 100644 index 0000000000..d46f69a866 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/delete.md b/docs/examples/1.7.x/server-dotnet/examples/users/delete.md new file mode 100644 index 0000000000..fcc3920027 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.Delete( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..4958ea7910 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.GetMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/get-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..f7d632c174 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.GetPrefs( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/get-target.md b/docs/examples/1.7.x/server-dotnet/examples/users/get-target.md new file mode 100644 index 0000000000..97bb25665c --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/get-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.GetTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/get.md b/docs/examples/1.7.x/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..494cb8c34b --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Get( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-identities.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-identities.md new file mode 100644 index 0000000000..43f31eb90d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-identities.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +IdentityList result = await users.ListIdentities( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-logs.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-logs.md new file mode 100644 index 0000000000..c2765f7ab9 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +LogList result = await users.ListLogs( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-memberships.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-memberships.md new file mode 100644 index 0000000000..3d1b3274f1 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "<USER_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..9096d48ca2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaFactors result = await users.ListMfaFactors( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-sessions.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-sessions.md new file mode 100644 index 0000000000..3d83b3abec --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +SessionList result = await users.ListSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list-targets.md b/docs/examples/1.7.x/server-dotnet/examples/users/list-targets.md new file mode 100644 index 0000000000..547af80fd4 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +TargetList result = await users.ListTargets( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/list.md b/docs/examples/1.7.x/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..c180cc0fc2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +UserList result = await users.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-email-verification.md new file mode 100644 index 0000000000..f702e9fdc8 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-email.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-email.md new file mode 100644 index 0000000000..f826a7c353 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-labels.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-labels.md new file mode 100644 index 0000000000..2f54f993d0 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-labels.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateLabels( + userId: "<USER_ID>", + labels: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d3fd9184d7 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.UpdateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa.md new file mode 100644 index 0000000000..99fae65887 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateMfa( + userId: "<USER_ID>", + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-name.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-name.md new file mode 100644 index 0000000000..abd9f5fdde --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateName( + userId: "<USER_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-password.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-password.md new file mode 100644 index 0000000000..ff50f0875d --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePassword( + userId: "<USER_ID>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..44dfd356e2 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-phone.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-phone.md new file mode 100644 index 0000000000..70435ed6bf --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-prefs.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..296d940569 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.UpdatePrefs( + userId: "<USER_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-status.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..42ea8a2903 --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateStatus( + userId: "<USER_ID>", + status: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/users/update-target.md b/docs/examples/1.7.x/server-dotnet/examples/users/update-target.md new file mode 100644 index 0000000000..ce1d35cabe --- /dev/null +++ b/docs/examples/1.7.x/server-dotnet/examples/users/update-target.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://example.com/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.UpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..98818beb48 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-anonymous-session.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateAnonymousSession( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..c6f7e76461 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-email-password-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateEmailPasswordSession( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-email-token.md b/docs/examples/1.7.x/server-go/examples/account/create-email-token.md new file mode 100644 index 0000000000..59b6da8276 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-email-token.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateEmailToken( + "<USER_ID>", + "email@example.com", + account.WithCreateEmailTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..43ef98cba5 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-j-w-t.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateJWT( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..1ef30255d1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateMagicURLToken( + "<USER_ID>", + "email@example.com", + account.WithCreateMagicURLTokenUrl("https://example.com"), + account.WithCreateMagicURLTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..29c7196aa4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.CreateMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9d13de509e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-challenge.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateMfaChallenge( + "email", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..95cfda43b8 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.CreateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..d8ae36ded9 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-o-auth2token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateOAuth2Token( + "amazon", + account.WithCreateOAuth2TokenSuccess("https://example.com"), + account.WithCreateOAuth2TokenFailure("https://example.com"), + account.WithCreateOAuth2TokenScopes([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md new file mode 100644 index 0000000000..970e55330c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-phone-token.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreatePhoneToken( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..607af86e2d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-phone-verification.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.CreatePhoneVerification( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-recovery.md b/docs/examples/1.7.x/server-go/examples/account/create-recovery.md new file mode 100644 index 0000000000..946f73dc4c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-recovery.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.CreateRecovery( + "email@example.com", + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-session.md b/docs/examples/1.7.x/server-go/examples/account/create-session.md new file mode 100644 index 0000000000..d7dfbc9781 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.CreateSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create-verification.md b/docs/examples/1.7.x/server-go/examples/account/create-verification.md new file mode 100644 index 0000000000..102fc2f27a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create-verification.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.CreateVerification( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/create.md b/docs/examples/1.7.x/server-go/examples/account/create.md new file mode 100644 index 0000000000..4d180f073a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.Create( + "<USER_ID>", + "email@example.com", + "", + account.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-identity.md b/docs/examples/1.7.x/server-go/examples/account/delete-identity.md new file mode 100644 index 0000000000..463eba9444 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d3b63e244b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.DeleteMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-session.md b/docs/examples/1.7.x/server-go/examples/account/delete-session.md new file mode 100644 index 0000000000..eda88dae8a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/delete-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.DeleteSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md new file mode 100644 index 0000000000..915e330e0c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/delete-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.DeleteSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..d8b45bebdc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.GetMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/get-prefs.md b/docs/examples/1.7.x/server-go/examples/account/get-prefs.md new file mode 100644 index 0000000000..72cef59521 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/get-prefs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.GetPrefs( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/get-session.md b/docs/examples/1.7.x/server-go/examples/account/get-session.md new file mode 100644 index 0000000000..73febf4131 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/get-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.GetSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/get.md b/docs/examples/1.7.x/server-go/examples/account/get.md new file mode 100644 index 0000000000..fc57d2734e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/list-identities.md b/docs/examples/1.7.x/server-go/examples/account/list-identities.md new file mode 100644 index 0000000000..d8b8df5998 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/list-identities.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.ListIdentities( + account.WithListIdentitiesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/list-logs.md b/docs/examples/1.7.x/server-go/examples/account/list-logs.md new file mode 100644 index 0000000000..ac105edece --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/list-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.ListLogs( + account.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..639ca50bf1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/list-mfa-factors.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.ListMfaFactors( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/list-sessions.md b/docs/examples/1.7.x/server-go/examples/account/list-sessions.md new file mode 100644 index 0000000000..e8f41c5d83 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/list-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.ListSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-email.md b/docs/examples/1.7.x/server-go/examples/account/update-email.md new file mode 100644 index 0000000000..ce203d613c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateEmail( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..45aa0da3b1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-m-f-a.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateMFA( + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..4390cf6612 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.UpdateMagicURLSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..78c7447f95 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateMfaAuthenticator( + "totp", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..4e6c8d9064 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-challenge.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateMfaChallenge( + "<CHALLENGE_ID>", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e97051da7e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-name.md b/docs/examples/1.7.x/server-go/examples/account/update-name.md new file mode 100644 index 0000000000..cb6b7c1f88 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-name.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateName( + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-password.md b/docs/examples/1.7.x/server-go/examples/account/update-password.md new file mode 100644 index 0000000000..4979c8c2ec --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdatePassword( + "", + account.WithUpdatePasswordOldPassword("password"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md new file mode 100644 index 0000000000..cabb327d35 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + + service := account.NewAccount(client) + response, error := service.UpdatePhoneSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..967fdcc02b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-phone.md b/docs/examples/1.7.x/server-go/examples/account/update-phone.md new file mode 100644 index 0000000000..74de4b5abc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdatePhone( + "+12065550100", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-prefs.md b/docs/examples/1.7.x/server-go/examples/account/update-prefs.md new file mode 100644 index 0000000000..c02533ca64 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdatePrefs( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-recovery.md b/docs/examples/1.7.x/server-go/examples/account/update-recovery.md new file mode 100644 index 0000000000..9fd5a65163 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-recovery.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateRecovery( + "<USER_ID>", + "<SECRET>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-session.md b/docs/examples/1.7.x/server-go/examples/account/update-session.md new file mode 100644 index 0000000000..c98a121828 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-status.md b/docs/examples/1.7.x/server-go/examples/account/update-status.md new file mode 100644 index 0000000000..0af46e1865 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-status.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateStatus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/account/update-verification.md b/docs/examples/1.7.x/server-go/examples/account/update-verification.md new file mode 100644 index 0000000000..8f2da2a983 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/account/update-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := account.NewAccount(client) + response, error := service.UpdateVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md new file mode 100644 index 0000000000..f82e53552b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetBrowser( + "aa", + avatars.WithGetBrowserWidth(0), + avatars.WithGetBrowserHeight(0), + avatars.WithGetBrowserQuality(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..c4678d8c37 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetCreditCard( + "amex", + avatars.WithGetCreditCardWidth(0), + avatars.WithGetCreditCardHeight(0), + avatars.WithGetCreditCardQuality(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c532cdbbb5 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-favicon.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetFavicon( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md new file mode 100644 index 0000000000..79091462fa --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetFlag( + "af", + avatars.WithGetFlagWidth(0), + avatars.WithGetFlagHeight(0), + avatars.WithGetFlagQuality(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-image.md b/docs/examples/1.7.x/server-go/examples/avatars/get-image.md new file mode 100644 index 0000000000..684fd52dce --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-image.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetImage( + "https://example.com", + avatars.WithGetImageWidth(0), + avatars.WithGetImageHeight(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md new file mode 100644 index 0000000000..ddb8d663d3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-initials.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetInitials( + avatars.WithGetInitialsName("<NAME>"), + avatars.WithGetInitialsWidth(0), + avatars.WithGetInitialsHeight(0), + avatars.WithGetInitialsBackground(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..b9e1c92247 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-q-r.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := avatars.NewAvatars(client) + response, error := service.GetQR( + "<TEXT>", + avatars.WithGetQRSize(1), + avatars.WithGetQRMargin(0), + avatars.WithGetQRDownload(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..2630ea34c4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateBooleanAttributeDefault(false), + databases.WithCreateBooleanAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-collection.md b/docs/examples/1.7.x/server-go/examples/databases/create-collection.md new file mode 100644 index 0000000000..2f34e4e631 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithCreateCollectionPermissions(interface{}{"read("any")"}), + databases.WithCreateCollectionDocumentSecurity(false), + databases.WithCreateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..3b9cc8591d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateDatetimeAttributeDefault(""), + databases.WithCreateDatetimeAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-document.md b/docs/examples/1.7.x/server-go/examples/databases/create-document.md new file mode 100644 index 0000000000..528780ef1a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-document.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := databases.NewDatabases(client) + response, error := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..fcedc50aab --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateEmailAttributeDefault("email@example.com"), + databases.WithCreateEmailAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..1eb9472944 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + databases.WithCreateEnumAttributeDefault("<DEFAULT>"), + databases.WithCreateEnumAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..4eeb71c2eb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateFloatAttributeMin(0), + databases.WithCreateFloatAttributeMax(0), + databases.WithCreateFloatAttributeDefault(0), + databases.WithCreateFloatAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-index.md b/docs/examples/1.7.x/server-go/examples/databases/create-index.md new file mode 100644 index 0000000000..56042101b7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-index.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + "key", + []interface{}{}, + databases.WithCreateIndexOrders([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..3e1e5e8ebd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIntegerAttributeMin(0), + databases.WithCreateIntegerAttributeMax(0), + databases.WithCreateIntegerAttributeDefault(0), + databases.WithCreateIntegerAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..2518a46db4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIpAttributeDefault(""), + databases.WithCreateIpAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..d75cb24199 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-relationship-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + "oneToOne", + databases.WithCreateRelationshipAttributeTwoWay(false), + databases.WithCreateRelationshipAttributeKey(""), + databases.WithCreateRelationshipAttributeTwoWayKey(""), + databases.WithCreateRelationshipAttributeOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..37e0cc8d82 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-string-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + 1, + false, + databases.WithCreateStringAttributeDefault("<DEFAULT>"), + databases.WithCreateStringAttributeArray(false), + databases.WithCreateStringAttributeEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..8245e34a7c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.CreateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateUrlAttributeDefault("https://example.com"), + databases.WithCreateUrlAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/create.md b/docs/examples/1.7.x/server-go/examples/databases/create.md new file mode 100644 index 0000000000..a35568fcb1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + databases.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..72e1c307a2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.DeleteAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md new file mode 100644 index 0000000000..48cf125290 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-document.md b/docs/examples/1.7.x/server-go/examples/databases/delete-document.md new file mode 100644 index 0000000000..be100c993c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-document.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := databases.NewDatabases(client) + response, error := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete-index.md b/docs/examples/1.7.x/server-go/examples/databases/delete-index.md new file mode 100644 index 0000000000..b16904d1ca --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/delete.md b/docs/examples/1.7.x/server-go/examples/databases/delete.md new file mode 100644 index 0000000000..295efebb33 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.Delete( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md new file mode 100644 index 0000000000..c0ab9fa434 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/get-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.GetAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-collection.md b/docs/examples/1.7.x/server-go/examples/databases/get-collection.md new file mode 100644 index 0000000000..f92a1606bc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/get-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-document.md b/docs/examples/1.7.x/server-go/examples/databases/get-document.md new file mode 100644 index 0000000000..ee8ad74792 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/get-document.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := databases.NewDatabases(client) + response, error := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithGetDocumentQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/get-index.md b/docs/examples/1.7.x/server-go/examples/databases/get-index.md new file mode 100644 index 0000000000..744a2a0bb5 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/get.md b/docs/examples/1.7.x/server-go/examples/databases/get.md new file mode 100644 index 0000000000..fb445c5683 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.Get( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md new file mode 100644 index 0000000000..f63f533c1c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/list-attributes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.ListAttributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListAttributesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-collections.md b/docs/examples/1.7.x/server-go/examples/databases/list-collections.md new file mode 100644 index 0000000000..4a75d5d791 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/list-collections.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.ListCollections( + "<DATABASE_ID>", + databases.WithListCollectionsQueries([]interface{}{}), + databases.WithListCollectionsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-documents.md b/docs/examples/1.7.x/server-go/examples/databases/list-documents.md new file mode 100644 index 0000000000..3820f22927 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/list-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := databases.NewDatabases(client) + response, error := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md new file mode 100644 index 0000000000..0df4af2a6c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/list.md b/docs/examples/1.7.x/server-go/examples/databases/list.md new file mode 100644 index 0000000000..4a4baefdd8 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.List( + databases.WithListQueries([]interface{}{}), + databases.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..1087b6a78e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + false, + databases.WithUpdateBooleanAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-collection.md b/docs/examples/1.7.x/server-go/examples/databases/update-collection.md new file mode 100644 index 0000000000..348248570d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), + databases.WithUpdateCollectionDocumentSecurity(false), + databases.WithUpdateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..7813836230 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateDatetimeAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-document.md b/docs/examples/1.7.x/server-go/examples/databases/update-document.md new file mode 100644 index 0000000000..243a146600 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-document.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := databases.NewDatabases(client) + response, error := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithUpdateDocumentData(map[string]interface{}{}), + databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..b5311dec03 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..0e1e6aeadf --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + databases.WithUpdateEnumAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..994f22b700 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateFloatAttributeMin(0), + databases.WithUpdateFloatAttributeMax(0), + databases.WithUpdateFloatAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..0d4ed93658 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateIntegerAttributeMin(0), + databases.WithUpdateIntegerAttributeMax(0), + databases.WithUpdateIntegerAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..2c28a4ea6b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateIpAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..dfb7fa5040 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-relationship-attribute.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..4ca4f63117 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-string-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "<DEFAULT>", + databases.WithUpdateStringAttributeSize(1), + databases.WithUpdateStringAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..7dd2d306bd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.UpdateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/databases/update.md b/docs/examples/1.7.x/server-go/examples/databases/update.md new file mode 100644 index 0000000000..c91720d6f2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/databases/update.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := databases.NewDatabases(client) + response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + databases.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md new file mode 100644 index 0000000000..d6143ddde9 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.CreateDeployment( + "<FUNCTION_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + functions.WithCreateDeploymentEntrypoint("<ENTRYPOINT>"), + functions.WithCreateDeploymentCommands("<COMMANDS>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..1835b84d88 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.CreateDuplicateDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-execution.md b/docs/examples/1.7.x/server-go/examples/functions/create-execution.md new file mode 100644 index 0000000000..9c7285777b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-execution.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := functions.NewFunctions(client) + response, error := service.CreateExecution( + "<FUNCTION_ID>", + functions.WithCreateExecutionBody("<BODY>"), + functions.WithCreateExecutionAsync(false), + functions.WithCreateExecutionPath("<PATH>"), + functions.WithCreateExecutionMethod("GET"), + functions.WithCreateExecutionHeaders(map[string]interface{}{}), + functions.WithCreateExecutionScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..5c78b93abc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.CreateTemplateDeployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + functions.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-variable.md b/docs/examples/1.7.x/server-go/examples/functions/create-variable.md new file mode 100644 index 0000000000..8e32085f47 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.CreateVariable( + "<FUNCTION_ID>", + "<KEY>", + "<VALUE>", + functions.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..065fb97467 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.CreateVcsDeployment( + "<FUNCTION_ID>", + "branch", + "<REFERENCE>", + functions.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/create.md b/docs/examples/1.7.x/server-go/examples/functions/create.md new file mode 100644 index 0000000000..4e8c9ed239 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.Create( + "<FUNCTION_ID>", + "<NAME>", + "node-14.5", + functions.WithCreateExecute(interface{}{"any"}), + functions.WithCreateEvents([]interface{}{}), + functions.WithCreateSchedule(""), + functions.WithCreateTimeout(1), + functions.WithCreateEnabled(false), + functions.WithCreateLogging(false), + functions.WithCreateEntrypoint("<ENTRYPOINT>"), + functions.WithCreateCommands("<COMMANDS>"), + functions.WithCreateScopes([]interface{}{}), + functions.WithCreateInstallationId("<INSTALLATION_ID>"), + functions.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithCreateProviderSilentMode(false), + functions.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..a1453d7ece --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.DeleteDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md new file mode 100644 index 0000000000..a34237d742 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.DeleteExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md new file mode 100644 index 0000000000..e50c804c86 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.DeleteVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/delete.md b/docs/examples/1.7.x/server-go/examples/functions/delete.md new file mode 100644 index 0000000000..28d9a9d774 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.Delete( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..f65a0b3ac4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.GetDeploymentDownload( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md new file mode 100644 index 0000000000..c1f7ed8dbc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.GetDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-execution.md b/docs/examples/1.7.x/server-go/examples/functions/get-execution.md new file mode 100644 index 0000000000..cef7e7d1b5 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/get-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := functions.NewFunctions(client) + response, error := service.GetExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/get-variable.md b/docs/examples/1.7.x/server-go/examples/functions/get-variable.md new file mode 100644 index 0000000000..289523c7ab --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.GetVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/get.md b/docs/examples/1.7.x/server-go/examples/functions/get.md new file mode 100644 index 0000000000..ba14653eed --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.Get( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md new file mode 100644 index 0000000000..987163f286 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.ListDeployments( + "<FUNCTION_ID>", + functions.WithListDeploymentsQueries([]interface{}{}), + functions.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-executions.md b/docs/examples/1.7.x/server-go/examples/functions/list-executions.md new file mode 100644 index 0000000000..f60ff3d63d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list-executions.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := functions.NewFunctions(client) + response, error := service.ListExecutions( + "<FUNCTION_ID>", + functions.WithListExecutionsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b8a52b854c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list-runtimes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.ListRuntimes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md new file mode 100644 index 0000000000..77b4a3cce7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list-variables.md b/docs/examples/1.7.x/server-go/examples/functions/list-variables.md new file mode 100644 index 0000000000..552287a2e5 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.ListVariables( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/list.md b/docs/examples/1.7.x/server-go/examples/functions/list.md new file mode 100644 index 0000000000..d3007c936c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.List( + functions.WithListQueries([]interface{}{}), + functions.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..a434c696d7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.UpdateDeploymentStatus( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..3290925b29 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/update-function-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.UpdateFunctionDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/update-variable.md b/docs/examples/1.7.x/server-go/examples/functions/update-variable.md new file mode 100644 index 0000000000..4308d38b6e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.UpdateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + functions.WithUpdateVariableValue("<VALUE>"), + functions.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/functions/update.md b/docs/examples/1.7.x/server-go/examples/functions/update.md new file mode 100644 index 0000000000..fa94ae9efe --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/functions/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := functions.NewFunctions(client) + response, error := service.Update( + "<FUNCTION_ID>", + "<NAME>", + functions.WithUpdateRuntime("node-14.5"), + functions.WithUpdateExecute(interface{}{"any"}), + functions.WithUpdateEvents([]interface{}{}), + functions.WithUpdateSchedule(""), + functions.WithUpdateTimeout(1), + functions.WithUpdateEnabled(false), + functions.WithUpdateLogging(false), + functions.WithUpdateEntrypoint("<ENTRYPOINT>"), + functions.WithUpdateCommands("<COMMANDS>"), + functions.WithUpdateScopes([]interface{}{}), + functions.WithUpdateInstallationId("<INSTALLATION_ID>"), + functions.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithUpdateProviderSilentMode(false), + functions.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/graphql/mutation.md b/docs/examples/1.7.x/server-go/examples/graphql/mutation.md new file mode 100644 index 0000000000..219b81784a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/graphql/mutation.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := graphql.NewGraphql(client) + response, error := service.Mutation( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/graphql/query.md b/docs/examples/1.7.x/server-go/examples/graphql/query.md new file mode 100644 index 0000000000..711b938411 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/graphql/query.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := graphql.NewGraphql(client) + response, error := service.Query( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md new file mode 100644 index 0000000000..e126f57935 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-antivirus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetAntivirus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-cache.md b/docs/examples/1.7.x/server-go/examples/health/get-cache.md new file mode 100644 index 0000000000..b41e4fa436 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-cache.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetCache( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-certificate.md b/docs/examples/1.7.x/server-go/examples/health/get-certificate.md new file mode 100644 index 0000000000..9b433fa8fb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-certificate.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetCertificate( + health.WithGetCertificateDomain(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-d-b.md b/docs/examples/1.7.x/server-go/examples/health/get-d-b.md new file mode 100644 index 0000000000..c42a679418 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-d-b.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetDB( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..23e1654605 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-failed-jobs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetFailedJobs( + "v1-database", + health.WithGetFailedJobsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..f3ea4480f2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-pub-sub.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetPubSub( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..4710600d7c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-builds.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueBuilds( + health.WithGetQueueBuildsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7983189c55 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-certificates.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueCertificates( + health.WithGetQueueCertificatesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..4d5a77f5e3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-databases.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueDatabases( + health.WithGetQueueDatabasesName("<NAME>"), + health.WithGetQueueDatabasesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..7a1061f05c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-deletes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueDeletes( + health.WithGetQueueDeletesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..f585437aa0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-functions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueFunctions( + health.WithGetQueueFunctionsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..9c6dbf0753 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueLogs( + health.WithGetQueueLogsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..1995b5f0ce --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-mails.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueMails( + health.WithGetQueueMailsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..2bbda7e5d2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-messaging.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueMessaging( + health.WithGetQueueMessagingThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..c5053b8813 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-migrations.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueMigrations( + health.WithGetQueueMigrationsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..d607dcae88 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-resources.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueStatsResources( + health.WithGetQueueStatsResourcesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..c5c0f18401 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueStatsUsageDump( + health.WithGetQueueStatsUsageDumpThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..3c07bfc17a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-usage.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueUsage( + health.WithGetQueueUsageThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..85eb8b7fd1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-queue-webhooks.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetQueueWebhooks( + health.WithGetQueueWebhooksThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7e2e588008 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-storage-local.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetStorageLocal( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-storage.md b/docs/examples/1.7.x/server-go/examples/health/get-storage.md new file mode 100644 index 0000000000..403d3fe9fb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-storage.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetStorage( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get-time.md b/docs/examples/1.7.x/server-go/examples/health/get-time.md new file mode 100644 index 0000000000..238a91b989 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get-time.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.GetTime( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/health/get.md b/docs/examples/1.7.x/server-go/examples/health/get.md new file mode 100644 index 0000000000..4ade43b705 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/health/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := health.NewHealth(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/get.md b/docs/examples/1.7.x/server-go/examples/locale/get.md new file mode 100644 index 0000000000..016ec9653c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-codes.md b/docs/examples/1.7.x/server-go/examples/locale/list-codes.md new file mode 100644 index 0000000000..95faabe78d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-continents.md b/docs/examples/1.7.x/server-go/examples/locale/list-continents.md new file mode 100644 index 0000000000..0d1ebe3690 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-continents.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListContinents( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..102da98bf1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries-e-u.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListCountriesEU( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..6fabf3beec --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries-phones.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListCountriesPhones( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-countries.md b/docs/examples/1.7.x/server-go/examples/locale/list-countries.md new file mode 100644 index 0000000000..61f73332a6 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-countries.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListCountries( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md new file mode 100644 index 0000000000..d60cf2e2ec --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-currencies.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListCurrencies( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/locale/list-languages.md b/docs/examples/1.7.x/server-go/examples/locale/list-languages.md new file mode 100644 index 0000000000..cd6a009966 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/locale/list-languages.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := locale.NewLocale(client) + response, error := service.ListLanguages( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..81c97a72f9 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateApnsProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithCreateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithCreateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithCreateApnsProviderSandbox(false), + messaging.WithCreateApnsProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-email.md b/docs/examples/1.7.x/server-go/examples/messaging/create-email.md new file mode 100644 index 0000000000..f5f322ffb8 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateEmail( + "<MESSAGE_ID>", + "<SUBJECT>", + "<CONTENT>", + messaging.WithCreateEmailTopics([]interface{}{}), + messaging.WithCreateEmailUsers([]interface{}{}), + messaging.WithCreateEmailTargets([]interface{}{}), + messaging.WithCreateEmailCc([]interface{}{}), + messaging.WithCreateEmailBcc([]interface{}{}), + messaging.WithCreateEmailAttachments([]interface{}{}), + messaging.WithCreateEmailDraft(false), + messaging.WithCreateEmailHtml(false), + messaging.WithCreateEmailScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..1b59ae90eb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateFcmProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateFcmProviderServiceAccountJSON(map[string]interface{}{}), + messaging.WithCreateFcmProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..cb53984512 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateMailgunProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMailgunProviderApiKey("<API_KEY>"), + messaging.WithCreateMailgunProviderDomain("<DOMAIN>"), + messaging.WithCreateMailgunProviderIsEuRegion(false), + messaging.WithCreateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithCreateMailgunProviderFromEmail("email@example.com"), + messaging.WithCreateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), + messaging.WithCreateMailgunProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..3d739f025d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateMsg91Provider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithCreateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithCreateMsg91ProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateMsg91ProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-push.md b/docs/examples/1.7.x/server-go/examples/messaging/create-push.md new file mode 100644 index 0000000000..8c2bdf62e3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreatePush( + "<MESSAGE_ID>", + messaging.WithCreatePushTitle("<TITLE>"), + messaging.WithCreatePushBody("<BODY>"), + messaging.WithCreatePushTopics([]interface{}{}), + messaging.WithCreatePushUsers([]interface{}{}), + messaging.WithCreatePushTargets([]interface{}{}), + messaging.WithCreatePushData(map[string]interface{}{}), + messaging.WithCreatePushAction("<ACTION>"), + messaging.WithCreatePushImage("[ID1:ID2]"), + messaging.WithCreatePushIcon("<ICON>"), + messaging.WithCreatePushSound("<SOUND>"), + messaging.WithCreatePushColor("<COLOR>"), + messaging.WithCreatePushTag("<TAG>"), + messaging.WithCreatePushBadge(0), + messaging.WithCreatePushDraft(false), + messaging.WithCreatePushScheduledAt(""), + messaging.WithCreatePushContentAvailable(false), + messaging.WithCreatePushCritical(false), + messaging.WithCreatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..a0a211c2aa --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateSendgridProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateSendgridProviderApiKey("<API_KEY>"), + messaging.WithCreateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithCreateSendgridProviderFromEmail("email@example.com"), + messaging.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), + messaging.WithCreateSendgridProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md new file mode 100644 index 0000000000..ebece130cd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateSms( + "<MESSAGE_ID>", + "<CONTENT>", + messaging.WithCreateSmsTopics([]interface{}{}), + messaging.WithCreateSmsUsers([]interface{}{}), + messaging.WithCreateSmsTargets([]interface{}{}), + messaging.WithCreateSmsDraft(false), + messaging.WithCreateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..17b48304e3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateSmtpProvider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + messaging.WithCreateSmtpProviderPort(1), + messaging.WithCreateSmtpProviderUsername("<USERNAME>"), + messaging.WithCreateSmtpProviderPassword("<PASSWORD>"), + messaging.WithCreateSmtpProviderEncryption("none"), + messaging.WithCreateSmtpProviderAutoTLS(false), + messaging.WithCreateSmtpProviderMailer("<MAILER>"), + messaging.WithCreateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithCreateSmtpProviderFromEmail("email@example.com"), + messaging.WithCreateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSmtpProviderReplyToEmail("email@example.com"), + messaging.WithCreateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..fa6bc1bacb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-subscriber.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetJWT("<YOUR_JWT>") // Your secret JSON Web Token + + service := messaging.NewMessaging(client) + response, error := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..d9c78f3355 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTelesignProviderFrom("+12065550100"), + messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), + messaging.WithCreateTelesignProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..0118a82641 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTextmagicProviderFrom("+12065550100"), + messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), + messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithCreateTextmagicProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md new file mode 100644 index 0000000000..fb65b66841 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + messaging.WithCreateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..1ab330e9e4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTwilioProviderFrom("+12065550100"), + messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithCreateTwilioProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..970ffe7b07 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/create-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateVonageProviderFrom("+12065550100"), + messaging.WithCreateVonageProviderApiKey("<API_KEY>"), + messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithCreateVonageProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..89c98c0bbd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.DeleteProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..3dffc1da88 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetJWT("<YOUR_JWT>") // Your secret JSON Web Token + + service := messaging.NewMessaging(client) + response, error := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..2a7deff73f --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.DeleteTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/delete.md b/docs/examples/1.7.x/server-go/examples/messaging/delete.md new file mode 100644 index 0000000000..8edf1e3aeb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.Delete( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-message.md b/docs/examples/1.7.x/server-go/examples/messaging/get-message.md new file mode 100644 index 0000000000..fbfe49205b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-message.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.GetMessage( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md new file mode 100644 index 0000000000..55a8228071 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.GetProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..afb04d28aa --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md new file mode 100644 index 0000000000..766ef0294a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/get-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.GetTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..e58c3bb362 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-message-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListMessageLogs( + "<MESSAGE_ID>", + messaging.WithListMessageLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md new file mode 100644 index 0000000000..d50d78a40a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-messages.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListMessages( + messaging.WithListMessagesQueries([]interface{}{}), + messaging.WithListMessagesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..05a7b76574 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-provider-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListProviderLogs( + "<PROVIDER_ID>", + messaging.WithListProviderLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md new file mode 100644 index 0000000000..cff6c2030d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-providers.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListProviders( + messaging.WithListProvidersQueries([]interface{}{}), + messaging.WithListProvidersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..44366d4c03 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListSubscriberLogs( + "<SUBSCRIBER_ID>", + messaging.WithListSubscriberLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..5ffad49ab0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-subscribers.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListSubscribers( + "<TOPIC_ID>", + messaging.WithListSubscribersQueries([]interface{}{}), + messaging.WithListSubscribersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md new file mode 100644 index 0000000000..fa4eb74132 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListTargets( + "<MESSAGE_ID>", + messaging.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..97c83bdee3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-topic-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListTopicLogs( + "<TOPIC_ID>", + messaging.WithListTopicLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md new file mode 100644 index 0000000000..8047744518 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/list-topics.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.ListTopics( + messaging.WithListTopicsQueries([]interface{}{}), + messaging.WithListTopicsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..01676ec22e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateApnsProvider( + "<PROVIDER_ID>", + messaging.WithUpdateApnsProviderName("<NAME>"), + messaging.WithUpdateApnsProviderEnabled(false), + messaging.WithUpdateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithUpdateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithUpdateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithUpdateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithUpdateApnsProviderSandbox(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-email.md b/docs/examples/1.7.x/server-go/examples/messaging/update-email.md new file mode 100644 index 0000000000..fcf0ffc5b1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateEmail( + "<MESSAGE_ID>", + messaging.WithUpdateEmailTopics([]interface{}{}), + messaging.WithUpdateEmailUsers([]interface{}{}), + messaging.WithUpdateEmailTargets([]interface{}{}), + messaging.WithUpdateEmailSubject("<SUBJECT>"), + messaging.WithUpdateEmailContent("<CONTENT>"), + messaging.WithUpdateEmailDraft(false), + messaging.WithUpdateEmailHtml(false), + messaging.WithUpdateEmailCc([]interface{}{}), + messaging.WithUpdateEmailBcc([]interface{}{}), + messaging.WithUpdateEmailScheduledAt(""), + messaging.WithUpdateEmailAttachments([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..ddc8c6c59a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateFcmProvider( + "<PROVIDER_ID>", + messaging.WithUpdateFcmProviderName("<NAME>"), + messaging.WithUpdateFcmProviderEnabled(false), + messaging.WithUpdateFcmProviderServiceAccountJSON(map[string]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f29965a56a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateMailgunProvider( + "<PROVIDER_ID>", + messaging.WithUpdateMailgunProviderName("<NAME>"), + messaging.WithUpdateMailgunProviderApiKey("<API_KEY>"), + messaging.WithUpdateMailgunProviderDomain("<DOMAIN>"), + messaging.WithUpdateMailgunProviderIsEuRegion(false), + messaging.WithUpdateMailgunProviderEnabled(false), + messaging.WithUpdateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithUpdateMailgunProviderFromEmail("email@example.com"), + messaging.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..a6df44d8db --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateMsg91Provider( + "<PROVIDER_ID>", + messaging.WithUpdateMsg91ProviderName("<NAME>"), + messaging.WithUpdateMsg91ProviderEnabled(false), + messaging.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-push.md b/docs/examples/1.7.x/server-go/examples/messaging/update-push.md new file mode 100644 index 0000000000..1f21d72e55 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdatePush( + "<MESSAGE_ID>", + messaging.WithUpdatePushTopics([]interface{}{}), + messaging.WithUpdatePushUsers([]interface{}{}), + messaging.WithUpdatePushTargets([]interface{}{}), + messaging.WithUpdatePushTitle("<TITLE>"), + messaging.WithUpdatePushBody("<BODY>"), + messaging.WithUpdatePushData(map[string]interface{}{}), + messaging.WithUpdatePushAction("<ACTION>"), + messaging.WithUpdatePushImage("[ID1:ID2]"), + messaging.WithUpdatePushIcon("<ICON>"), + messaging.WithUpdatePushSound("<SOUND>"), + messaging.WithUpdatePushColor("<COLOR>"), + messaging.WithUpdatePushTag("<TAG>"), + messaging.WithUpdatePushBadge(0), + messaging.WithUpdatePushDraft(false), + messaging.WithUpdatePushScheduledAt(""), + messaging.WithUpdatePushContentAvailable(false), + messaging.WithUpdatePushCritical(false), + messaging.WithUpdatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..44a4cdd508 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateSendgridProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSendgridProviderName("<NAME>"), + messaging.WithUpdateSendgridProviderEnabled(false), + messaging.WithUpdateSendgridProviderApiKey("<API_KEY>"), + messaging.WithUpdateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSendgridProviderFromEmail("email@example.com"), + messaging.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md new file mode 100644 index 0000000000..8177ffe1a1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateSms( + "<MESSAGE_ID>", + messaging.WithUpdateSmsTopics([]interface{}{}), + messaging.WithUpdateSmsUsers([]interface{}{}), + messaging.WithUpdateSmsTargets([]interface{}{}), + messaging.WithUpdateSmsContent("<CONTENT>"), + messaging.WithUpdateSmsDraft(false), + messaging.WithUpdateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0b0da69507 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateSmtpProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSmtpProviderName("<NAME>"), + messaging.WithUpdateSmtpProviderHost("<HOST>"), + messaging.WithUpdateSmtpProviderPort(1), + messaging.WithUpdateSmtpProviderUsername("<USERNAME>"), + messaging.WithUpdateSmtpProviderPassword("<PASSWORD>"), + messaging.WithUpdateSmtpProviderEncryption("none"), + messaging.WithUpdateSmtpProviderAutoTLS(false), + messaging.WithUpdateSmtpProviderMailer("<MAILER>"), + messaging.WithUpdateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSmtpProviderFromEmail("email@example.com"), + messaging.WithUpdateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSmtpProviderReplyToEmail("<REPLY_TO_EMAIL>"), + messaging.WithUpdateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..dcdba4ff06 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTelesignProviderName("<NAME>"), + messaging.WithUpdateTelesignProviderEnabled(false), + messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), + messaging.WithUpdateTelesignProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..c784de6e01 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTextmagicProviderName("<NAME>"), + messaging.WithUpdateTextmagicProviderEnabled(false), + messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), + messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithUpdateTextmagicProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md new file mode 100644 index 0000000000..373250ddf2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateTopic( + "<TOPIC_ID>", + messaging.WithUpdateTopicName("<NAME>"), + messaging.WithUpdateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..392296e7d1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTwilioProviderName("<NAME>"), + messaging.WithUpdateTwilioProviderEnabled(false), + messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithUpdateTwilioProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..bd0f653985 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/messaging/update-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := messaging.NewMessaging(client) + response, error := service.UpdateVonageProvider( + "<PROVIDER_ID>", + messaging.WithUpdateVonageProviderName("<NAME>"), + messaging.WithUpdateVonageProviderEnabled(false), + messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), + messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithUpdateVonageProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md new file mode 100644 index 0000000000..839c4b4a4e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.CreateDeployment( + "<SITE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + sites.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..c2df962461 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..4cce05628d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + sites.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-variable.md b/docs/examples/1.7.x/server-go/examples/sites/create-variable.md new file mode 100644 index 0000000000..10d5eae6ce --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.CreateVariable( + "<SITE_ID>", + "<KEY>", + "<VALUE>", + sites.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..744934bc76 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + sites.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/create.md b/docs/examples/1.7.x/server-go/examples/sites/create.md new file mode 100644 index 0000000000..c4df7c00bc --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.Create( + "<SITE_ID>", + "<NAME>", + "analog", + "node-14.5", + sites.WithCreateEnabled(false), + sites.WithCreateLogging(false), + sites.WithCreateTimeout(1), + sites.WithCreateInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithCreateAdapter("static"), + sites.WithCreateInstallationId("<INSTALLATION_ID>"), + sites.WithCreateFallbackFile("<FALLBACK_FILE>"), + sites.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithCreateProviderSilentMode(false), + sites.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..3729d77078 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-log.md b/docs/examples/1.7.x/server-go/examples/sites/delete-log.md new file mode 100644 index 0000000000..86ddcbeffd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md new file mode 100644 index 0000000000..d12e6c6bc0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/delete.md b/docs/examples/1.7.x/server-go/examples/sites/delete.md new file mode 100644 index 0000000000..f397a2d891 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.Delete( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..9ba31d5cbb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + sites.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md new file mode 100644 index 0000000000..31533b6632 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-log.md b/docs/examples/1.7.x/server-go/examples/sites/get-log.md new file mode 100644 index 0000000000..a2659e589d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/get-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/get-variable.md b/docs/examples/1.7.x/server-go/examples/sites/get-variable.md new file mode 100644 index 0000000000..4d964bbbd4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/get.md b/docs/examples/1.7.x/server-go/examples/sites/get.md new file mode 100644 index 0000000000..33632c05c1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.Get( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md new file mode 100644 index 0000000000..8c004909b9 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.ListDeployments( + "<SITE_ID>", + sites.WithListDeploymentsQueries([]interface{}{}), + sites.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..1b43a6b247 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list-frameworks.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.ListFrameworks( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-logs.md b/docs/examples/1.7.x/server-go/examples/sites/list-logs.md new file mode 100644 index 0000000000..08682e760e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.ListLogs( + "<SITE_ID>", + sites.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md new file mode 100644 index 0000000000..920ee9eb30 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list-variables.md b/docs/examples/1.7.x/server-go/examples/sites/list-variables.md new file mode 100644 index 0000000000..21cecaac5e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.ListVariables( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/list.md b/docs/examples/1.7.x/server-go/examples/sites/list.md new file mode 100644 index 0000000000..f6db6e282c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.List( + sites.WithListQueries([]interface{}{}), + sites.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..2faa8cb7e8 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..79c6c6ddbe --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/update-site-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/update-variable.md b/docs/examples/1.7.x/server-go/examples/sites/update-variable.md new file mode 100644 index 0000000000..e11a7ea7a0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + sites.WithUpdateVariableValue("<VALUE>"), + sites.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/sites/update.md b/docs/examples/1.7.x/server-go/examples/sites/update.md new file mode 100644 index 0000000000..6e89a8fecb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/sites/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := sites.NewSites(client) + response, error := service.Update( + "<SITE_ID>", + "<NAME>", + "analog", + sites.WithUpdateEnabled(false), + sites.WithUpdateLogging(false), + sites.WithUpdateTimeout(1), + sites.WithUpdateInstallCommand("<INSTALL_COMMAND>"), + sites.WithUpdateBuildCommand("<BUILD_COMMAND>"), + sites.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithUpdateBuildRuntime("node-14.5"), + sites.WithUpdateAdapter("static"), + sites.WithUpdateFallbackFile("<FALLBACK_FILE>"), + sites.WithUpdateInstallationId("<INSTALLATION_ID>"), + sites.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithUpdateProviderSilentMode(false), + sites.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md new file mode 100644 index 0000000000..1b004c1c50 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/create-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := storage.NewStorage(client) + response, error := service.CreateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithCreateBucketPermissions(interface{}{"read("any")"}), + storage.WithCreateBucketFileSecurity(false), + storage.WithCreateBucketEnabled(false), + storage.WithCreateBucketMaximumFileSize(1), + storage.WithCreateBucketAllowedFileExtensions([]interface{}{}), + storage.WithCreateBucketCompression("none"), + storage.WithCreateBucketEncryption(false), + storage.WithCreateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/create-file.md b/docs/examples/1.7.x/server-go/examples/storage/create-file.md new file mode 100644 index 0000000000..d66cfb1c74 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/create-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + storage.WithCreateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..b8297428d0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/delete-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := storage.NewStorage(client) + response, error := service.DeleteBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/delete-file.md b/docs/examples/1.7.x/server-go/examples/storage/delete-file.md new file mode 100644 index 0000000000..cbfe40c52b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/delete-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e4e4a30b0e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/get-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := storage.NewStorage(client) + response, error := service.GetBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md new file mode 100644 index 0000000000..de290c8577 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c207351b64 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.GetFilePreview( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFilePreviewWidth(0), + storage.WithGetFilePreviewHeight(0), + storage.WithGetFilePreviewGravity("center"), + storage.WithGetFilePreviewQuality(0), + storage.WithGetFilePreviewBorderWidth(0), + storage.WithGetFilePreviewBorderColor(""), + storage.WithGetFilePreviewBorderRadius(0), + storage.WithGetFilePreviewOpacity(0), + storage.WithGetFilePreviewRotation(-360), + storage.WithGetFilePreviewBackground(""), + storage.WithGetFilePreviewOutput("jpg"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md new file mode 100644 index 0000000000..4fd4a0a3bd --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file.md b/docs/examples/1.7.x/server-go/examples/storage/get-file.md new file mode 100644 index 0000000000..df5a89fea6 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md new file mode 100644 index 0000000000..15e5dbfd60 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/list-buckets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := storage.NewStorage(client) + response, error := service.ListBuckets( + storage.WithListBucketsQueries([]interface{}{}), + storage.WithListBucketsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/list-files.md b/docs/examples/1.7.x/server-go/examples/storage/list-files.md new file mode 100644 index 0000000000..2fefe5d94e --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/list-files.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.ListFiles( + "<BUCKET_ID>", + storage.WithListFilesQueries([]interface{}{}), + storage.WithListFilesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md new file mode 100644 index 0000000000..818742f2e6 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/update-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := storage.NewStorage(client) + response, error := service.UpdateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithUpdateBucketPermissions(interface{}{"read("any")"}), + storage.WithUpdateBucketFileSecurity(false), + storage.WithUpdateBucketEnabled(false), + storage.WithUpdateBucketMaximumFileSize(1), + storage.WithUpdateBucketAllowedFileExtensions([]interface{}{}), + storage.WithUpdateBucketCompression("none"), + storage.WithUpdateBucketEncryption(false), + storage.WithUpdateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/storage/update-file.md b/docs/examples/1.7.x/server-go/examples/storage/update-file.md new file mode 100644 index 0000000000..cef4fd9569 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/storage/update-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := storage.NewStorage(client) + response, error := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithUpdateFileName("<NAME>"), + storage.WithUpdateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/create-membership.md b/docs/examples/1.7.x/server-go/examples/teams/create-membership.md new file mode 100644 index 0000000000..9b47d9b493 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/create-membership.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.CreateMembership( + "<TEAM_ID>", + []interface{}{}, + teams.WithCreateMembershipEmail("email@example.com"), + teams.WithCreateMembershipUserId("<USER_ID>"), + teams.WithCreateMembershipPhone("+12065550100"), + teams.WithCreateMembershipUrl("https://example.com"), + teams.WithCreateMembershipName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/create.md b/docs/examples/1.7.x/server-go/examples/teams/create.md new file mode 100644 index 0000000000..385dda4dc1 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.Create( + "<TEAM_ID>", + "<NAME>", + teams.WithCreateRoles([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md new file mode 100644 index 0000000000..dfb3192021 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/delete-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/delete.md b/docs/examples/1.7.x/server-go/examples/teams/delete.md new file mode 100644 index 0000000000..88e3068d5f --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.Delete( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/get-membership.md b/docs/examples/1.7.x/server-go/examples/teams/get-membership.md new file mode 100644 index 0000000000..91fcabc0b7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/get-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md new file mode 100644 index 0000000000..714cfbff1f --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.GetPrefs( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/get.md b/docs/examples/1.7.x/server-go/examples/teams/get.md new file mode 100644 index 0000000000..2419d78a54 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.Get( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md new file mode 100644 index 0000000000..93752641a9 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.ListMemberships( + "<TEAM_ID>", + teams.WithListMembershipsQueries([]interface{}{}), + teams.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/list.md b/docs/examples/1.7.x/server-go/examples/teams/list.md new file mode 100644 index 0000000000..3478179eff --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.List( + teams.WithListQueries([]interface{}{}), + teams.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..e6a0a00a7c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/update-membership-status.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-membership.md b/docs/examples/1.7.x/server-go/examples/teams/update-membership.md new file mode 100644 index 0000000000..2a61532e94 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/update-membership.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-name.md b/docs/examples/1.7.x/server-go/examples/teams/update-name.md new file mode 100644 index 0000000000..636577cf6c --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.UpdateName( + "<TEAM_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md new file mode 100644 index 0000000000..399d9439f0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/teams/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := teams.NewTeams(client) + response, error := service.UpdatePrefs( + "<TEAM_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..edd2bbf445 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithCreateFileTokenExpire(""), + tokens.WithCreateFileTokenPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/delete.md b/docs/examples/1.7.x/server-go/examples/tokens/delete.md new file mode 100644 index 0000000000..7a50b4818b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.Delete( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-go/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..ff1ddb2f09 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/get-j-w-t.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.GetJWT( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/get.md b/docs/examples/1.7.x/server-go/examples/tokens/get.md new file mode 100644 index 0000000000..0f4da90681 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.Get( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/list.md b/docs/examples/1.7.x/server-go/examples/tokens/list.md new file mode 100644 index 0000000000..774be90229 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithListQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/tokens/update.md b/docs/examples/1.7.x/server-go/examples/tokens/update.md new file mode 100644 index 0000000000..1d06638c44 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/tokens/update.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetSession("") // The user session to authenticate with + + service := tokens.NewTokens(client) + response, error := service.Update( + "<TOKEN_ID>", + tokens.WithUpdateExpire(""), + tokens.WithUpdatePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md new file mode 100644 index 0000000000..79d5fc9a8a --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-argon2user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateArgon2UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..5b2fd26712 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-bcrypt-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateBcryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..453ab6c013 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-j-w-t.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateJWT( + "<USER_ID>", + users.WithCreateJWTSessionId("<SESSION_ID>"), + users.WithCreateJWTDuration(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..4500d11a97 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-m-d5user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateMD5UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..441bc4e231 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..d338a38178 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-p-h-pass-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreatePHPassUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..924bd780cf --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-s-h-a-user.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateSHAUserPasswordVersion("sha1"), + users.WithCreateSHAUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d41f9849af --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + users.WithCreateScryptModifiedUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..bf048110d4 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-scrypt-user.md @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 0, + 0, + 0, + 0, + users.WithCreateScryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-session.md b/docs/examples/1.7.x/server-go/examples/users/create-session.md new file mode 100644 index 0000000000..074904836d --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateSession( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-target.md b/docs/examples/1.7.x/server-go/examples/users/create-target.md new file mode 100644 index 0000000000..6f56b0cff7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-target.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + users.WithCreateTargetProviderId("<PROVIDER_ID>"), + users.WithCreateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create-token.md b/docs/examples/1.7.x/server-go/examples/users/create-token.md new file mode 100644 index 0000000000..1b60338cf7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.CreateToken( + "<USER_ID>", + users.WithCreateTokenLength(4), + users.WithCreateTokenExpire(60), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/create.md b/docs/examples/1.7.x/server-go/examples/users/create.md new file mode 100644 index 0000000000..2e63bc4717 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/create.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.Create( + "<USER_ID>", + users.WithCreateEmail("email@example.com"), + users.WithCreatePhone("+12065550100"), + users.WithCreatePassword(""), + users.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-identity.md b/docs/examples/1.7.x/server-go/examples/users/delete-identity.md new file mode 100644 index 0000000000..a2ff966a91 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..1af93d3e47 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.DeleteMfaAuthenticator( + "<USER_ID>", + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-session.md b/docs/examples/1.7.x/server-go/examples/users/delete-session.md new file mode 100644 index 0000000000..1035d2d197 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete-session.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md new file mode 100644 index 0000000000..5947c7b119 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.DeleteSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete-target.md b/docs/examples/1.7.x/server-go/examples/users/delete-target.md new file mode 100644 index 0000000000..1c55e4f253 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/delete.md b/docs/examples/1.7.x/server-go/examples/users/delete.md new file mode 100644 index 0000000000..531fcc70db --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.Delete( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..a36b0ca165 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.GetMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/get-prefs.md b/docs/examples/1.7.x/server-go/examples/users/get-prefs.md new file mode 100644 index 0000000000..87769b7911 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.GetPrefs( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/get-target.md b/docs/examples/1.7.x/server-go/examples/users/get-target.md new file mode 100644 index 0000000000..86b552ed45 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/get-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/get.md b/docs/examples/1.7.x/server-go/examples/users/get.md new file mode 100644 index 0000000000..312ffcc487 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.Get( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-identities.md b/docs/examples/1.7.x/server-go/examples/users/list-identities.md new file mode 100644 index 0000000000..605c0a35e0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-identities.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListIdentities( + users.WithListIdentitiesQueries([]interface{}{}), + users.WithListIdentitiesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-logs.md b/docs/examples/1.7.x/server-go/examples/users/list-logs.md new file mode 100644 index 0000000000..bbc505df5f --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListLogs( + "<USER_ID>", + users.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-memberships.md b/docs/examples/1.7.x/server-go/examples/users/list-memberships.md new file mode 100644 index 0000000000..77b88f7d00 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListMemberships( + "<USER_ID>", + users.WithListMembershipsQueries([]interface{}{}), + users.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..41ff0c5763 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-mfa-factors.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListMfaFactors( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-sessions.md b/docs/examples/1.7.x/server-go/examples/users/list-sessions.md new file mode 100644 index 0000000000..d18a231e7b --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list-targets.md b/docs/examples/1.7.x/server-go/examples/users/list-targets.md new file mode 100644 index 0000000000..e1f29a2c52 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.ListTargets( + "<USER_ID>", + users.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/list.md b/docs/examples/1.7.x/server-go/examples/users/list.md new file mode 100644 index 0000000000..70182a1cc0 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.List( + users.WithListQueries([]interface{}{}), + users.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md new file mode 100644 index 0000000000..fdf29b04d3 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-email-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateEmailVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-email.md b/docs/examples/1.7.x/server-go/examples/users/update-email.md new file mode 100644 index 0000000000..6e30af04cb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateEmail( + "<USER_ID>", + "email@example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-labels.md b/docs/examples/1.7.x/server-go/examples/users/update-labels.md new file mode 100644 index 0000000000..1f0f250895 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-labels.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateLabels( + "<USER_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d64d180d78 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-mfa.md b/docs/examples/1.7.x/server-go/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ff5da8d62 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-mfa.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateMfa( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-name.md b/docs/examples/1.7.x/server-go/examples/users/update-name.md new file mode 100644 index 0000000000..acc8a9a5b7 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateName( + "<USER_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-password.md b/docs/examples/1.7.x/server-go/examples/users/update-password.md new file mode 100644 index 0000000000..0e377abbe2 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdatePassword( + "<USER_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..463e1007c8 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-phone.md b/docs/examples/1.7.x/server-go/examples/users/update-phone.md new file mode 100644 index 0000000000..917409b3aa --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdatePhone( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-prefs.md b/docs/examples/1.7.x/server-go/examples/users/update-prefs.md new file mode 100644 index 0000000000..df67a0cc44 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdatePrefs( + "<USER_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-status.md b/docs/examples/1.7.x/server-go/examples/users/update-status.md new file mode 100644 index 0000000000..e4f387b406 --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateStatus( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-go/examples/users/update-target.md b/docs/examples/1.7.x/server-go/examples/users/update-target.md new file mode 100644 index 0000000000..b6a0c1cbdb --- /dev/null +++ b/docs/examples/1.7.x/server-go/examples/users/update-target.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.NewClient() + + client.SetEndpoint("https://example.com/v1") // Your API Endpoint + client.SetProject("<YOUR_PROJECT_ID>") // Your project ID + client.SetKey("<YOUR_API_KEY>") // Your secret API key + + service := users.NewUsers(client) + response, error := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + users.WithUpdateTargetIdentifier("<IDENTIFIER>"), + users.WithUpdateTargetProviderId("<PROVIDER_ID>"), + users.WithUpdateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-email-token.md b/docs/examples/1.7.x/server-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-recovery.md b/docs/examples/1.7.x/server-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-session.md b/docs/examples/1.7.x/server-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create-verification.md b/docs/examples/1.7.x/server-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/create.md b/docs/examples/1.7.x/server-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/delete-identity.md b/docs/examples/1.7.x/server-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/delete-session.md b/docs/examples/1.7.x/server-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e2de72b57f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +query { + accountGetMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/get-prefs.md b/docs/examples/1.7.x/server-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..6cb48d2b58 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/get-prefs.md @@ -0,0 +1,5 @@ +query { + accountGetPrefs { + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/get-session.md b/docs/examples/1.7.x/server-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..65c824f68b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/get-session.md @@ -0,0 +1,35 @@ +query { + accountGetSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/get.md b/docs/examples/1.7.x/server-graphql/examples/account/get.md new file mode 100644 index 0000000000..f4f07c187f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/get.md @@ -0,0 +1,35 @@ +query { + accountGet { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/list-identities.md b/docs/examples/1.7.x/server-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..b7a2a6d39a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/list-identities.md @@ -0,0 +1,19 @@ +query { + accountListIdentities( + queries: [] + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/list-logs.md b/docs/examples/1.7.x/server-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..1e17b2f69f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/list-logs.md @@ -0,0 +1,30 @@ +query { + accountListLogs( + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..2a78b901b3 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/list-mfa-factors.md @@ -0,0 +1,8 @@ +query { + accountListMfaFactors { + totp + phone + email + recoveryCode + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/list-sessions.md b/docs/examples/1.7.x/server-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..6d45f1d4ae --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/list-sessions.md @@ -0,0 +1,36 @@ +query { + accountListSessions { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-email.md b/docs/examples/1.7.x/server-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-name.md b/docs/examples/1.7.x/server-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-password.md b/docs/examples/1.7.x/server-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.7.x/server-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.7.x/server-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-recovery.md b/docs/examples/1.7.x/server-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-session.md b/docs/examples/1.7.x/server-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-status.md b/docs/examples/1.7.x/server-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/account/update-verification.md b/docs/examples/1.7.x/server-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..817e1e54c2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-browser.md @@ -0,0 +1,10 @@ +query { + avatarsGetBrowser( + code: "aa", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e4b5dc18d9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-credit-card.md @@ -0,0 +1,10 @@ +query { + avatarsGetCreditCard( + code: "amex", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..bfea71f498 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +query { + avatarsGetFavicon( + url: "https://example.com" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..1502128581 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-flag.md @@ -0,0 +1,10 @@ +query { + avatarsGetFlag( + code: "af", + width: 0, + height: 0, + quality: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-image.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..3b9aa104dc --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-image.md @@ -0,0 +1,9 @@ +query { + avatarsGetImage( + url: "https://example.com", + width: 0, + height: 0 + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..51ae36136b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-initials.md @@ -0,0 +1,10 @@ +query { + avatarsGetInitials( + name: "<NAME>", + width: 0, + height: 0, + background: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a19f218412 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/avatars/get-q-r.md @@ -0,0 +1,10 @@ +query { + avatarsGetQR( + text: "<TEXT>", + size: 1, + margin: 0, + download: false + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..aa0bfa832e --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesCreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md new file mode 100644 index 0000000000..51eb51f410 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md @@ -0,0 +1,30 @@ +mutation { + databasesCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..47601df0d8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-document.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4e2d90660b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-document.md @@ -0,0 +1,17 @@ +mutation { + databasesCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..e5845ccd47 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d13c080e4a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesCreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..2a270c3aff --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md new file mode 100644 index 0000000000..2875a9b4b7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md @@ -0,0 +1,19 @@ +mutation { + databasesCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: "key", + attributes: [], + orders: [] + ) { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..8c79706817 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..0f4ad9e139 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..f66b87d6af --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -0,0 +1,27 @@ +mutation { + databasesCreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..62d97d6962 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-string-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesCreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..89ad873e52 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create.md b/docs/examples/1.7.x/server-graphql/examples/databases/create.md new file mode 100644 index 0000000000..c48e024e7c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create.md @@ -0,0 +1,13 @@ +mutation { + databasesCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..af0f9d6615 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/delete-attribute.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/delete-collection.md new file mode 100644 index 0000000000..8683bd87a4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/delete-collection.md @@ -0,0 +1,8 @@ +mutation { + databasesDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/delete-document.md b/docs/examples/1.7.x/server-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/delete-index.md b/docs/examples/1.7.x/server-graphql/examples/databases/delete-index.md new file mode 100644 index 0000000000..a2389cf9d4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/delete-index.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/delete.md b/docs/examples/1.7.x/server-graphql/examples/databases/delete.md new file mode 100644 index 0000000000..7cd4c92341 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/delete.md @@ -0,0 +1,7 @@ +mutation { + databasesDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/get-attribute.md new file mode 100644 index 0000000000..873d03b708 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/get-attribute.md @@ -0,0 +1,9 @@ +query { + databasesGetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/get-collection.md new file mode 100644 index 0000000000..ed27286b0d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/get-collection.md @@ -0,0 +1,26 @@ +query { + databasesGetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/get-document.md b/docs/examples/1.7.x/server-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..7cff0a18c1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/get-document.md @@ -0,0 +1,16 @@ +query { + databasesGetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.7.x/server-graphql/examples/databases/get-index.md new file mode 100644 index 0000000000..29de7a76f8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/get-index.md @@ -0,0 +1,16 @@ +query { + databasesGetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/get.md b/docs/examples/1.7.x/server-graphql/examples/databases/get.md new file mode 100644 index 0000000000..74c4fe5619 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/get.md @@ -0,0 +1,11 @@ +query { + databasesGet( + databaseId: "<DATABASE_ID>" + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-graphql/examples/databases/list-attributes.md new file mode 100644 index 0000000000..660c0945a7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/list-attributes.md @@ -0,0 +1,10 @@ +query { + databasesListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] + ) { + total + attributes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.7.x/server-graphql/examples/databases/list-collections.md new file mode 100644 index 0000000000..8dafbf7042 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/list-collections.md @@ -0,0 +1,30 @@ +query { + databasesListCollections( + databaseId: "<DATABASE_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/list-documents.md b/docs/examples/1.7.x/server-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..077d7c8f12 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/list-documents.md @@ -0,0 +1,18 @@ +query { + databasesListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] + ) { + total + documents { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-graphql/examples/databases/list-indexes.md new file mode 100644 index 0000000000..3cb67c6451 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/list-indexes.md @@ -0,0 +1,19 @@ +query { + databasesListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] + ) { + total + indexes { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/list.md b/docs/examples/1.7.x/server-graphql/examples/databases/list.md new file mode 100644 index 0000000000..1adf3d3b48 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/list.md @@ -0,0 +1,15 @@ +query { + databasesList( + queries: [], + search: "<SEARCH>" + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..d508e62139 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesUpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md new file mode 100644 index 0000000000..e918c058b8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md @@ -0,0 +1,30 @@ +mutation { + databasesUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..a21b910edc --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-document.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..5e80894620 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-document.md @@ -0,0 +1,17 @@ +mutation { + databasesUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..6c83d80e16 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..378e32f9b8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesUpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..c70232e749 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..b24af5f260 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..7a26224200 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6694540d93 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..afafb307f5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-string-attribute.md @@ -0,0 +1,22 @@ +mutation { + databasesUpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..f9f14a04f6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update.md b/docs/examples/1.7.x/server-graphql/examples/databases/update.md new file mode 100644 index 0000000000..88d286dc8a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update.md @@ -0,0 +1,13 @@ +mutation { + databasesUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0e7cc7d19a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate, entrypoint: $entrypoint, commands: $commands) { id }" }, "variables": { "functionId": "<FUNCTION_ID>", "code": null, "activate": false, "entrypoint": "<ENTRYPOINT>", "commands": "<COMMANDS>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cdd92c2a02 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", + async: false, + path: "<PATH>", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..12c50c32f3 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + functionsCreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-variable.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-variable.md new file mode 100644 index 0000000000..6c64922320 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +mutation { + functionsCreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ebfced2c68 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + functionsCreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/create.md b/docs/examples/1.7.x/server-graphql/examples/functions/create.md new file mode 100644 index 0000000000..2df77be8ec --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/create.md @@ -0,0 +1,60 @@ +mutation { + functionsCreate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8d83f28d4f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-graphql/examples/functions/delete-execution.md new file mode 100644 index 0000000000..c6e950afc9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/delete-execution.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-graphql/examples/functions/delete-variable.md new file mode 100644 index 0000000000..9bc2d9b6e6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/delete.md b/docs/examples/1.7.x/server-graphql/examples/functions/delete.md new file mode 100644 index 0000000000..db019bf376 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/delete.md @@ -0,0 +1,7 @@ +mutation { + functionsDelete( + functionId: "<FUNCTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..2662f1cd05 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment-download.md @@ -0,0 +1,9 @@ +query { + functionsGetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: "source" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment.md new file mode 100644 index 0000000000..ff1b641271 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/get-deployment.md @@ -0,0 +1,34 @@ +query { + functionsGetDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/get-execution.md b/docs/examples/1.7.x/server-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..6ded51a50c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/get-execution.md @@ -0,0 +1,30 @@ +query { + functionsGetExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/get-variable.md b/docs/examples/1.7.x/server-graphql/examples/functions/get-variable.md new file mode 100644 index 0000000000..69694316f1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +query { + functionsGetVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/get.md b/docs/examples/1.7.x/server-graphql/examples/functions/get.md new file mode 100644 index 0000000000..30de838688 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/get.md @@ -0,0 +1,43 @@ +query { + functionsGet( + functionId: "<FUNCTION_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-graphql/examples/functions/list-deployments.md new file mode 100644 index 0000000000..709aef0401 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list-deployments.md @@ -0,0 +1,38 @@ +query { + functionsListDeployments( + functionId: "<FUNCTION_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + deployments { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list-executions.md b/docs/examples/1.7.x/server-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..ba504e31c7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list-executions.md @@ -0,0 +1,33 @@ +query { + functionsListExecutions( + functionId: "<FUNCTION_ID>", + queries: [] + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-graphql/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..445ff9dd08 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list-runtimes.md @@ -0,0 +1,15 @@ +query { + functionsListRuntimes { + total + runtimes { + _id + key + name + version + base + image + logo + supports + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-graphql/examples/functions/list-specifications.md new file mode 100644 index 0000000000..a86b6ea494 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +query { + functionsListSpecifications { + total + specifications { + memory + cpus + enabled + slug + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list-variables.md b/docs/examples/1.7.x/server-graphql/examples/functions/list-variables.md new file mode 100644 index 0000000000..f593ff7067 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list-variables.md @@ -0,0 +1,17 @@ +query { + functionsListVariables( + functionId: "<FUNCTION_ID>" + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/list.md b/docs/examples/1.7.x/server-graphql/examples/functions/list.md new file mode 100644 index 0000000000..4f25a55dcd --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/list.md @@ -0,0 +1,47 @@ +query { + functionsList( + queries: [], + search: "<SEARCH>" + ) { + total + functions { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-graphql/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..50df97fd21 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + functionsUpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-graphql/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..3ff2220fda --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/update-function-deployment.md @@ -0,0 +1,44 @@ +mutation { + functionsUpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/update-variable.md b/docs/examples/1.7.x/server-graphql/examples/functions/update-variable.md new file mode 100644 index 0000000000..15c8e3bdf3 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +mutation { + functionsUpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/functions/update.md b/docs/examples/1.7.x/server-graphql/examples/functions/update.md new file mode 100644 index 0000000000..7510cdc50d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/functions/update.md @@ -0,0 +1,60 @@ +mutation { + functionsUpdate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-graphql/examples/health/get-antivirus.md new file mode 100644 index 0000000000..3634dc11c1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-antivirus.md @@ -0,0 +1,6 @@ +query { + healthGetAntivirus { + version + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-cache.md b/docs/examples/1.7.x/server-graphql/examples/health/get-cache.md new file mode 100644 index 0000000000..3db4076257 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-cache.md @@ -0,0 +1,7 @@ +query { + healthGetCache { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-certificate.md b/docs/examples/1.7.x/server-graphql/examples/health/get-certificate.md new file mode 100644 index 0000000000..91356f8512 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +query { + healthGetCertificate( + domain: "" + ) { + name + subjectSN + issuerOrganisation + validFrom + validTo + signatureTypeSN + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-d-b.md b/docs/examples/1.7.x/server-graphql/examples/health/get-d-b.md new file mode 100644 index 0000000000..16e67c674e --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-d-b.md @@ -0,0 +1,7 @@ +query { + healthGetDB { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-graphql/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..ca17166a89 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-failed-jobs.md @@ -0,0 +1,8 @@ +query { + healthGetFailedJobs( + name: "v1-database", + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-graphql/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..cec6469b31 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-pub-sub.md @@ -0,0 +1,7 @@ +query { + healthGetPubSub { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..26fb7f89fa --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-builds.md @@ -0,0 +1,7 @@ +query { + healthGetQueueBuilds( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..8073528cc6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-certificates.md @@ -0,0 +1,7 @@ +query { + healthGetQueueCertificates( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..3e77623903 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-databases.md @@ -0,0 +1,8 @@ +query { + healthGetQueueDatabases( + name: "<NAME>", + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..8e7dedcf54 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-deletes.md @@ -0,0 +1,7 @@ +query { + healthGetQueueDeletes( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..a827c9a143 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-functions.md @@ -0,0 +1,7 @@ +query { + healthGetQueueFunctions( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..96c93304bd --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-logs.md @@ -0,0 +1,7 @@ +query { + healthGetQueueLogs( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a30747567b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-mails.md @@ -0,0 +1,7 @@ +query { + healthGetQueueMails( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..9209550b11 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-messaging.md @@ -0,0 +1,7 @@ +query { + healthGetQueueMessaging( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..99fd99134d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-migrations.md @@ -0,0 +1,7 @@ +query { + healthGetQueueMigrations( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..ce5cf59eca --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-resources.md @@ -0,0 +1,7 @@ +query { + healthGetQueueStatsResources( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..a2bbd2ac5b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,7 @@ +query { + healthGetQueueStatsUsageDump( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..2d9f7cb14b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-usage.md @@ -0,0 +1,7 @@ +query { + healthGetQueueUsage( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3e95e2fc0d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-queue-webhooks.md @@ -0,0 +1,7 @@ +query { + healthGetQueueWebhooks( + threshold: 0 + ) { + size + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-graphql/examples/health/get-storage-local.md new file mode 100644 index 0000000000..953af346ae --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-storage-local.md @@ -0,0 +1,7 @@ +query { + healthGetStorageLocal { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-storage.md b/docs/examples/1.7.x/server-graphql/examples/health/get-storage.md new file mode 100644 index 0000000000..d7161df205 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-storage.md @@ -0,0 +1,7 @@ +query { + healthGetStorage { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get-time.md b/docs/examples/1.7.x/server-graphql/examples/health/get-time.md new file mode 100644 index 0000000000..0def76b9ad --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get-time.md @@ -0,0 +1,7 @@ +query { + healthGetTime { + remoteTime + localTime + diff + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/health/get.md b/docs/examples/1.7.x/server-graphql/examples/health/get.md new file mode 100644 index 0000000000..8481d3625a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/health/get.md @@ -0,0 +1,7 @@ +query { + healthGet { + name + ping + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/get.md b/docs/examples/1.7.x/server-graphql/examples/locale/get.md new file mode 100644 index 0000000000..2b2bbcc1f1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/get.md @@ -0,0 +1,11 @@ +query { + localeGet { + ip + countryCode + country + continentCode + continent + eu + currency + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-codes.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..0164cc3782 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +query { + localeListCodes { + total + localeCodes { + code + name + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-continents.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..41f672c565 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +query { + localeListContinents { + total + continents { + name + code + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..00cd4652f9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +query { + localeListCountriesEU { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..33d2296850 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +query { + localeListCountriesPhones { + total + phones { + code + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-countries.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..9312bc94b1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +query { + localeListCountries { + total + countries { + name + code + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..cde3ab488a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-currencies.md @@ -0,0 +1,14 @@ +query { + localeListCurrencies { + total + currencies { + symbol + name + symbolNative + decimalDigits + rounding + code + namePlural + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/locale/list-languages.md b/docs/examples/1.7.x/server-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..b0d76c522b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +query { + localeListLanguages { + total + languages { + name + code + nativeName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..425b3bb8dc --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-email.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-email.md new file mode 100644 index 0000000000..a1e35aad19 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +mutation { + messagingCreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..0aa48a9e2f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingCreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: "{}", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..9da1e23847 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingCreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ddaf2d4c2b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-push.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-push.md new file mode 100644 index 0000000000..92264d1b67 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-push.md @@ -0,0 +1,37 @@ +mutation { + messagingCreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", + body: "<BODY>", + topics: [], + users: [], + targets: [], + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..cda0652d67 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-sms.md new file mode 100644 index 0000000000..99af83b154 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingCreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b7b24bc1a5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingCreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..7960a8427f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..e082097b70 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + username: "<USERNAME>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-topic.md new file mode 100644 index 0000000000..6216c4cda5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingCreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..ac14d1d32b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..ca7a710896 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..8d9ac35953 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteProvider( + providerId: "<PROVIDER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..e49cd1ed91 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteTopic( + topicId: "<TOPIC_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/delete.md b/docs/examples/1.7.x/server-graphql/examples/messaging/delete.md new file mode 100644 index 0000000000..495557ef18 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/delete.md @@ -0,0 +1,7 @@ +mutation { + messagingDelete( + messageId: "<MESSAGE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/get-message.md b/docs/examples/1.7.x/server-graphql/examples/messaging/get-message.md new file mode 100644 index 0000000000..a6824cd911 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/get-message.md @@ -0,0 +1,19 @@ +query { + messagingGetMessage( + messageId: "<MESSAGE_ID>" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/get-provider.md new file mode 100644 index 0000000000..03fb039be2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/get-provider.md @@ -0,0 +1,15 @@ +query { + messagingGetProvider( + providerId: "<PROVIDER_ID>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-graphql/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..2e1672d010 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/get-subscriber.md @@ -0,0 +1,26 @@ +query { + messagingGetSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-graphql/examples/messaging/get-topic.md new file mode 100644 index 0000000000..7f0dd01ee6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +query { + messagingGetTopic( + topicId: "<TOPIC_ID>" + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..b1e32d8e99 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-message-logs.md @@ -0,0 +1,31 @@ +query { + messagingListMessageLogs( + messageId: "<MESSAGE_ID>", + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-messages.md new file mode 100644 index 0000000000..7cdf05c7d8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-messages.md @@ -0,0 +1,23 @@ +query { + messagingListMessages( + queries: [], + search: "<SEARCH>" + ) { + total + messages { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..69df6fa06d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-provider-logs.md @@ -0,0 +1,31 @@ +query { + messagingListProviderLogs( + providerId: "<PROVIDER_ID>", + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-providers.md new file mode 100644 index 0000000000..d7ae7b16ba --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-providers.md @@ -0,0 +1,19 @@ +query { + messagingListProviders( + queries: [], + search: "<SEARCH>" + ) { + total + providers { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..23e117a07d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,31 @@ +query { + messagingListSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a5a4f91e56 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-subscribers.md @@ -0,0 +1,30 @@ +query { + messagingListSubscribers( + topicId: "<TOPIC_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + subscribers { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-targets.md new file mode 100644 index 0000000000..aa82276de2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-targets.md @@ -0,0 +1,19 @@ +query { + messagingListTargets( + messageId: "<MESSAGE_ID>", + queries: [] + ) { + total + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..0b0a5f9a4b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-topic-logs.md @@ -0,0 +1,31 @@ +query { + messagingListTopicLogs( + topicId: "<TOPIC_ID>", + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-graphql/examples/messaging/list-topics.md new file mode 100644 index 0000000000..4b36c92511 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/list-topics.md @@ -0,0 +1,18 @@ +query { + messagingListTopics( + queries: [], + search: "<SEARCH>" + ) { + total + topics { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..b3d6e8745e --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-email.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-email.md new file mode 100644 index 0000000000..1d1302efc4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +mutation { + messagingUpdateEmail( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + subject: "<SUBJECT>", + content: "<CONTENT>", + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: "", + attachments: [] + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..a0b3f9e3da --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingUpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + serviceAccountJSON: "{}" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..6c26d52ff2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingUpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + enabled: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..a6552a4734 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-push.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-push.md new file mode 100644 index 0000000000..8ee2f57610 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-push.md @@ -0,0 +1,37 @@ +mutation { + messagingUpdatePush( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + title: "<TITLE>", + body: "<BODY>", + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..319dcea461 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-sms.md new file mode 100644 index 0000000000..7b45f09abc --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingUpdateSms( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + content: "<CONTENT>", + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..a091685655 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingUpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..c9c96c0d5d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..3fd68ed8e9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + username: "<USERNAME>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-topic.md new file mode 100644 index 0000000000..8d3dc84c72 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingUpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..6f10839567 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-graphql/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..f42670a428 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/create-deployment.md new file mode 100644 index 0000000000..8f77dd60eb --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { sitesCreateDeployment(siteId: $siteId, code: $code, activate: $activate, installCommand: $installCommand, buildCommand: $buildCommand, outputDirectory: $outputDirectory) { id }" }, "variables": { "siteId": "<SITE_ID>", "code": null, "activate": false, "installCommand": "<INSTALL_COMMAND>", "buildCommand": "<BUILD_COMMAND>", "outputDirectory": "<OUTPUT_DIRECTORY>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..6226282651 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,34 @@ +mutation { + sitesCreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..72562556e4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + sitesCreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create-variable.md b/docs/examples/1.7.x/server-graphql/examples/sites/create-variable.md new file mode 100644 index 0000000000..6bc92de43a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +mutation { + sitesCreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..ccc18cf2e0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + sitesCreateVcsDeployment( + siteId: "<SITE_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/create.md b/docs/examples/1.7.x/server-graphql/examples/sites/create.md new file mode 100644 index 0000000000..bb89ac9344 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/create.md @@ -0,0 +1,61 @@ +mutation { + sitesCreate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + buildRuntime: "node-14.5", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + adapter: "static", + installationId: "<INSTALLATION_ID>", + fallbackFile: "<FALLBACK_FILE>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..443a951cee --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/delete-log.md b/docs/examples/1.7.x/server-graphql/examples/sites/delete-log.md new file mode 100644 index 0000000000..60f27218c0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/delete-log.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-graphql/examples/sites/delete-variable.md new file mode 100644 index 0000000000..2f86eddff1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/delete.md b/docs/examples/1.7.x/server-graphql/examples/sites/delete.md new file mode 100644 index 0000000000..35138f6d4f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/delete.md @@ -0,0 +1,7 @@ +mutation { + sitesDelete( + siteId: "<SITE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..473f43a4d2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment-download.md @@ -0,0 +1,9 @@ +query { + sitesGetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: "source" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment.md new file mode 100644 index 0000000000..748111d342 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/get-deployment.md @@ -0,0 +1,34 @@ +query { + sitesGetDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/get-log.md b/docs/examples/1.7.x/server-graphql/examples/sites/get-log.md new file mode 100644 index 0000000000..e853fe93a8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/get-log.md @@ -0,0 +1,30 @@ +query { + sitesGetLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/get-variable.md b/docs/examples/1.7.x/server-graphql/examples/sites/get-variable.md new file mode 100644 index 0000000000..dd0204833b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +query { + sitesGetVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/get.md b/docs/examples/1.7.x/server-graphql/examples/sites/get.md new file mode 100644 index 0000000000..a167476c07 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/get.md @@ -0,0 +1,44 @@ +query { + sitesGet( + siteId: "<SITE_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-graphql/examples/sites/list-deployments.md new file mode 100644 index 0000000000..ebc02af94c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list-deployments.md @@ -0,0 +1,38 @@ +query { + sitesListDeployments( + siteId: "<SITE_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + deployments { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-graphql/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..762ef4f8b9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list-frameworks.md @@ -0,0 +1,18 @@ +query { + sitesListFrameworks { + total + frameworks { + key + name + buildRuntime + runtimes + adapters { + key + installCommand + buildCommand + outputDirectory + fallbackFile + } + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list-logs.md b/docs/examples/1.7.x/server-graphql/examples/sites/list-logs.md new file mode 100644 index 0000000000..ad42a157b0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list-logs.md @@ -0,0 +1,33 @@ +query { + sitesListLogs( + siteId: "<SITE_ID>", + queries: [] + ) { + total + executions { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-graphql/examples/sites/list-specifications.md new file mode 100644 index 0000000000..fae4d6f54f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +query { + sitesListSpecifications { + total + specifications { + memory + cpus + enabled + slug + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list-variables.md b/docs/examples/1.7.x/server-graphql/examples/sites/list-variables.md new file mode 100644 index 0000000000..e47673cf5b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list-variables.md @@ -0,0 +1,17 @@ +query { + sitesListVariables( + siteId: "<SITE_ID>" + ) { + total + variables { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/list.md b/docs/examples/1.7.x/server-graphql/examples/sites/list.md new file mode 100644 index 0000000000..ac5b2c69fb --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/list.md @@ -0,0 +1,48 @@ +query { + sitesList( + queries: [], + search: "<SEARCH>" + ) { + total + sites { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-graphql/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..92751c167f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + sitesUpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-graphql/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..6c09c03735 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/update-site-deployment.md @@ -0,0 +1,45 @@ +mutation { + sitesUpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/update-variable.md b/docs/examples/1.7.x/server-graphql/examples/sites/update-variable.md new file mode 100644 index 0000000000..240dca60f3 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +mutation { + sitesUpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/sites/update.md b/docs/examples/1.7.x/server-graphql/examples/sites/update.md new file mode 100644 index 0000000000..801eca3161 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/sites/update.md @@ -0,0 +1,61 @@ +mutation { + sitesUpdate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + buildRuntime: "node-14.5", + adapter: "static", + fallbackFile: "<FALLBACK_FILE>", + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-graphql/examples/storage/create-bucket.md new file mode 100644 index 0000000000..45d03802d2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/create-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageCreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.7.x/server-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..5b4f9a0c22 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "<BUCKET_ID>", "fileId": "<FILE_ID>", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-graphql/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3dadd1f072 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +mutation { + storageDeleteBucket( + bucketId: "<BUCKET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/delete-file.md b/docs/examples/1.7.x/server-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-graphql/examples/storage/get-bucket.md new file mode 100644 index 0000000000..4ce0f626ab --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/get-bucket.md @@ -0,0 +1,18 @@ +query { + storageGetBucket( + bucketId: "<BUCKET_ID>" + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8325e8a230 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-download.md @@ -0,0 +1,8 @@ +query { + storageGetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..df32e88350 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-preview.md @@ -0,0 +1,19 @@ +query { + storageGetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, + height: 0, + gravity: "center", + quality: 0, + borderWidth: 0, + borderColor: "", + borderRadius: 0, + opacity: 0, + rotation: -360, + background: "", + output: "jpg" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..434328a1ec --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/get-file-view.md @@ -0,0 +1,8 @@ +query { + storageGetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/get-file.md b/docs/examples/1.7.x/server-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..60886b0f6f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/get-file.md @@ -0,0 +1,18 @@ +query { + storageGetFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-graphql/examples/storage/list-buckets.md new file mode 100644 index 0000000000..e4d636ccde --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/list-buckets.md @@ -0,0 +1,22 @@ +query { + storageListBuckets( + queries: [], + search: "<SEARCH>" + ) { + total + buckets { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/list-files.md b/docs/examples/1.7.x/server-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..774cc51b97 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/list-files.md @@ -0,0 +1,22 @@ +query { + storageListFiles( + bucketId: "<BUCKET_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + files { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-graphql/examples/storage/update-bucket.md new file mode 100644 index 0000000000..8265a15a58 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/update-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageUpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/storage/update-file.md b/docs/examples/1.7.x/server-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/create-membership.md b/docs/examples/1.7.x/server-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", + userId: "<USER_ID>", + phone: "+12065550100", + url: "https://example.com", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/create.md b/docs/examples/1.7.x/server-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/delete.md b/docs/examples/1.7.x/server-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "<TEAM_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/get-membership.md b/docs/examples/1.7.x/server-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..c33528609e --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/get-membership.md @@ -0,0 +1,20 @@ +query { + teamsGetMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..fe498079cf --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/get-prefs.md @@ -0,0 +1,7 @@ +query { + teamsGetPrefs( + teamId: "<TEAM_ID>" + ) { + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/get.md b/docs/examples/1.7.x/server-graphql/examples/teams/get.md new file mode 100644 index 0000000000..a3fbb491e0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/get.md @@ -0,0 +1,14 @@ +query { + teamsGet( + teamId: "<TEAM_ID>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..bf7f0d1eed --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/list-memberships.md @@ -0,0 +1,24 @@ +query { + teamsListMemberships( + teamId: "<TEAM_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/list.md b/docs/examples/1.7.x/server-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e7005b5326 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/list.md @@ -0,0 +1,18 @@ +query { + teamsList( + queries: [], + search: "<SEARCH>" + ) { + total + teams { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/update-membership.md b/docs/examples/1.7.x/server-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/update-name.md b/docs/examples/1.7.x/server-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "<TEAM_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c8cc96baf8 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +mutation { + tokensCreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "", + permissions: ["read("any")"] + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/delete.md b/docs/examples/1.7.x/server-graphql/examples/tokens/delete.md new file mode 100644 index 0000000000..b13ad72f6b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/delete.md @@ -0,0 +1,7 @@ +mutation { + tokensDelete( + tokenId: "<TOKEN_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-graphql/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..ab1d3982ca --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/get-j-w-t.md @@ -0,0 +1,7 @@ +query { + tokensGetJWT( + tokenId: "<TOKEN_ID>" + ) { + jwt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/get.md b/docs/examples/1.7.x/server-graphql/examples/tokens/get.md new file mode 100644 index 0000000000..00cae5459c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/get.md @@ -0,0 +1,12 @@ +query { + tokensGet( + tokenId: "<TOKEN_ID>" + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/list.md b/docs/examples/1.7.x/server-graphql/examples/tokens/list.md new file mode 100644 index 0000000000..0d68b014e6 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/list.md @@ -0,0 +1,17 @@ +query { + tokensList( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [] + ) { + total + tokens { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/update.md b/docs/examples/1.7.x/server-graphql/examples/tokens/update.md new file mode 100644 index 0000000000..61d75a27d5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/update.md @@ -0,0 +1,14 @@ +mutation { + tokensUpdate( + tokenId: "<TOKEN_ID>", + expire: "", + permissions: ["read("any")"] + ) { + _id + _createdAt + resourceId + resourceInternalId + resourceType + expire + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-argon2user.md new file mode 100644 index 0000000000..7f99622e52 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-argon2user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..26659176eb --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-bcrypt-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-graphql/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..bf0b1bd638 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-j-w-t.md @@ -0,0 +1,9 @@ +mutation { + usersCreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", + duration: 0 + ) { + jwt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..7e642b8233 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-m-d5user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..7c4f1c5575 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersCreateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c06b007a2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f99da2752d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-s-h-a-user.md @@ -0,0 +1,41 @@ +mutation { + usersCreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: "sha1", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..624ffcdd38 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,43 @@ +mutation { + usersCreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..68a5f4c75f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-scrypt-user.md @@ -0,0 +1,45 @@ +mutation { + usersCreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-session.md b/docs/examples/1.7.x/server-graphql/examples/users/create-session.md new file mode 100644 index 0000000000..701ddf501f --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-session.md @@ -0,0 +1,35 @@ +mutation { + usersCreateSession( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-target.md b/docs/examples/1.7.x/server-graphql/examples/users/create-target.md new file mode 100644 index 0000000000..7068c21aba --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-target.md @@ -0,0 +1,20 @@ +mutation { + usersCreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: "email", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create-token.md b/docs/examples/1.7.x/server-graphql/examples/users/create-token.md new file mode 100644 index 0000000000..78255f7676 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create-token.md @@ -0,0 +1,14 @@ +mutation { + usersCreateToken( + userId: "<USER_ID>", + length: 4, + expire: 60 + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/create.md b/docs/examples/1.7.x/server-graphql/examples/users/create.md new file mode 100644 index 0000000000..465da80432 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/create.md @@ -0,0 +1,41 @@ +mutation { + usersCreate( + userId: "<USER_ID>", + email: "email@example.com", + phone: "+12065550100", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete-identity.md b/docs/examples/1.7.x/server-graphql/examples/users/delete-identity.md new file mode 100644 index 0000000000..1ea0d990b1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-graphql/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..43f73404f0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteMfaAuthenticator( + userId: "<USER_ID>", + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete-session.md b/docs/examples/1.7.x/server-graphql/examples/users/delete-session.md new file mode 100644 index 0000000000..7e6538b34a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete-session.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-graphql/examples/users/delete-sessions.md new file mode 100644 index 0000000000..d1ccaa26f4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteSessions( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete-target.md b/docs/examples/1.7.x/server-graphql/examples/users/delete-target.md new file mode 100644 index 0000000000..92d0a16ac5 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete-target.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/delete.md b/docs/examples/1.7.x/server-graphql/examples/users/delete.md new file mode 100644 index 0000000000..2cf392b7f1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/delete.md @@ -0,0 +1,7 @@ +mutation { + usersDelete( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c4ca9f79b4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +query { + usersGetMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/get-prefs.md b/docs/examples/1.7.x/server-graphql/examples/users/get-prefs.md new file mode 100644 index 0000000000..fe08758d99 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/get-prefs.md @@ -0,0 +1,7 @@ +query { + usersGetPrefs( + userId: "<USER_ID>" + ) { + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/get-target.md b/docs/examples/1.7.x/server-graphql/examples/users/get-target.md new file mode 100644 index 0000000000..c84f947898 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/get-target.md @@ -0,0 +1,16 @@ +query { + usersGetTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/get.md b/docs/examples/1.7.x/server-graphql/examples/users/get.md new file mode 100644 index 0000000000..9d0be685d9 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/get.md @@ -0,0 +1,37 @@ +query { + usersGet( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-identities.md b/docs/examples/1.7.x/server-graphql/examples/users/list-identities.md new file mode 100644 index 0000000000..38ab302f38 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-identities.md @@ -0,0 +1,20 @@ +query { + usersListIdentities( + queries: [], + search: "<SEARCH>" + ) { + total + identities { + _id + _createdAt + _updatedAt + userId + provider + providerUid + providerEmail + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-logs.md b/docs/examples/1.7.x/server-graphql/examples/users/list-logs.md new file mode 100644 index 0000000000..8594e87b22 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-logs.md @@ -0,0 +1,31 @@ +query { + usersListLogs( + userId: "<USER_ID>", + queries: [] + ) { + total + logs { + event + userId + userEmail + userName + mode + ip + time + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-memberships.md b/docs/examples/1.7.x/server-graphql/examples/users/list-memberships.md new file mode 100644 index 0000000000..4e087257fa --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-memberships.md @@ -0,0 +1,24 @@ +query { + usersListMemberships( + userId: "<USER_ID>", + queries: [], + search: "<SEARCH>" + ) { + total + memberships { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-graphql/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..12c910835a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-mfa-factors.md @@ -0,0 +1,10 @@ +query { + usersListMfaFactors( + userId: "<USER_ID>" + ) { + totp + phone + email + recoveryCode + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-sessions.md b/docs/examples/1.7.x/server-graphql/examples/users/list-sessions.md new file mode 100644 index 0000000000..1a09c9ffe0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-sessions.md @@ -0,0 +1,38 @@ +query { + usersListSessions( + userId: "<USER_ID>" + ) { + total + sessions { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list-targets.md b/docs/examples/1.7.x/server-graphql/examples/users/list-targets.md new file mode 100644 index 0000000000..408fd96f80 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list-targets.md @@ -0,0 +1,19 @@ +query { + usersListTargets( + userId: "<USER_ID>", + queries: [] + ) { + total + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/list.md b/docs/examples/1.7.x/server-graphql/examples/users/list.md new file mode 100644 index 0000000000..a90121adf2 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/list.md @@ -0,0 +1,41 @@ +query { + usersList( + queries: [], + search: "<SEARCH>" + ) { + total + users { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-graphql/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cda7278ac0 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-email-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-email.md b/docs/examples/1.7.x/server-graphql/examples/users/update-email.md new file mode 100644 index 0000000000..408a74972b --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-email.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.7.x/server-graphql/examples/users/update-labels.md new file mode 100644 index 0000000000..cb3c5b6483 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-labels.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateLabels( + userId: "<USER_ID>", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-graphql/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..dbef2bd345 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersUpdateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-mfa.md b/docs/examples/1.7.x/server-graphql/examples/users/update-mfa.md new file mode 100644 index 0000000000..ac09ea19a4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-mfa.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateMfa( + userId: "<USER_ID>", + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-name.md b/docs/examples/1.7.x/server-graphql/examples/users/update-name.md new file mode 100644 index 0000000000..ec7e3dc27c --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-name.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateName( + userId: "<USER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-password.md b/docs/examples/1.7.x/server-graphql/examples/users/update-password.md new file mode 100644 index 0000000000..95ef74c83d --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-password.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePassword( + userId: "<USER_ID>", + password: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-graphql/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..c6afa54ba4 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-phone-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.7.x/server-graphql/examples/users/update-phone.md new file mode 100644 index 0000000000..d3fc7d5f37 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-phone.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-prefs.md b/docs/examples/1.7.x/server-graphql/examples/users/update-prefs.md new file mode 100644 index 0000000000..431664c2a1 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + usersUpdatePrefs( + userId: "<USER_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-status.md b/docs/examples/1.7.x/server-graphql/examples/users/update-status.md new file mode 100644 index 0000000000..2499c1c258 --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-status.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateStatus( + userId: "<USER_ID>", + status: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.7.x/server-graphql/examples/users/update-target.md b/docs/examples/1.7.x/server-graphql/examples/users/update-target.md new file mode 100644 index 0000000000..1f7cc1147a --- /dev/null +++ b/docs/examples/1.7.x/server-graphql/examples/users/update-target.md @@ -0,0 +1,19 @@ +mutation { + usersUpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-anonymous-session.md b/docs/examples/1.7.x/server-kotlin/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..3982219727 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-email-password-session.md b/docs/examples/1.7.x/server-kotlin/java/account/create-email-password-session.md new file mode 100644 index 0000000000..56e2487cb7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-email-token.md b/docs/examples/1.7.x/server-kotlin/java/account/create-email-token.md new file mode 100644 index 0000000000..a9c9127180 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "<USER_ID>", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-j-w-t.md b/docs/examples/1.7.x/server-kotlin/java/account/create-j-w-t.md new file mode 100644 index 0000000000..aa4eda7cb7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-kotlin/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..e5486b351c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "<USER_ID>", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..13f3ba7e35 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..d5f7909b14 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f27f22aeb8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-o-auth2token.md b/docs/examples/1.7.x/server-kotlin/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..d8fb5ab9b9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-phone-token.md b/docs/examples/1.7.x/server-kotlin/java/account/create-phone-token.md new file mode 100644 index 0000000000..ebea1402d1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "<USER_ID>", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-phone-verification.md b/docs/examples/1.7.x/server-kotlin/java/account/create-phone-verification.md new file mode 100644 index 0000000000..b1e91c4dfd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-phone-verification.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-recovery.md b/docs/examples/1.7.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..23762d945c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-session.md b/docs/examples/1.7.x/server-kotlin/java/account/create-session.md new file mode 100644 index 0000000000..34ed542a3a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create-verification.md b/docs/examples/1.7.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..aecaf44ee7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/create.md b/docs/examples/1.7.x/server-kotlin/java/account/create.md new file mode 100644 index 0000000000..07c917032f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.create( + "<USER_ID>", // userId + "email@example.com", // email + "", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/delete-identity.md b/docs/examples/1.7.x/server-kotlin/java/account/delete-identity.md new file mode 100644 index 0000000000..c797f50459 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..f78c69dd42 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/delete-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/delete-session.md b/docs/examples/1.7.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..2c69082b10 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/1.7.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..229898f149 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..15b00fb510 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/get-prefs.md b/docs/examples/1.7.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..5e06c2b003 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/get-session.md b/docs/examples/1.7.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..945d00c65b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/get.md b/docs/examples/1.7.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..5467a104da --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/list-identities.md b/docs/examples/1.7.x/server-kotlin/java/account/list-identities.md new file mode 100644 index 0000000000..2da0b8ecfb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/list-identities.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/list-logs.md b/docs/examples/1.7.x/server-kotlin/java/account/list-logs.md new file mode 100644 index 0000000000..aee538daa5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/list-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/list-mfa-factors.md b/docs/examples/1.7.x/server-kotlin/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..acfab44450 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/list-mfa-factors.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/list-sessions.md b/docs/examples/1.7.x/server-kotlin/java/account/list-sessions.md new file mode 100644 index 0000000000..7e2cb1c3f5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/list-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-email.md b/docs/examples/1.7.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..79db50dcec --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-m-f-a.md b/docs/examples/1.7.x/server-kotlin/java/account/update-m-f-a.md new file mode 100644 index 0000000000..cb34d8f16a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-m-f-a.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-kotlin/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..5814a1ea58 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..2462efa289 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..480b101513 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-challenge.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaChallenge( + "<CHALLENGE_ID>", // challengeId + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..1dccc75cbb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-name.md b/docs/examples/1.7.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..07f70afdc4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateName( + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-password.md b/docs/examples/1.7.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..a82a825df7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-phone-session.md b/docs/examples/1.7.x/server-kotlin/java/account/update-phone-session.md new file mode 100644 index 0000000000..a45c0000eb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-phone-verification.md b/docs/examples/1.7.x/server-kotlin/java/account/update-phone-verification.md new file mode 100644 index 0000000000..03c60cd635 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhoneVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-phone.md b/docs/examples/1.7.x/server-kotlin/java/account/update-phone.md new file mode 100644 index 0000000000..bfd0e55aea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-prefs.md b/docs/examples/1.7.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..944810cf7a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-recovery.md b/docs/examples/1.7.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..713695713e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateRecovery( + "<USER_ID>", // userId + "<SECRET>", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-session.md b/docs/examples/1.7.x/server-kotlin/java/account/update-session.md new file mode 100644 index 0000000000..6387258cfb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-status.md b/docs/examples/1.7.x/server-kotlin/java/account/update-status.md new file mode 100644 index 0000000000..111bf1cf2b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/account/update-verification.md b/docs/examples/1.7.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..afa44ef882 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..dc8db2d9ae --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..3983fe12a6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..840899b8c5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..f49a8f3760 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + 0, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-image.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..4af3c68946 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..e0505ed1cd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "<NAME>", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..5c3de47900 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "<TEXT>", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..987467d698 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-collection.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-collection.md new file mode 100644 index 0000000000..b82984419b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..01ed794d2d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-document.md new file mode 100644 index 0000000000..829a714869 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-document.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-email-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-email-attribute.md new file mode 100644 index 0000000000..3837f8d6d9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-enum-attribute.md new file mode 100644 index 0000000000..c93be65397 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-float-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-float-attribute.md new file mode 100644 index 0000000000..edbab6a808 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md new file mode 100644 index 0000000000..eb91a3243b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + IndexType.KEY, // type + listOf(), // attributes + listOf(), // orders (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-integer-attribute.md new file mode 100644 index 0000000000..b8a3cea004 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-ip-attribute.md new file mode 100644 index 0000000000..05dced3f4b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b7e1051923 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-relationship-attribute.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<RELATED_COLLECTION_ID>", // relatedCollectionId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-string-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-string-attribute.md new file mode 100644 index 0000000000..898b5f3ff7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-string-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-url-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-url-attribute.md new file mode 100644 index 0000000000..db7aad4041 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create.md b/docs/examples/1.7.x/server-kotlin/java/databases/create.md new file mode 100644 index 0000000000..def73f2563 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/delete-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/delete-attribute.md new file mode 100644 index 0000000000..5933c85073 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/delete-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/delete-collection.md b/docs/examples/1.7.x/server-kotlin/java/databases/delete-collection.md new file mode 100644 index 0000000000..7133d77c1b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/delete-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/delete-document.md b/docs/examples/1.7.x/server-kotlin/java/databases/delete-document.md new file mode 100644 index 0000000000..0e66daf079 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/delete-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/delete-index.md b/docs/examples/1.7.x/server-kotlin/java/databases/delete-index.md new file mode 100644 index 0000000000..6b1cc14851 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/delete.md b/docs/examples/1.7.x/server-kotlin/java/databases/delete.md new file mode 100644 index 0000000000..cf9da0d1d2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/get-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/get-attribute.md new file mode 100644 index 0000000000..81e63ac442 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/get-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/get-collection.md b/docs/examples/1.7.x/server-kotlin/java/databases/get-collection.md new file mode 100644 index 0000000000..f68d3a7114 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/get-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/get-document.md b/docs/examples/1.7.x/server-kotlin/java/databases/get-document.md new file mode 100644 index 0000000000..39dc4cb846 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/get-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/get-index.md b/docs/examples/1.7.x/server-kotlin/java/databases/get-index.md new file mode 100644 index 0000000000..0524917b55 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/get.md b/docs/examples/1.7.x/server-kotlin/java/databases/get.md new file mode 100644 index 0000000000..335d553bf5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/list-attributes.md b/docs/examples/1.7.x/server-kotlin/java/databases/list-attributes.md new file mode 100644 index 0000000000..c44b05a838 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/list-attributes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listAttributes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/list-collections.md b/docs/examples/1.7.x/server-kotlin/java/databases/list-collections.md new file mode 100644 index 0000000000..40027fb138 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/list-collections.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listCollections( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/list-documents.md b/docs/examples/1.7.x/server-kotlin/java/databases/list-documents.md new file mode 100644 index 0000000000..7a33b10c44 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/list-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/list-indexes.md b/docs/examples/1.7.x/server-kotlin/java/databases/list-indexes.md new file mode 100644 index 0000000000..0fd5930eb8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/list.md b/docs/examples/1.7.x/server-kotlin/java/databases/list.md new file mode 100644 index 0000000000..ea57668462 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..b46a46ce47 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-collection.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-collection.md new file mode 100644 index 0000000000..a4c366ef38 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..aafc149bcf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-document.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-document.md new file mode 100644 index 0000000000..be8b057a24 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-document.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-email-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-email-attribute.md new file mode 100644 index 0000000000..c68d3ec115 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-enum-attribute.md new file mode 100644 index 0000000000..35eefda126 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-float-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-float-attribute.md new file mode 100644 index 0000000000..156d44672e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-integer-attribute.md new file mode 100644 index 0000000000..a0fb7d72aa --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-ip-attribute.md new file mode 100644 index 0000000000..10fd6ffa7f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..033f775600 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-relationship-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-string-attribute.md new file mode 100644 index 0000000000..ad17e109cf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-string-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update-url-attribute.md b/docs/examples/1.7.x/server-kotlin/java/databases/update-url-attribute.md new file mode 100644 index 0000000000..62ef267eb0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/update.md b/docs/examples/1.7.x/server-kotlin/java/databases/update.md new file mode 100644 index 0000000000..27631caf12 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/databases/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 0000000000..589831f0e1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDeployment( + "<FUNCTION_ID>", // functionId + InputFile.fromPath("file.png"), // code + false, // activate + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..2e31c80c5f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-duplicate-deployment.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDuplicateDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + "<BUILD_ID>", // buildId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..559cd259d3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.createExecution( + "<FUNCTION_ID>", // functionId + "<BODY>", // body (optional) + false, // async (optional) + "<PATH>", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-template-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-template-deployment.md new file mode 100644 index 0000000000..fa44c8848c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createTemplateDeployment( + "<FUNCTION_ID>", // functionId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-variable.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-variable.md new file mode 100644 index 0000000000..d788e52c34 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVariable( + "<FUNCTION_ID>", // functionId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..2310395ea6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVcsDeployment( + "<FUNCTION_ID>", // functionId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/create.md b/docs/examples/1.7.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..f7b44fd2fb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/create.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.create( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/delete-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 0000000000..001c4dff24 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/delete-execution.md b/docs/examples/1.7.x/server-kotlin/java/functions/delete-execution.md new file mode 100644 index 0000000000..0400425d0b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/delete-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/delete-variable.md b/docs/examples/1.7.x/server-kotlin/java/functions/delete-variable.md new file mode 100644 index 0000000000..fe3b8fb209 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/delete.md b/docs/examples/1.7.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..c21079e483 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.delete( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment-download.md b/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment-download.md new file mode 100644 index 0000000000..03b0e12ed2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeploymentDownload( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 0000000000..8c0e42415e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/get-execution.md b/docs/examples/1.7.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..8eeefbf66f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.getExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/get-variable.md b/docs/examples/1.7.x/server-kotlin/java/functions/get-variable.md new file mode 100644 index 0000000000..ed486884cd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/get.md b/docs/examples/1.7.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..38f97b1a79 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.get( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list-deployments.md b/docs/examples/1.7.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 0000000000..dd70105e11 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listDeployments( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list-executions.md b/docs/examples/1.7.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..205e3f8ece --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.listExecutions( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list-runtimes.md b/docs/examples/1.7.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 0000000000..054d3599eb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listRuntimes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list-specifications.md b/docs/examples/1.7.x/server-kotlin/java/functions/list-specifications.md new file mode 100644 index 0000000000..9c20ad6b58 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list-variables.md b/docs/examples/1.7.x/server-kotlin/java/functions/list-variables.md new file mode 100644 index 0000000000..857fd96e16 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listVariables( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/list.md b/docs/examples/1.7.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..71b10acea9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/update-deployment-status.md b/docs/examples/1.7.x/server-kotlin/java/functions/update-deployment-status.md new file mode 100644 index 0000000000..9a0cb76020 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateDeploymentStatus( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/update-function-deployment.md b/docs/examples/1.7.x/server-kotlin/java/functions/update-function-deployment.md new file mode 100644 index 0000000000..b2c491ffe6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/update-function-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateFunctionDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/update-variable.md b/docs/examples/1.7.x/server-kotlin/java/functions/update-variable.md new file mode 100644 index 0000000000..6dcb71ba69 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/functions/update.md b/docs/examples/1.7.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..c6cb6d83c0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/functions/update.md @@ -0,0 +1,40 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.update( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime (optional) + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/graphql/mutation.md b/docs/examples/1.7.x/server-kotlin/java/graphql/mutation.md new file mode 100644 index 0000000000..75f6f8fcc6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/graphql/mutation.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/graphql/query.md b/docs/examples/1.7.x/server-kotlin/java/graphql/query.md new file mode 100644 index 0000000000..09de62f942 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/graphql/query.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-antivirus.md b/docs/examples/1.7.x/server-kotlin/java/health/get-antivirus.md new file mode 100644 index 0000000000..f03db98724 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-antivirus.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getAntivirus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-cache.md b/docs/examples/1.7.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..a16c84fed4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCache(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-certificate.md b/docs/examples/1.7.x/server-kotlin/java/health/get-certificate.md new file mode 100644 index 0000000000..cc98a71d3a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-certificate.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCertificate( + "", // domain (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-d-b.md b/docs/examples/1.7.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..1aa8004491 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getDB(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-failed-jobs.md b/docs/examples/1.7.x/server-kotlin/java/health/get-failed-jobs.md new file mode 100644 index 0000000000..bc1c75224f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-failed-jobs.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; +import io.appwrite.enums.Name; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getFailedJobs( + .V1_DATABASE, // name + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-pub-sub.md b/docs/examples/1.7.x/server-kotlin/java/health/get-pub-sub.md new file mode 100644 index 0000000000..4916635233 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-pub-sub.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getPubSub(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-builds.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-builds.md new file mode 100644 index 0000000000..903ecbe274 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-builds.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueBuilds( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..b0b8f6af64 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueCertificates( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-databases.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-databases.md new file mode 100644 index 0000000000..362f8a72f4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-databases.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDatabases( + "<NAME>", // name (optional) + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-deletes.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-deletes.md new file mode 100644 index 0000000000..3442b9ae50 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-deletes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDeletes( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..4b4e750bbb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueFunctions( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..fc78008546 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueLogs( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-mails.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-mails.md new file mode 100644 index 0000000000..57431c048b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-mails.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMails( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-messaging.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-messaging.md new file mode 100644 index 0000000000..f92a40ac02 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-messaging.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMessaging( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-migrations.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-migrations.md new file mode 100644 index 0000000000..29f9ef8b8b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-migrations.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMigrations( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..3c7c033813 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-resources.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueStatsResources( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..69fbe04300 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-stats-usage-dump.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueStatsUsageDump( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-usage.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-usage.md new file mode 100644 index 0000000000..5433fbaccd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-usage.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueUsage( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..9ca5ca76c1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueWebhooks( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/1.7.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..aa65c35a0d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorageLocal(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-storage.md b/docs/examples/1.7.x/server-kotlin/java/health/get-storage.md new file mode 100644 index 0000000000..a7b736fb52 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-storage.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorage(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get-time.md b/docs/examples/1.7.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..fb76bdc254 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getTime(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/health/get.md b/docs/examples/1.7.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..69cbad7f9c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/health/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/get.md b/docs/examples/1.7.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..927d2d8eee --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-codes.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-codes.md new file mode 100644 index 0000000000..1af6ef5cbd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-continents.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-continents.md new file mode 100644 index 0000000000..3efd5c419b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-continents.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..aa8f94376d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-e-u.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-phones.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..a4db701578 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries-phones.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-countries.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries.md new file mode 100644 index 0000000000..87c9533875 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-countries.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-currencies.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-currencies.md new file mode 100644 index 0000000000..7626191cc6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-currencies.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/locale/list-languages.md b/docs/examples/1.7.x/server-kotlin/java/locale/list-languages.md new file mode 100644 index 0000000000..abcef4c6bf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/locale/list-languages.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b76d01371f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-email.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-email.md new file mode 100644 index 0000000000..3d86c76a8f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + listOf(), // attachments (optional) + false, // draft (optional) + false, // html (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..78aeb526f4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..c0a59b9736 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-msg91provider.md new file mode 100644 index 0000000000..8ee95d61bb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-push.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-push.md new file mode 100644 index 0000000000..c4cdd0965a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createPush( + "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..c12e04c004 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-sms.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-sms.md new file mode 100644 index 0000000000..58cc002832 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSms( + "<MESSAGE_ID>", // messageId + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..f50f3d9a01 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<HOST>", // host + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-subscriber.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..dd3289c946 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-subscriber.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..56590aecc0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..c8b379fabf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-topic.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-topic.md new file mode 100644 index 0000000000..3b99ac5578 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..c2f017b19b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..05eef77a79 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/create-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/delete-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-provider.md new file mode 100644 index 0000000000..efa3a21dab --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c586eee35e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/delete-topic.md b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-topic.md new file mode 100644 index 0000000000..a8c79907c3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/delete-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/delete.md b/docs/examples/1.7.x/server-kotlin/java/messaging/delete.md new file mode 100644 index 0000000000..f66b3cf050 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.delete( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/get-message.md b/docs/examples/1.7.x/server-kotlin/java/messaging/get-message.md new file mode 100644 index 0000000000..9d85a59cf1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/get-message.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getMessage( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/get-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/get-provider.md new file mode 100644 index 0000000000..ab93ee2c20 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/get-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/get-subscriber.md b/docs/examples/1.7.x/server-kotlin/java/messaging/get-subscriber.md new file mode 100644 index 0000000000..1f5862fb4e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/get-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/get-topic.md b/docs/examples/1.7.x/server-kotlin/java/messaging/get-topic.md new file mode 100644 index 0000000000..65624ecc18 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/get-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-message-logs.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-message-logs.md new file mode 100644 index 0000000000..bb37cc8ecf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-message-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessageLogs( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-messages.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-messages.md new file mode 100644 index 0000000000..713d1ba0f4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-messages.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessages( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-provider-logs.md new file mode 100644 index 0000000000..d9bbb94221 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-provider-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviderLogs( + "<PROVIDER_ID>", // providerId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-providers.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-providers.md new file mode 100644 index 0000000000..b0ce74b81f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-providers.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviders( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..fc1692ff8f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscriber-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscriberLogs( + "<SUBSCRIBER_ID>", // subscriberId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscribers.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscribers.md new file mode 100644 index 0000000000..82feb427c6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-subscribers.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscribers( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-targets.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-targets.md new file mode 100644 index 0000000000..d8623c767e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTargets( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-topic-logs.md new file mode 100644 index 0000000000..0f066c194e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-topic-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopicLogs( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/list-topics.md b/docs/examples/1.7.x/server-kotlin/java/messaging/list-topics.md new file mode 100644 index 0000000000..6934789ca4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/list-topics.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopics( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-apns-provider.md new file mode 100644 index 0000000000..8e9b283c1a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-email.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-email.md new file mode 100644 index 0000000000..156d16994d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateEmail( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<SUBJECT>", // subject (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + false, // html (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + "", // scheduledAt (optional) + listOf(), // attachments (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..577c19ec5f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..33e54ab806 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-msg91provider.md new file mode 100644 index 0000000000..96038141a3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-push.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-push.md new file mode 100644 index 0000000000..51905ceb31 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updatePush( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..f0776fddf6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-sms.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-sms.md new file mode 100644 index 0000000000..a621e824be --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSms( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..7c5a92343b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<HOST>", // host (optional) + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..3fe72340d8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..a2c20c0647 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-topic.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-topic.md new file mode 100644 index 0000000000..dcb62e20ba --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name (optional) + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..a14344c876 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-kotlin/java/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..f0790f408a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/messaging/update-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/create-deployment.md new file mode 100644 index 0000000000..15f0f87229 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create-deployment.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDeployment( + "<SITE_ID>", // siteId + InputFile.fromPath("file.png"), // code + false, // activate + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..98350d7ea9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create-duplicate-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDuplicateDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create-template-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/create-template-deployment.md new file mode 100644 index 0000000000..17c957edcf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createTemplateDeployment( + "<SITE_ID>", // siteId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create-variable.md b/docs/examples/1.7.x/server-kotlin/java/sites/create-variable.md new file mode 100644 index 0000000000..c64a220905 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVariable( + "<SITE_ID>", // siteId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..e919fd16a4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVcsDeployment( + "<SITE_ID>", // siteId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/create.md b/docs/examples/1.7.x/server-kotlin/java/sites/create.md new file mode 100644 index 0000000000..bceda5d6db --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/create.md @@ -0,0 +1,42 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.create( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + .NODE_14_5, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .STATIC, // adapter (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/delete-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/delete-deployment.md new file mode 100644 index 0000000000..59cd5dc84f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/delete-log.md b/docs/examples/1.7.x/server-kotlin/java/sites/delete-log.md new file mode 100644 index 0000000000..4429e3e101 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/delete-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/delete-variable.md b/docs/examples/1.7.x/server-kotlin/java/sites/delete-variable.md new file mode 100644 index 0000000000..f619bef13b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/delete.md b/docs/examples/1.7.x/server-kotlin/java/sites/delete.md new file mode 100644 index 0000000000..c542ff0ee6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.delete( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment-download.md b/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment-download.md new file mode 100644 index 0000000000..9c848d1367 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeploymentDownload( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment.md new file mode 100644 index 0000000000..ecc705d800 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/get-log.md b/docs/examples/1.7.x/server-kotlin/java/sites/get-log.md new file mode 100644 index 0000000000..d3bad8524b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/get-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/get-variable.md b/docs/examples/1.7.x/server-kotlin/java/sites/get-variable.md new file mode 100644 index 0000000000..32d10aad90 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/get.md b/docs/examples/1.7.x/server-kotlin/java/sites/get.md new file mode 100644 index 0000000000..ba4c2b8cb9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.get( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list-deployments.md b/docs/examples/1.7.x/server-kotlin/java/sites/list-deployments.md new file mode 100644 index 0000000000..d1ceb8e49b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listDeployments( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list-frameworks.md b/docs/examples/1.7.x/server-kotlin/java/sites/list-frameworks.md new file mode 100644 index 0000000000..29412abdaf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list-frameworks.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listFrameworks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list-logs.md b/docs/examples/1.7.x/server-kotlin/java/sites/list-logs.md new file mode 100644 index 0000000000..2d6e884aec --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listLogs( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list-specifications.md b/docs/examples/1.7.x/server-kotlin/java/sites/list-specifications.md new file mode 100644 index 0000000000..78e6f1be0b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list-variables.md b/docs/examples/1.7.x/server-kotlin/java/sites/list-variables.md new file mode 100644 index 0000000000..9f0e72e320 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listVariables( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/list.md b/docs/examples/1.7.x/server-kotlin/java/sites/list.md new file mode 100644 index 0000000000..b0be4fadb9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/update-deployment-status.md b/docs/examples/1.7.x/server-kotlin/java/sites/update-deployment-status.md new file mode 100644 index 0000000000..e38fc54cb1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateDeploymentStatus( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/update-site-deployment.md b/docs/examples/1.7.x/server-kotlin/java/sites/update-site-deployment.md new file mode 100644 index 0000000000..6a7a59a210 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/update-site-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateSiteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/update-variable.md b/docs/examples/1.7.x/server-kotlin/java/sites/update-variable.md new file mode 100644 index 0000000000..c572998ae4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/sites/update.md b/docs/examples/1.7.x/server-kotlin/java/sites/update.md new file mode 100644 index 0000000000..695dd5c88c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/sites/update.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.update( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .NODE_14_5, // buildRuntime (optional) + .STATIC, // adapter (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/1.7.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 0000000000..571002797d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/create-file.md b/docs/examples/1.7.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..04b8028051 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.createFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/delete-bucket.md b/docs/examples/1.7.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 0000000000..2b7c97e1fe --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.deleteBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/delete-file.md b/docs/examples/1.7.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..c32e4ede7c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.deleteFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-bucket.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 0000000000..78ab295cd0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..1a775f160f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileDownload( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..788a3cfdd5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,35 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFilePreview( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..2f9379b3cb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileView( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..eb0f90639b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/list-buckets.md b/docs/examples/1.7.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 0000000000..4aa2837f6c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.listBuckets( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/list-files.md b/docs/examples/1.7.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..da7bcf8c8f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.listFiles( + "<BUCKET_ID>", // bucketId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/1.7.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 0000000000..ff831df975 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/update-file.md b/docs/examples/1.7.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..a14bee8f30 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.updateFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<NAME>", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/create-membership.md b/docs/examples/1.7.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..48927dbb90 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.createMembership( + "<TEAM_ID>", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/create.md b/docs/examples/1.7.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..f743beefe2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.create( + "<TEAM_ID>", // teamId + "<NAME>", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/1.7.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..96e282ca38 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/delete.md b/docs/examples/1.7.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..092f018395 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.delete( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/get-membership.md b/docs/examples/1.7.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 0000000000..3a268f63cb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/get-prefs.md b/docs/examples/1.7.x/server-kotlin/java/teams/get-prefs.md new file mode 100644 index 0000000000..e053e51a4c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getPrefs( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/get.md b/docs/examples/1.7.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..6ae6f2ff01 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.get( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/list-memberships.md b/docs/examples/1.7.x/server-kotlin/java/teams/list-memberships.md new file mode 100644 index 0000000000..04c6177a16 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.listMemberships( + "<TEAM_ID>", // teamId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/list.md b/docs/examples/1.7.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..490d2713db --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/1.7.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..bc13448b62 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/update-membership.md b/docs/examples/1.7.x/server-kotlin/java/teams/update-membership.md new file mode 100644 index 0000000000..3749e0c334 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/update-membership.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/update-name.md b/docs/examples/1.7.x/server-kotlin/java/teams/update-name.md new file mode 100644 index 0000000000..e7b974e9b0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateName( + "<TEAM_ID>", // teamId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/teams/update-prefs.md b/docs/examples/1.7.x/server-kotlin/java/teams/update-prefs.md new file mode 100644 index 0000000000..ddf3b39ad5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/teams/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updatePrefs( + "<TEAM_ID>", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md b/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md new file mode 100644 index 0000000000..c01392e0e2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "", // expire (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md b/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md new file mode 100644 index 0000000000..85ac005670 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.delete( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-kotlin/java/tokens/get-j-w-t.md new file mode 100644 index 0000000000..f59e3794c8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/get-j-w-t.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.getJWT( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/get.md b/docs/examples/1.7.x/server-kotlin/java/tokens/get.md new file mode 100644 index 0000000000..214ff5ba1b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.get( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/list.md b/docs/examples/1.7.x/server-kotlin/java/tokens/list.md new file mode 100644 index 0000000000..52b9cb41c7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.list( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/update.md b/docs/examples/1.7.x/server-kotlin/java/tokens/update.md new file mode 100644 index 0000000000..2024b283b8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tokens tokens = new Tokens(client); + +tokens.update( + "<TOKEN_ID>", // tokenId + "", // expire (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-argon2user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-argon2user.md new file mode 100644 index 0000000000..53a7874b5e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-argon2user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createArgon2User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-bcrypt-user.md new file mode 100644 index 0000000000..70562cced4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-bcrypt-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createBcryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-j-w-t.md b/docs/examples/1.7.x/server-kotlin/java/users/create-j-w-t.md new file mode 100644 index 0000000000..4330244cad --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-j-w-t.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createJWT( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId (optional) + 0, // duration (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-m-d5user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-m-d5user.md new file mode 100644 index 0000000000..be059b87d6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-m-d5user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMD5User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39910e3f6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..1551559cea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-p-h-pass-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createPHPassUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-s-h-a-user.md new file mode 100644 index 0000000000..9566c9fc92 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-s-h-a-user.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSHAUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + PasswordHash.SHA1, // passwordVersion (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..714e34f728 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-modified-user.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptModifiedUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator + "<PASSWORD_SIGNER_KEY>", // passwordSignerKey + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-user.md b/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-user.md new file mode 100644 index 0000000000..6adc563e01 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-scrypt-user.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + 0, // passwordCpu + 0, // passwordMemory + 0, // passwordParallel + 0, // passwordLength + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-session.md b/docs/examples/1.7.x/server-kotlin/java/users/create-session.md new file mode 100644 index 0000000000..7650d5b290 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSession( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-target.md b/docs/examples/1.7.x/server-kotlin/java/users/create-target.md new file mode 100644 index 0000000000..5c1d4c3051 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-target.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.MessagingProviderType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + MessagingProviderType.EMAIL, // providerType + "<IDENTIFIER>", // identifier + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create-token.md b/docs/examples/1.7.x/server-kotlin/java/users/create-token.md new file mode 100644 index 0000000000..56bfed1210 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createToken( + "<USER_ID>", // userId + 4, // length (optional) + 60, // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/create.md b/docs/examples/1.7.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..28f00f8c30 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/create.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.create( + "<USER_ID>", // userId + "email@example.com", // email (optional) + "+12065550100", // phone (optional) + "", // password (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete-identity.md b/docs/examples/1.7.x/server-kotlin/java/users/delete-identity.md new file mode 100644 index 0000000000..f37abbf0de --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/java/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..53547088bc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteMfaAuthenticator( + "<USER_ID>", // userId + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete-session.md b/docs/examples/1.7.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..2445c813c7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSession( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/1.7.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..a13d15be6e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete-target.md b/docs/examples/1.7.x/server-kotlin/java/users/delete-target.md new file mode 100644 index 0000000000..2fcf4f7f02 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/delete.md b/docs/examples/1.7.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..2ab277f3df --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.delete( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..1dfe9dafd9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/get-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/get-prefs.md b/docs/examples/1.7.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..9eee532c0b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getPrefs( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/get-target.md b/docs/examples/1.7.x/server-kotlin/java/users/get-target.md new file mode 100644 index 0000000000..3896b4a10a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/get-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/get.md b/docs/examples/1.7.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..036b7f635a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.get( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-identities.md b/docs/examples/1.7.x/server-kotlin/java/users/list-identities.md new file mode 100644 index 0000000000..29cf871d26 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-identities.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listIdentities( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-logs.md b/docs/examples/1.7.x/server-kotlin/java/users/list-logs.md new file mode 100644 index 0000000000..842aa9dec1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listLogs( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-memberships.md b/docs/examples/1.7.x/server-kotlin/java/users/list-memberships.md new file mode 100644 index 0000000000..313ae495a5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMemberships( + "<USER_ID>", // userId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-mfa-factors.md b/docs/examples/1.7.x/server-kotlin/java/users/list-mfa-factors.md new file mode 100644 index 0000000000..0cbf1cbe8d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-mfa-factors.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMfaFactors( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-sessions.md b/docs/examples/1.7.x/server-kotlin/java/users/list-sessions.md new file mode 100644 index 0000000000..88affa1cd4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list-targets.md b/docs/examples/1.7.x/server-kotlin/java/users/list-targets.md new file mode 100644 index 0000000000..68fa945709 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listTargets( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/list.md b/docs/examples/1.7.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..1d4aafa800 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-email-verification.md b/docs/examples/1.7.x/server-kotlin/java/users/update-email-verification.md new file mode 100644 index 0000000000..df214cab43 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-email-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmailVerification( + "<USER_ID>", // userId + false, // emailVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-email.md b/docs/examples/1.7.x/server-kotlin/java/users/update-email.md new file mode 100644 index 0000000000..3859ed12ab --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmail( + "<USER_ID>", // userId + "email@example.com", // email + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-labels.md b/docs/examples/1.7.x/server-kotlin/java/users/update-labels.md new file mode 100644 index 0000000000..829eeb8ab7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-labels.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateLabels( + "<USER_ID>", // userId + listOf(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/java/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..f57a09470e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-mfa.md b/docs/examples/1.7.x/server-kotlin/java/users/update-mfa.md new file mode 100644 index 0000000000..5ebec1f74d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-mfa.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfa( + "<USER_ID>", // userId + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-name.md b/docs/examples/1.7.x/server-kotlin/java/users/update-name.md new file mode 100644 index 0000000000..115b8c5b30 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateName( + "<USER_ID>", // userId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-password.md b/docs/examples/1.7.x/server-kotlin/java/users/update-password.md new file mode 100644 index 0000000000..29aec7564c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePassword( + "<USER_ID>", // userId + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-phone-verification.md b/docs/examples/1.7.x/server-kotlin/java/users/update-phone-verification.md new file mode 100644 index 0000000000..4a02fcfda6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhoneVerification( + "<USER_ID>", // userId + false, // phoneVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-phone.md b/docs/examples/1.7.x/server-kotlin/java/users/update-phone.md new file mode 100644 index 0000000000..8c2b250e3d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhone( + "<USER_ID>", // userId + "+12065550100", // number + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-prefs.md b/docs/examples/1.7.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..b591c1a07f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePrefs( + "<USER_ID>", // userId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-status.md b/docs/examples/1.7.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..7e3fe00ec6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateStatus( + "<USER_ID>", // userId + false, // status + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/java/users/update-target.md b/docs/examples/1.7.x/server-kotlin/java/users/update-target.md new file mode 100644 index 0000000000..e0e8cf1d07 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/java/users/update-target.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + "<IDENTIFIER>", // identifier (optional) + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-anonymous-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..32b8242385 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createAnonymousSession() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-password-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..d6de2aef34 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailPasswordSession( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..e4689ff7d5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailToken( + userId = "<USER_ID>", + email = "email@example.com", + phrase = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-j-w-t.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..bbe42df94f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createJWT() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..499d041857 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMagicURLToken( + userId = "<USER_ID>", + email = "email@example.com", + url = "https://example.com", // optional + phrase = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..c43b3df9c4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..36f7bf09fe --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..5805bffd96 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-o-auth2token.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..abf77f22c5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // optional + failure = "https://example.com", // optional + scopes = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..27f0eda9c4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createPhoneToken( + userId = "<USER_ID>", + phone = "+12065550100" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..5c7c74f451 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-phone-verification.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createPhoneVerification() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-recovery.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..192345d6c6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-session.md new file mode 100644 index 0000000000..36de6e948a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 0000000000..22ffb240fa --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/create.md new file mode 100644 index 0000000000..0bb0c42795 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.create( + userId = "<USER_ID>", + email = "email@example.com", + password = "", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-identity.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..30341e8514 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..ecdd37e1ce --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 0000000000..d0738de334 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-sessions.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..8661bad010 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSessions() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..7b264c6a25 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/get-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..b0e372a707 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getPrefs() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/get-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 0000000000..d5e721b16f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 0000000000..e9b08f6730 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.get() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/list-identities.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-identities.md new file mode 100644 index 0000000000..5626f4b4c9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-identities.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listIdentities( + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/list-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-logs.md new file mode 100644 index 0000000000..9bdf0db467 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listLogs( + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/list-mfa-factors.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..a0781e5d69 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listMfaFactors() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/list-sessions.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..fb37c6bbcf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/list-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listSessions() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-email.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 0000000000..04c323acaf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-m-f-a.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..e10dd0d2c9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-m-f-a.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFA( + mfa = false +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..6125052382 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updateMagicURLSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..022b327700 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "<OTP>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..c7d4c64fb4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaChallenge( + challengeId = "<CHALLENGE_ID>", + otp = "<OTP>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..8261a049fa --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-name.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 0000000000..8520631107 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateName( + name = "<NAME>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-password.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 0000000000..70625fc7b8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePassword( + password = "", + oldPassword = "password" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..9508332c50 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updatePhoneSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..291a40e56c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhoneVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone.md new file mode 100644 index 0000000000..ff84b5ce3f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..99ac98a8e1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-recovery.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..87df01a239 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateRecovery( + userId = "<USER_ID>", + secret = "<SECRET>", + password = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 0000000000..370e39ac89 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-status.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 0000000000..870ebdbe7c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateStatus() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/account/update-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 0000000000..3285c19b2e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..f5e7284132 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // optional + height = 0, // optional + quality = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..d5ec2a2e43 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // optional + height = 0, // optional + quality = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-favicon.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..c70f3d4857 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..6a09bed412 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // optional + height = 0, // optional + quality = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-image.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..4637fc9815 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // optional + height = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-initials.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..8c1195e9de --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "<NAME>", // optional + width = 0, // optional + height = 0, // optional + background = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-q-r.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..ee98b432e5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "<TEXT>", + size = 1, // optional + margin = 0, // optional + download = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..83bd3b1fc0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-collection.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-collection.md new file mode 100644 index 0000000000..064876dc99 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..989c9d326f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-document.md new file mode 100644 index 0000000000..7589cbdcfb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-document.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-email-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-email-attribute.md new file mode 100644 index 0000000000..e801351b06 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-enum-attribute.md new file mode 100644 index 0000000000..dbee47d51e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-float-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-float-attribute.md new file mode 100644 index 0000000000..cf4cf53372 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md new file mode 100644 index 0000000000..a1d4eeb234 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + type = IndexType.KEY, + attributes = listOf(), + orders = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-integer-attribute.md new file mode 100644 index 0000000000..27c7427764 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-ip-attribute.md new file mode 100644 index 0000000000..6db3063ee2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..aa10bca15c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + relatedCollectionId = "<RELATED_COLLECTION_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-string-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-string-attribute.md new file mode 100644 index 0000000000..047ea6c7f8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-url-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-url-attribute.md new file mode 100644 index 0000000000..9b8ff20f90 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create.md new file mode 100644 index 0000000000..f78274f74a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-attribute.md new file mode 100644 index 0000000000..40fbd25937 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-collection.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-collection.md new file mode 100644 index 0000000000..699932f556 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-document.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..4c72caccb4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-index.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-index.md new file mode 100644 index 0000000000..8a45a88015 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete.md new file mode 100644 index 0000000000..c34ad28f59 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.delete( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-attribute.md new file mode 100644 index 0000000000..32978985c8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-collection.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-collection.md new file mode 100644 index 0000000000..a148f9003d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-document.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-document.md new file mode 100644 index 0000000000..c3f0704ee7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-index.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-index.md new file mode 100644 index 0000000000..012006d4d6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get.md new file mode 100644 index 0000000000..991b3b0b61 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.get( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-attributes.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-attributes.md new file mode 100644 index 0000000000..5acc3444d5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-attributes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listAttributes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-collections.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-collections.md new file mode 100644 index 0000000000..1428e0b573 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-collections.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-documents.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..e6c173c10c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-indexes.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-indexes.md new file mode 100644 index 0000000000..42fc5d6053 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list.md new file mode 100644 index 0000000000..6c5a07dd3c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..b1cd81277e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-collection.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-collection.md new file mode 100644 index 0000000000..3e18709e7b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..d734dc95e8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-document.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-document.md new file mode 100644 index 0000000000..cbcc50db43 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-document.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-email-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-email-attribute.md new file mode 100644 index 0000000000..23cc4bdf5a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-enum-attribute.md new file mode 100644 index 0000000000..fb1eab881e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-float-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-float-attribute.md new file mode 100644 index 0000000000..d801da07fe --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-integer-attribute.md new file mode 100644 index 0000000000..ec9bf898a5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-ip-attribute.md new file mode 100644 index 0000000000..f46ad14800 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..f1aa357bc1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-string-attribute.md new file mode 100644 index 0000000000..c8c7772624 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-url-attribute.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-url-attribute.md new file mode 100644 index 0000000000..ef21ac765a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/update.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update.md new file mode 100644 index 0000000000..4dafae8d2f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 0000000000..dd4be7cb3e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDeployment( + functionId = "<FUNCTION_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..4c36febfc1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDuplicateDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + buildId = "<BUILD_ID>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..26149ffabc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "<FUNCTION_ID>", + body = "<BODY>", // optional + async = false, // optional + path = "<PATH>", // optional + method = "GET", // optional + headers = mapOf( "a" to "b" ), // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-template-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-template-deployment.md new file mode 100644 index 0000000000..94f55bed3f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createTemplateDeployment( + functionId = "<FUNCTION_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-variable.md new file mode 100644 index 0000000000..323a477607 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVariable( + functionId = "<FUNCTION_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..33d4464bcf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVcsDeployment( + functionId = "<FUNCTION_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 0000000000..3b4a44db61 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.Runtime + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.create( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = .NODE_14_5, + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 0000000000..0e3202146c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-execution.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-execution.md new file mode 100644 index 0000000000..0236cf86b1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-variable.md new file mode 100644 index 0000000000..c511e6df14 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 0000000000..de3bfe3a3b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.delete( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment-download.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment-download.md new file mode 100644 index 0000000000..edde826024 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val result = functions.getDeploymentDownload( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 0000000000..390192a6cc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-execution.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..c6c672d96f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.getExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-variable.md new file mode 100644 index 0000000000..e2f1ebccb0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 0000000000..635584500d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.get( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-deployments.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 0000000000..6129738148 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listDeployments( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-executions.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..df7e971534 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.listExecutions( + functionId = "<FUNCTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-runtimes.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-runtimes.md new file mode 100644 index 0000000000..915a7299fb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listRuntimes() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-specifications.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-specifications.md new file mode 100644 index 0000000000..fd5ce780ce --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listSpecifications() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-variables.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-variables.md new file mode 100644 index 0000000000..b049a8a729 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listVariables( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 0000000000..921512c98b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-deployment-status.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-deployment-status.md new file mode 100644 index 0000000000..4d731ecf2b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateDeploymentStatus( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-function-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-function-deployment.md new file mode 100644 index 0000000000..6063e9a63e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateFunctionDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-variable.md new file mode 100644 index 0000000000..45de95b877 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/functions/update.md b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 0000000000..9c41f0a79e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,31 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.update( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = "node-14.5", // optional + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/graphql/mutation.md b/docs/examples/1.7.x/server-kotlin/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..82d20c71bb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/graphql/mutation.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/graphql/query.md b/docs/examples/1.7.x/server-kotlin/kotlin/graphql/query.md new file mode 100644 index 0000000000..fe94240c5a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/graphql/query.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-antivirus.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-antivirus.md new file mode 100644 index 0000000000..221beb09d1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-antivirus.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getAntivirus() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-cache.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-cache.md new file mode 100644 index 0000000000..9859895d87 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-cache.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCache() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-certificate.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-certificate.md new file mode 100644 index 0000000000..63bf77a4c2 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-certificate.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCertificate( + domain = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-d-b.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-d-b.md new file mode 100644 index 0000000000..13e25427c0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-d-b.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getDB() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-failed-jobs.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-failed-jobs.md new file mode 100644 index 0000000000..0d691808e8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health +import io.appwrite.enums.Name + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getFailedJobs( + name = .V1_DATABASE, + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-pub-sub.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-pub-sub.md new file mode 100644 index 0000000000..f2814adc82 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-pub-sub.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getPubSub() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-builds.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-builds.md new file mode 100644 index 0000000000..4b440202c6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-builds.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueBuilds( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-certificates.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-certificates.md new file mode 100644 index 0000000000..60d198b44c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueCertificates( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-databases.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-databases.md new file mode 100644 index 0000000000..21a60972df --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-databases.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDatabases( + name = "<NAME>", // optional + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-deletes.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-deletes.md new file mode 100644 index 0000000000..39fe26a48a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDeletes( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-functions.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-functions.md new file mode 100644 index 0000000000..c589e506af --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-functions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueFunctions( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-logs.md new file mode 100644 index 0000000000..d61b21cfef --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueLogs( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-mails.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-mails.md new file mode 100644 index 0000000000..1b1f0a7ad1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-mails.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMails( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-messaging.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-messaging.md new file mode 100644 index 0000000000..28e56660c3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMessaging( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-migrations.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-migrations.md new file mode 100644 index 0000000000..8bc3548da3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMigrations( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..77bfdc7743 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueStatsResources( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..d0d015150c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-stats-usage-dump.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueStatsUsageDump( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-usage.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-usage.md new file mode 100644 index 0000000000..83d78b6bf7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-usage.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueUsage( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-webhooks.md new file mode 100644 index 0000000000..a401ad248d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueWebhooks( + threshold = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage-local.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage-local.md new file mode 100644 index 0000000000..2307ff23ea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage-local.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorageLocal() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage.md new file mode 100644 index 0000000000..d6a9554c52 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-storage.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorage() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get-time.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-time.md new file mode 100644 index 0000000000..867b9c6113 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get-time.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getTime() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/health/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/health/get.md new file mode 100644 index 0000000000..bee33e9b02 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/health/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.get() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 0000000000..902c83b18d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.get() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..9d70af92b4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCodes() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-continents.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..a3e34a182b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-continents.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listContinents() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..cba0f7b329 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesEU() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-phones.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..f69a40297a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesPhones() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..58e6e4c7a1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-countries.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountries() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-currencies.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..dce7a3b57f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-currencies.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCurrencies() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-languages.md b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..4f7225afc3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/locale/list-languages.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listLanguages() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b45396abe9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-email.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-email.md new file mode 100644 index 0000000000..43e80cbea7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + cc = listOf(), // optional + bcc = listOf(), // optional + attachments = listOf(), // optional + draft = false, // optional + html = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..04837b813a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + serviceAccountJSON = mapOf( "a" to "b" ), // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..4a23c11327 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-msg91provider.md new file mode 100644 index 0000000000..adaff787cf --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-push.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-push.md new file mode 100644 index 0000000000..98925c5f4b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createPush( + messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..a5b0ddf323 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sms.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sms.md new file mode 100644 index 0000000000..50335f10fb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSms( + messageId = "<MESSAGE_ID>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..f57d50503f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + host = "<HOST>", + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-subscriber.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..8e52e50084 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.createSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..f283bbb5f0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..48c459b0cd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-topic.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-topic.md new file mode 100644 index 0000000000..5d9c1d9510 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..e572c3225f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..82abd6e198 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-provider.md new file mode 100644 index 0000000000..965a9879ca --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..7d296735af --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.deleteSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-topic.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-topic.md new file mode 100644 index 0000000000..c16acac946 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete.md new file mode 100644 index 0000000000..0823f46935 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.delete( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-message.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-message.md new file mode 100644 index 0000000000..51988b4aed --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-message.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getMessage( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-provider.md new file mode 100644 index 0000000000..9f744a4d4d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-subscriber.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-subscriber.md new file mode 100644 index 0000000000..6415161f96 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-topic.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-topic.md new file mode 100644 index 0000000000..d1c79f1acc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/get-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-message-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-message-logs.md new file mode 100644 index 0000000000..c14c75b89c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessageLogs( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-messages.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-messages.md new file mode 100644 index 0000000000..20092c9420 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-messages.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessages( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-provider-logs.md new file mode 100644 index 0000000000..965c9565b3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviderLogs( + providerId = "<PROVIDER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-providers.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-providers.md new file mode 100644 index 0000000000..233f286dc3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-providers.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviders( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..e111d41e46 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscriberLogs( + subscriberId = "<SUBSCRIBER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscribers.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscribers.md new file mode 100644 index 0000000000..3653b0d791 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscribers( + topicId = "<TOPIC_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-targets.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-targets.md new file mode 100644 index 0000000000..477a4c404e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTargets( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topic-logs.md new file mode 100644 index 0000000000..577e270911 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopicLogs( + topicId = "<TOPIC_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topics.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topics.md new file mode 100644 index 0000000000..d908ed287a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/list-topics.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopics( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-apns-provider.md new file mode 100644 index 0000000000..efeb29dcbd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-email.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-email.md new file mode 100644 index 0000000000..1cbbfe91f4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateEmail( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + subject = "<SUBJECT>", // optional + content = "<CONTENT>", // optional + draft = false, // optional + html = false, // optional + cc = listOf(), // optional + bcc = listOf(), // optional + scheduledAt = "", // optional + attachments = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..1b4bc11919 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + serviceAccountJSON = mapOf( "a" to "b" ) // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c9ccbe08c9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + enabled = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-msg91provider.md new file mode 100644 index 0000000000..aa083af413 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-push.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-push.md new file mode 100644 index 0000000000..b667d7b7ea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updatePush( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + title = "<TITLE>", // optional + body = "<BODY>", // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..be90aebfd3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sms.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sms.md new file mode 100644 index 0000000000..48d34f3910 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSms( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + content = "<CONTENT>", // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..49888620c9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + host = "<HOST>", // optional + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..6b8b4aa82e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..341dec1a99 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-topic.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-topic.md new file mode 100644 index 0000000000..5b21be3c25 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", // optional + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..6dcab5a6e8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..1850dca4da --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-deployment.md new file mode 100644 index 0000000000..484cdba95c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-deployment.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDeployment( + siteId = "<SITE_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..1a435fa5d4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDuplicateDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-template-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-template-deployment.md new file mode 100644 index 0000000000..16fd001633 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createTemplateDeployment( + siteId = "<SITE_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-variable.md new file mode 100644 index 0000000000..19b69f875e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVariable( + siteId = "<SITE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..ef022b11d4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVcsDeployment( + siteId = "<SITE_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create.md new file mode 100644 index 0000000000..be490015ea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/create.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.create( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + buildRuntime = .NODE_14_5, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + adapter = "static", // optional + installationId = "<INSTALLATION_ID>", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-deployment.md new file mode 100644 index 0000000000..a4b45747bb --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-log.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-log.md new file mode 100644 index 0000000000..02e729d67f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-variable.md new file mode 100644 index 0000000000..0b95f27bd4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete.md new file mode 100644 index 0000000000..f563023d51 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.delete( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment-download.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment-download.md new file mode 100644 index 0000000000..234aaa5b48 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val result = sites.getDeploymentDownload( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment.md new file mode 100644 index 0000000000..01520fa522 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-log.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-log.md new file mode 100644 index 0000000000..4bc2f09680 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-variable.md new file mode 100644 index 0000000000..895e4a312e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get.md new file mode 100644 index 0000000000..cf90b8d72c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.get( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-deployments.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-deployments.md new file mode 100644 index 0000000000..682a350c82 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listDeployments( + siteId = "<SITE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-frameworks.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-frameworks.md new file mode 100644 index 0000000000..bf3652ecc5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-frameworks.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listFrameworks() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-logs.md new file mode 100644 index 0000000000..840ab050ea --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listLogs( + siteId = "<SITE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-specifications.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-specifications.md new file mode 100644 index 0000000000..e65218f61c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listSpecifications() diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-variables.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-variables.md new file mode 100644 index 0000000000..9446f3cc83 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listVariables( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list.md new file mode 100644 index 0000000000..bd18db2bcc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-deployment-status.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-deployment-status.md new file mode 100644 index 0000000000..4ed22d8340 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateDeploymentStatus( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-site-deployment.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-site-deployment.md new file mode 100644 index 0000000000..ba44a1ccef --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateSiteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-variable.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-variable.md new file mode 100644 index 0000000000..b32df4da2e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/sites/update.md b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update.md new file mode 100644 index 0000000000..3820b29b19 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/sites/update.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.update( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + buildRuntime = "node-14.5", // optional + adapter = "static", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 0000000000..89e1c51581 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.createBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 0000000000..6ef78df4a5 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.createFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-bucket.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 0000000000..2f8f0b10e0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.deleteBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-file.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..4b8f43cdcc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-bucket.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 0000000000..70ae34047f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.getBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..3b5d77e1ec --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..7ff391dbf8 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + width = 0, // optional + height = 0, // optional + gravity = "center", // optional + quality = 0, // optional + borderWidth = 0, // optional + borderColor = "", // optional + borderRadius = 0, // optional + opacity = 0, // optional + rotation = -360, // optional + background = "", // optional + output = "jpg" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..5bc323fbaa --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 0000000000..8240dbd53e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.getFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-buckets.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 0000000000..8f8a3d320e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.listBuckets( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-files.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 0000000000..7add22973b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.listFiles( + bucketId = "<BUCKET_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 0000000000..689c40295a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.updateBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 0000000000..732245bbf7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.updateFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + name = "<NAME>", // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/create-membership.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..d5ee81552e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.createMembership( + teamId = "<TEAM_ID>", + roles = listOf(), + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 0000000000..57ea84c821 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.create( + teamId = "<TEAM_ID>", + name = "<NAME>", + roles = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete-membership.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..2df00705cd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 0000000000..fbbd125017 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.delete( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-membership.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..9553aeb312 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..15defb0087 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getPrefs( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 0000000000..5846cba88d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.get( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/list-memberships.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..f05d5955b1 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.listMemberships( + teamId = "<TEAM_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 0000000000..9726e6566e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership-status.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..d2b9c07ecc --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..e3270c2cd7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-membership.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + roles = listOf() +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-name.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-name.md new file mode 100644 index 0000000000..0af63b23b0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "<TEAM_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..c47d253c16 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/teams/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "<TEAM_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md new file mode 100644 index 0000000000..99d782294c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.createFileToken( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + expire = "", // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md new file mode 100644 index 0000000000..df66f03c65 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.delete( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get-j-w-t.md new file mode 100644 index 0000000000..3f80f219f6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get-j-w-t.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.getJWT( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md new file mode 100644 index 0000000000..51c8928d2a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.get( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md new file mode 100644 index 0000000000..8ed44ad199 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.list( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md new file mode 100644 index 0000000000..aa398b2242 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tokens = Tokens(client) + +val response = tokens.update( + tokenId = "<TOKEN_ID>", + expire = "", // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-argon2user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-argon2user.md new file mode 100644 index 0000000000..254b1e21b6 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-argon2user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createArgon2User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-bcrypt-user.md new file mode 100644 index 0000000000..cc1e7691f0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createBcryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-j-w-t.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-j-w-t.md new file mode 100644 index 0000000000..cadcc7e9a7 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-j-w-t.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createJWT( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>", // optional + duration = 0 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-m-d5user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-m-d5user.md new file mode 100644 index 0000000000..48377a4023 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-m-d5user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMD5User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..15be5d9552 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..b2a069fa8b --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createPHPassUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5e8d286076 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSHAUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordVersion = "sha1", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..3cadcb5066 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptModifiedUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey = "<PASSWORD_SIGNER_KEY>", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-user.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-user.md new file mode 100644 index 0000000000..5fdb44f076 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordCpu = 0, + passwordMemory = 0, + passwordParallel = 0, + passwordLength = 0, + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-session.md new file mode 100644 index 0000000000..6ac9d92d37 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSession( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-target.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-target.md new file mode 100644 index 0000000000..d4ac68498c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-target.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.MessagingProviderType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + providerType = MessagingProviderType.EMAIL, + identifier = "<IDENTIFIER>", + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-token.md new file mode 100644 index 0000000000..32c1a5930e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createToken( + userId = "<USER_ID>", + length = 4, // optional + expire = 60 // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/create.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 0000000000..f45d0d861c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.create( + userId = "<USER_ID>", + email = "email@example.com", // optional + phone = "+12065550100", // optional + password = "", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-identity.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-identity.md new file mode 100644 index 0000000000..3a2ea96ef3 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..ba45670b6c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteMfaAuthenticator( + userId = "<USER_ID>", + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-session.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 0000000000..ed4a46f8e9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSession( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-sessions.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 0000000000..014e715a2f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-target.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-target.md new file mode 100644 index 0000000000..93f0bb8f3f --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 0000000000..3e16b7ec9d --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.delete( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..3442be6bee --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/get-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 0000000000..4c16e9e64a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getPrefs( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/get-target.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-target.md new file mode 100644 index 0000000000..96f6e1bcf9 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/get-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 0000000000..de5b7f9341 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.get( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-identities.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-identities.md new file mode 100644 index 0000000000..effa4c52dd --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-identities.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listIdentities( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-logs.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-logs.md new file mode 100644 index 0000000000..9b8f24ea9e --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listLogs( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-memberships.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-memberships.md new file mode 100644 index 0000000000..ebec81c18a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMemberships( + userId = "<USER_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-mfa-factors.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-mfa-factors.md new file mode 100644 index 0000000000..7b3dfa9df0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMfaFactors( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-sessions.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-sessions.md new file mode 100644 index 0000000000..57c528d152 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list-targets.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-targets.md new file mode 100644 index 0000000000..79785ad5da --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listTargets( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 0000000000..8134680d60 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email-verification.md new file mode 100644 index 0000000000..07c44eaab4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmailVerification( + userId = "<USER_ID>", + emailVerification = false +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 0000000000..bbcc236a33 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmail( + userId = "<USER_ID>", + email = "email@example.com" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-labels.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-labels.md new file mode 100644 index 0000000000..e623295996 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-labels.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateLabels( + userId = "<USER_ID>", + labels = listOf() +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..b96ce2bc67 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa.md new file mode 100644 index 0000000000..bf236b0e56 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-mfa.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfa( + userId = "<USER_ID>", + mfa = false +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-name.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 0000000000..3eefe52037 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateName( + userId = "<USER_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-password.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 0000000000..4d85de2c9a --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePassword( + userId = "<USER_ID>", + password = "" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone-verification.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone-verification.md new file mode 100644 index 0000000000..986a9c2824 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhoneVerification( + userId = "<USER_ID>", + phoneVerification = false +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone.md new file mode 100644 index 0000000000..251c967a85 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhone( + userId = "<USER_ID>", + number = "+12065550100" +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-prefs.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 0000000000..8bc6bcbb9c --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePrefs( + userId = "<USER_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-status.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 0000000000..483a31f6e0 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateStatus( + userId = "<USER_ID>", + status = false +) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/users/update-target.md b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-target.md new file mode 100644 index 0000000000..5bbe6f3cb4 --- /dev/null +++ b/docs/examples/1.7.x/server-kotlin/kotlin/users/update-target.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + identifier = "<IDENTIFIER>", // optional + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..79b5a15b42 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createAnonymousSession(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..b66498f795 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-email-token.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-email-token.md new file mode 100644 index 0000000000..8fcb087c36 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..6b4e5ddd7b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createJWT(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..36e13fcacf --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..821b6e8aa2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..2af8c74915 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMfaChallenge( + sdk.AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..fbfbe267b1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..0fe13f7283 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createOAuth2Token( + sdk.OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-token.md new file mode 100644 index 0000000000..8ae99aee2e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..fb1c2ec307 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createPhoneVerification(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 0000000000..4dd75e0868 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-session.md new file mode 100644 index 0000000000..8adb915df0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create-verification.md b/docs/examples/1.7.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 0000000000..c46b6f0f6a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create-verification.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/create.md b/docs/examples/1.7.x/server-nodejs/examples/account/create.md new file mode 100644 index 0000000000..d0a2b79033 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/delete-identity.md b/docs/examples/1.7.x/server-nodejs/examples/account/delete-identity.md new file mode 100644 index 0000000000..7ce1c7a6f1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-nodejs/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..ae7d1648c6 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/delete-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 0000000000..19c39bb269 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/delete-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-nodejs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..f1a8352e47 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSessions(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..b2b8a76e8b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 0000000000..e0f918f90e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getPrefs(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/get-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 0000000000..1e16aa9e35 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/get-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/get.md b/docs/examples/1.7.x/server-nodejs/examples/account/get.md new file mode 100644 index 0000000000..7c1218f553 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.get(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/list-identities.md b/docs/examples/1.7.x/server-nodejs/examples/account/list-identities.md new file mode 100644 index 0000000000..bcf69eaecd --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/list-identities.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/list-logs.md b/docs/examples/1.7.x/server-nodejs/examples/account/list-logs.md new file mode 100644 index 0000000000..3eb65581b5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/list-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-nodejs/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e0ab8a56d8 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listMfaFactors(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/list-sessions.md b/docs/examples/1.7.x/server-nodejs/examples/account/list-sessions.md new file mode 100644 index 0000000000..764d7aa73c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listSessions(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-email.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 0000000000..86d510162d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..dce6b5460b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..b14367324d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..91b438e6c2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaAuthenticator( + sdk.AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..852154901b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..72989873d3 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-name.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 0000000000..abde635b20 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-name.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-password.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 0000000000..bb3b4fb2a5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-session.md new file mode 100644 index 0000000000..36733bc9a7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..59fbbf2dd2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-phone.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone.md new file mode 100644 index 0000000000..c27b67969e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 0000000000..77283eabc3 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 0000000000..21664c72a7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-session.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 0000000000..387ad57e44 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-status.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 0000000000..b921b00ca1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-status.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateStatus(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/account/update-verification.md b/docs/examples/1.7.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 0000000000..b1f875c98d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1ffe3efde9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getBrowser( + sdk.Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..98532c5bfc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getCreditCard( + sdk.CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..3f7e6eeea4 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..dee1938842 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFlag( + sdk.Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + 0 // quality (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 0000000000..801a6756cd --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..0b5e24ac09 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..2c6df85db2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..bb7a59099f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-collection.md new file mode 100644 index 0000000000..c6a14583f0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..8f70af0802 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-document.md new file mode 100644 index 0000000000..36467e817b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-document.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..67e68307ee --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..6d1ceabea1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..bcf56118c8 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md new file mode 100644 index 0000000000..33f9261d80 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.IndexType.Key, // type + [], // attributes + [] // orders (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..61ab0ac693 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..a0705c6567 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..954cef5c1e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..921a97cced --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..61cf71b90a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create.md new file mode 100644 index 0000000000..f55ec9f5ab --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..1fae93ecc1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-collection.md new file mode 100644 index 0000000000..22beca0243 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/delete-document.md b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-document.md new file mode 100644 index 0000000000..004b6f0760 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/delete-index.md b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-index.md new file mode 100644 index 0000000000..051715774b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/delete.md b/docs/examples/1.7.x/server-nodejs/examples/databases/delete.md new file mode 100644 index 0000000000..b3f30bb3bc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/get-attribute.md new file mode 100644 index 0000000000..d87c3c458e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/get-collection.md b/docs/examples/1.7.x/server-nodejs/examples/databases/get-collection.md new file mode 100644 index 0000000000..8df0223c29 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/get-document.md b/docs/examples/1.7.x/server-nodejs/examples/databases/get-document.md new file mode 100644 index 0000000000..f827128191 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/get-document.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/get-index.md b/docs/examples/1.7.x/server-nodejs/examples/databases/get-index.md new file mode 100644 index 0000000000..681a098a3b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/get.md b/docs/examples/1.7.x/server-nodejs/examples/databases/get.md new file mode 100644 index 0000000000..0a5cf65cb5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-nodejs/examples/databases/list-attributes.md new file mode 100644 index 0000000000..163b3dc4f0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/list-collections.md b/docs/examples/1.7.x/server-nodejs/examples/databases/list-collections.md new file mode 100644 index 0000000000..edcc3c4f87 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/list-documents.md b/docs/examples/1.7.x/server-nodejs/examples/databases/list-documents.md new file mode 100644 index 0000000000..9a59a4d6a4 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-nodejs/examples/databases/list-indexes.md new file mode 100644 index 0000000000..43b1863412 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/list.md b/docs/examples/1.7.x/server-nodejs/examples/databases/list.md new file mode 100644 index 0000000000..b2af275d7f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..e3eb813176 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-collection.md new file mode 100644 index 0000000000..99f2e0d939 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..ee2dacd176 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-document.md new file mode 100644 index 0000000000..26b128c11b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-document.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8a612a2766 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..06ae1142c7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..57dec10626 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..9a2d765018 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..f39329aafa --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..e90eb65558 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..dcf090c020 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..6c88a8cd34 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/update.md b/docs/examples/1.7.x/server-nodejs/examples/databases/update.md new file mode 100644 index 0000000000..a4ca62bfd2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/update.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5f3181a687 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..d6be5218c7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 0000000000..7a76734b24 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + sdk.ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..08d7257ed0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-variable.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-variable.md new file mode 100644 index 0000000000..374eba8279 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..869c0f1c54 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/create.md b/docs/examples/1.7.x/server-nodejs/examples/functions/create.md new file mode 100644 index 0000000000..e8a16855f4 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..6a36b6effc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-execution.md new file mode 100644 index 0000000000..ed08a61572 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-variable.md new file mode 100644 index 0000000000..879a02c5a1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/delete.md b/docs/examples/1.7.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 0000000000..601c50cce2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..357ddb1a04 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 0000000000..d4cf579832 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/1.7.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 0000000000..a78d55db47 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/get-variable.md b/docs/examples/1.7.x/server-nodejs/examples/functions/get-variable.md new file mode 100644 index 0000000000..1023286387 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/get.md b/docs/examples/1.7.x/server-nodejs/examples/functions/get.md new file mode 100644 index 0000000000..ed863fcf19 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 0000000000..49f48977ec --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 0000000000..971dcf1dac --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..2a54ed363a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listRuntimes(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list-specifications.md new file mode 100644 index 0000000000..b9a1c833ca --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listSpecifications(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list-variables.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list-variables.md new file mode 100644 index 0000000000..de7e7afd73 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/list.md b/docs/examples/1.7.x/server-nodejs/examples/functions/list.md new file mode 100644 index 0000000000..be0daa49da --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-nodejs/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..e725ab2d34 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..39c0ea91a5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/update-variable.md b/docs/examples/1.7.x/server-nodejs/examples/functions/update-variable.md new file mode 100644 index 0000000000..08b74b2ced --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/functions/update.md b/docs/examples/1.7.x/server-nodejs/examples/functions/update.md new file mode 100644 index 0000000000..36ae3741a5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/graphql/mutation.md b/docs/examples/1.7.x/server-nodejs/examples/graphql/mutation.md new file mode 100644 index 0000000000..5b03f89c1e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/graphql/query.md b/docs/examples/1.7.x/server-nodejs/examples/graphql/query.md new file mode 100644 index 0000000000..24b8dd124a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/graphql/query.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.query( + {} // query +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-antivirus.md new file mode 100644 index 0000000000..95d3beba88 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getAntivirus(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-cache.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-cache.md new file mode 100644 index 0000000000..60f5873d11 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-cache.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCache(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-certificate.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-certificate.md new file mode 100644 index 0000000000..f3be2ff214 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-d-b.md new file mode 100644 index 0000000000..e0e7ea1642 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getDB(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..a3eb90ce82 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getFailedJobs( + sdk..V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..5806f6010c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getPubSub(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..ae90888dc2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..cb05c2fb07 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..4db74d1694 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..2d13078354 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..344205c02f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..93cedb0226 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..bab587cd62 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..609c377cb2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..4b708890f5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..4f4b14bb65 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..e9eb96f328 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueStatsUsageDump( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..794415153d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..a3c9de494c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..2e98748531 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorageLocal(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-storage.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-storage.md new file mode 100644 index 0000000000..69c623b0db --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-storage.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorage(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get-time.md b/docs/examples/1.7.x/server-nodejs/examples/health/get-time.md new file mode 100644 index 0000000000..19fae8289c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get-time.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getTime(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/health/get.md b/docs/examples/1.7.x/server-nodejs/examples/health/get.md new file mode 100644 index 0000000000..2f69c6b7f8 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/health/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.get(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/get.md b/docs/examples/1.7.x/server-nodejs/examples/locale/get.md new file mode 100644 index 0000000000..435d309373 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.get(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-codes.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-codes.md new file mode 100644 index 0000000000..bc7fae0f91 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCodes(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-continents.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-continents.md new file mode 100644 index 0000000000..6d49549706 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listContinents(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..1bfc1b7612 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesEU(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..97cd8ac9e9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries.md new file mode 100644 index 0000000000..48a015fa5a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountries(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-currencies.md new file mode 100644 index 0000000000..71f8f65741 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCurrencies(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/locale/list-languages.md b/docs/examples/1.7.x/server-nodejs/examples/locale/list-languages.md new file mode 100644 index 0000000000..bcf70648e2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listLanguages(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..69e7850193 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-email.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-email.md new file mode 100644 index 0000000000..39816e6567 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..390f3f1162 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..5b933f71de --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ca83a2fd45 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-push.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-push.md new file mode 100644 index 0000000000..12efe0d866 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..3660b3fcae --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sms.md new file mode 100644 index 0000000000..fe0f7f054c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..1dd5953cbc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..b934cff56e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..efcddc7541 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..87b4a18e35 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-topic.md new file mode 100644 index 0000000000..db27d8cbbd --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..8bd3a332f7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..83936cf8ea --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..e8c212cc01 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..4e159503e8 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..cd985a3bd5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/delete.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete.md new file mode 100644 index 0000000000..51be10e075 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/get-message.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-message.md new file mode 100644 index 0000000000..8dc30fa51d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-provider.md new file mode 100644 index 0000000000..7fc2d62bcb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..dd28924201 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-topic.md new file mode 100644 index 0000000000..c0134c236b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..6019b79092 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-messages.md new file mode 100644 index 0000000000..31cc358179 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..13e8356845 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-providers.md new file mode 100644 index 0000000000..544f938ed2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..195c52c813 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f2c82488d6 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-targets.md new file mode 100644 index 0000000000..f67cd1693e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..5ac46d16a0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topics.md new file mode 100644 index 0000000000..a6580b1578 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..8a946252c9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-email.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-email.md new file mode 100644 index 0000000000..e5d510b7cb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..0a01d4c79a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..8c2644b181 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..bb8e8bc2fb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-push.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-push.md new file mode 100644 index 0000000000..8b91729d69 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..fb9236002c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sms.md new file mode 100644 index 0000000000..95c179b596 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..39a73b5bee --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..b3463750fc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..67aa11dfc9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-topic.md new file mode 100644 index 0000000000..65060335d3 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..890619caef --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..6ac9d51346 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create-deployment.md new file mode 100644 index 0000000000..91e4514b42 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..46779e5ed9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..21a6d7bbf7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create-variable.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create-variable.md new file mode 100644 index 0000000000..85385c4d37 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..764257d081 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/create.md b/docs/examples/1.7.x/server-nodejs/examples/sites/create.md new file mode 100644 index 0000000000..13845b0b40 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + sdk..Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..a79711cfb2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/delete-log.md b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-log.md new file mode 100644 index 0000000000..d59bf064e2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-variable.md new file mode 100644 index 0000000000..7fc2573438 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/delete.md b/docs/examples/1.7.x/server-nodejs/examples/sites/delete.md new file mode 100644 index 0000000000..429a0e0ed7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..0334fd50f9 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment.md new file mode 100644 index 0000000000..e57a14deef --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/get-log.md b/docs/examples/1.7.x/server-nodejs/examples/sites/get-log.md new file mode 100644 index 0000000000..79a2ad2715 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/get-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/get-variable.md b/docs/examples/1.7.x/server-nodejs/examples/sites/get-variable.md new file mode 100644 index 0000000000..74b840a4b7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/get.md b/docs/examples/1.7.x/server-nodejs/examples/sites/get.md new file mode 100644 index 0000000000..ea1def1b09 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list-deployments.md new file mode 100644 index 0000000000..54f7c144cc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..183364b99b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listFrameworks(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list-logs.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list-logs.md new file mode 100644 index 0000000000..e512fd5272 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list-specifications.md new file mode 100644 index 0000000000..335bad1673 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listSpecifications(); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list-variables.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list-variables.md new file mode 100644 index 0000000000..fdb8af2ce5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/list.md b/docs/examples/1.7.x/server-nodejs/examples/sites/list.md new file mode 100644 index 0000000000..0de6d26022 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-nodejs/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..51bbdc6b12 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-nodejs/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..34a2e8dc6b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/update-variable.md b/docs/examples/1.7.x/server-nodejs/examples/sites/update-variable.md new file mode 100644 index 0000000000..c419bd5ba7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/sites/update.md b/docs/examples/1.7.x/server-nodejs/examples/sites/update.md new file mode 100644 index 0000000000..f19d830bc1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/sites/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Node145, // buildRuntime (optional) + sdk..Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 0000000000..9485a96bfb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.7.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 0000000000..265188f0b4 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file', 'filename'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..5ae406dce2 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/1.7.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 0000000000..9d9a61d6c0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 0000000000..857c910ba0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..452370dbb1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..2d9fc43eda --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,24 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + sdk.ImageGravity.Center, // gravity (optional) + 0, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + sdk.ImageFormat.Jpg // output (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..6cd39d94fb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 0000000000..116b6b7e3d --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 0000000000..87f763f11e --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/list-files.md b/docs/examples/1.7.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 0000000000..d00bc68bbb --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 0000000000..4b6c912602 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.7.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 0000000000..6a7c4fcadc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/update-file.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/1.7.x/server-nodejs/examples/teams/create-membership.md new file mode 100644 index 0000000000..2333a76871 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/create.md b/docs/examples/1.7.x/server-nodejs/examples/teams/create.md new file mode 100644 index 0000000000..2da6f984b3 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..337aa0ddc0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/delete.md b/docs/examples/1.7.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 0000000000..61ff5680c3 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/1.7.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 0000000000..dd8ffc348b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/teams/get-prefs.md new file mode 100644 index 0000000000..9dc5cbb27c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/get.md b/docs/examples/1.7.x/server-nodejs/examples/teams/get.md new file mode 100644 index 0000000000..87f284d972 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-nodejs/examples/teams/list-memberships.md new file mode 100644 index 0000000000..78487136a5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/list.md b/docs/examples/1.7.x/server-nodejs/examples/teams/list.md new file mode 100644 index 0000000000..a44b333249 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..7fcb3d95c5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership.md b/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership.md new file mode 100644 index 0000000000..fb6edfe147 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/update-name.md b/docs/examples/1.7.x/server-nodejs/examples/teams/update-name.md new file mode 100644 index 0000000000..abd476524a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/teams/update-prefs.md new file mode 100644 index 0000000000..38e7dc240a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..50bd77f6be --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md new file mode 100644 index 0000000000..5e2552f555 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..e485278b62 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/get-j-w-t.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.getJWT( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md new file mode 100644 index 0000000000..5bdc55173f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md new file mode 100644 index 0000000000..f1e726a7cd --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md new file mode 100644 index 0000000000..fe005f86b7 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tokens = new sdk.Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '', // expire (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-argon2user.md new file mode 100644 index 0000000000..d466788017 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..a545d41149 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..4d348ae720 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..98212dfbdc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..159e214520 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..1fc0d4e9d1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..30d115f55f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + sdk.PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..bf1c3552a1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..c1b2224497 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-session.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-session.md new file mode 100644 index 0000000000..08e03fff90 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-target.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-target.md new file mode 100644 index 0000000000..f68d0a0e39 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-target.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + sdk.MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create-token.md b/docs/examples/1.7.x/server-nodejs/examples/users/create-token.md new file mode 100644 index 0000000000..73baf7b650 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/create.md b/docs/examples/1.7.x/server-nodejs/examples/users/create.md new file mode 100644 index 0000000000..5515fb151b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/create.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete-identity.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete-identity.md new file mode 100644 index 0000000000..20749522a1 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..c1442fb5e5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete-session.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 0000000000..f693946fff --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..25e221ae53 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete-target.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete-target.md new file mode 100644 index 0000000000..49cdc51e08 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/delete.md b/docs/examples/1.7.x/server-nodejs/examples/users/delete.md new file mode 100644 index 0000000000..c93a92595c --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0c8e63df18 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 0000000000..5dc171006b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/get-target.md b/docs/examples/1.7.x/server-nodejs/examples/users/get-target.md new file mode 100644 index 0000000000..01203b9b6f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/get-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/get.md b/docs/examples/1.7.x/server-nodejs/examples/users/get.md new file mode 100644 index 0000000000..fa01c8d24b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-identities.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-identities.md new file mode 100644 index 0000000000..6f312edcf0 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-identities.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-logs.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-logs.md new file mode 100644 index 0000000000..d1ef4c6311 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-memberships.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-memberships.md new file mode 100644 index 0000000000..b0c4897599 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..d6ac8d7751 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-sessions.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-sessions.md new file mode 100644 index 0000000000..fff6a80c8b --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list-targets.md b/docs/examples/1.7.x/server-nodejs/examples/users/list-targets.md new file mode 100644 index 0000000000..55b8e60dee --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/list.md b/docs/examples/1.7.x/server-nodejs/examples/users/list.md new file mode 100644 index 0000000000..2490b67b5f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-email-verification.md new file mode 100644 index 0000000000..8e8faccc48 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-email.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 0000000000..707f4d6784 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-labels.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-labels.md new file mode 100644 index 0000000000..3023fe8db5 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-labels.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..76e02b0aae --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa.md new file mode 100644 index 0000000000..c17e59a754 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-name.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 0000000000..36445478bc --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-password.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 0000000000..1b54b08bc4 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..869c550ae6 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-phone.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-phone.md new file mode 100644 index 0000000000..cc827fff6a --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 0000000000..de1b750061 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-status.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 0000000000..bccd528c2f --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.7.x/server-nodejs/examples/users/update-target.md b/docs/examples/1.7.x/server-nodejs/examples/users/update-target.md new file mode 100644 index 0000000000..cced49cbe6 --- /dev/null +++ b/docs/examples/1.7.x/server-nodejs/examples/users/update-target.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://example.com/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.7.x/server-php/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-php/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..61f5f27b0c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-anonymous-session.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createAnonymousSession(); diff --git a/docs/examples/1.7.x/server-php/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-php/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..affadc8d3f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-email-password-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailPasswordSession( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-email-token.md b/docs/examples/1.7.x/server-php/examples/account/create-email-token.md new file mode 100644 index 0000000000..cc16375354 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-php/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..cd1b5fc788 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-j-w-t.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createJWT(); diff --git a/docs/examples/1.7.x/server-php/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-php/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..c3595b48fe --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-php/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..78274ba916 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-php/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..78e28cb83d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticationFactor; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMfaChallenge( + factor: AuthenticationFactor::EMAIL() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..b7ede7c2e9 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-php/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-php/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..1af6eeee66 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-o-auth2token.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\OAuthProvider; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createOAuth2Token( + provider: OAuthProvider::AMAZON(), + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-php/examples/account/create-phone-token.md new file mode 100644 index 0000000000..a92b3a0bec --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-php/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..6f54ef968e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createPhoneVerification(); diff --git a/docs/examples/1.7.x/server-php/examples/account/create-recovery.md b/docs/examples/1.7.x/server-php/examples/account/create-recovery.md new file mode 100644 index 0000000000..1fdc63a465 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createRecovery( + email: 'email@example.com', + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-session.md b/docs/examples/1.7.x/server-php/examples/account/create-session.md new file mode 100644 index 0000000000..b915e31274 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create-verification.md b/docs/examples/1.7.x/server-php/examples/account/create-verification.md new file mode 100644 index 0000000000..c863241f01 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create-verification.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createVerification( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/create.md b/docs/examples/1.7.x/server-php/examples/account/create.md new file mode 100644 index 0000000000..4f04ec813b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/delete-identity.md b/docs/examples/1.7.x/server-php/examples/account/delete-identity.md new file mode 100644 index 0000000000..86e85f3e49 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-php/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..cbaebfd490 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/delete-session.md b/docs/examples/1.7.x/server-php/examples/account/delete-session.md new file mode 100644 index 0000000000..1748480221 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/delete-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-php/examples/account/delete-sessions.md new file mode 100644 index 0000000000..92466d4605 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSessions(); diff --git a/docs/examples/1.7.x/server-php/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..dfc9be4c0d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-php/examples/account/get-prefs.md b/docs/examples/1.7.x/server-php/examples/account/get-prefs.md new file mode 100644 index 0000000000..ecb1fe64fd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getPrefs(); diff --git a/docs/examples/1.7.x/server-php/examples/account/get-session.md b/docs/examples/1.7.x/server-php/examples/account/get-session.md new file mode 100644 index 0000000000..c0c4e3deb3 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/get-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/get.md b/docs/examples/1.7.x/server-php/examples/account/get.md new file mode 100644 index 0000000000..93c8c02088 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->get(); diff --git a/docs/examples/1.7.x/server-php/examples/account/list-identities.md b/docs/examples/1.7.x/server-php/examples/account/list-identities.md new file mode 100644 index 0000000000..d3872d59b3 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/list-identities.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listIdentities( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/list-logs.md b/docs/examples/1.7.x/server-php/examples/account/list-logs.md new file mode 100644 index 0000000000..4b13670592 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/list-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listLogs( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-php/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..2a7d2150b3 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listMfaFactors(); diff --git a/docs/examples/1.7.x/server-php/examples/account/list-sessions.md b/docs/examples/1.7.x/server-php/examples/account/list-sessions.md new file mode 100644 index 0000000000..a7f60dc1d2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listSessions(); diff --git a/docs/examples/1.7.x/server-php/examples/account/update-email.md b/docs/examples/1.7.x/server-php/examples/account/update-email.md new file mode 100644 index 0000000000..ea115ef2c0 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateEmail( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-php/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..69c0cccfc4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-m-f-a.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-php/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c3ed46f875 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-php/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..432837f4f1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaAuthenticator( + type: AuthenticatorType::TOTP(), + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-php/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..bef094279a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..bfe757c3c0 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaRecoveryCodes(); diff --git a/docs/examples/1.7.x/server-php/examples/account/update-name.md b/docs/examples/1.7.x/server-php/examples/account/update-name.md new file mode 100644 index 0000000000..436d241ab2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-name.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateName( + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-password.md b/docs/examples/1.7.x/server-php/examples/account/update-password.md new file mode 100644 index 0000000000..884791fa46 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePassword( + password: '', + oldPassword: 'password' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-php/examples/account/update-phone-session.md new file mode 100644 index 0000000000..4c95b5dd55 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-phone-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-php/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd70b254a5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-phone.md b/docs/examples/1.7.x/server-php/examples/account/update-phone.md new file mode 100644 index 0000000000..1ab364dc31 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhone( + phone: '+12065550100', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-prefs.md b/docs/examples/1.7.x/server-php/examples/account/update-prefs.md new file mode 100644 index 0000000000..e0e2469ae6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePrefs( + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-recovery.md b/docs/examples/1.7.x/server-php/examples/account/update-recovery.md new file mode 100644 index 0000000000..c008ffc07a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-session.md b/docs/examples/1.7.x/server-php/examples/account/update-session.md new file mode 100644 index 0000000000..4d2d736e9b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/account/update-status.md b/docs/examples/1.7.x/server-php/examples/account/update-status.md new file mode 100644 index 0000000000..0f360c5d5c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-status.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateStatus(); diff --git a/docs/examples/1.7.x/server-php/examples/account/update-verification.md b/docs/examples/1.7.x/server-php/examples/account/update-verification.md new file mode 100644 index 0000000000..13a6d9ca99 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/account/update-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 0000000000..5ab2c761b9 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Browser; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser( + code: Browser::AVANTBROWSER(), + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..f5da425718 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\CreditCard; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard( + code: CreditCard::AMERICANEXPRESS(), + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..68833356bd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 0000000000..c9702bd5ae --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Flag; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFlag( + code: Flag::AFGHANISTAN(), + width: 0, // optional + height: 0, // optional + quality: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-image.md b/docs/examples/1.7.x/server-php/examples/avatars/get-image.md new file mode 100644 index 0000000000..e21e503a0b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getImage( + url: 'https://example.com', + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a92cc41b96 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getInitials( + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-php/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e967130e86 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-q-r.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getQR( + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..bd2c0c4200 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-collection.md b/docs/examples/1.7.x/server-php/examples/databases/create-collection.md new file mode 100644 index 0000000000..5e6a1c1bf6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..4c88b438c5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-document.md b/docs/examples/1.7.x/server-php/examples/databases/create-document.md new file mode 100644 index 0000000000..ef7dfc85a7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-document.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..88775287d2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..ea549193d1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..8658973bff --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-index.md b/docs/examples/1.7.x/server-php/examples/databases/create-index.md new file mode 100644 index 0000000000..06cbbf7a28 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-index.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY(), + attributes: [], + orders: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..64c441515a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..931f59947d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..dbb11cd211 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-relationship-attribute.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..1bb8c8fda1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-string-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..42ab098032 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create.md b/docs/examples/1.7.x/server-php/examples/databases/create.md new file mode 100644 index 0000000000..ad97d6a804 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..0201e701d5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/delete-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-php/examples/databases/delete-collection.md new file mode 100644 index 0000000000..ac1dd324b9 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/delete-document.md b/docs/examples/1.7.x/server-php/examples/databases/delete-document.md new file mode 100644 index 0000000000..3df273c864 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/delete-document.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/delete-index.md b/docs/examples/1.7.x/server-php/examples/databases/delete-index.md new file mode 100644 index 0000000000..49e474661b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/delete.md b/docs/examples/1.7.x/server-php/examples/databases/delete.md new file mode 100644 index 0000000000..7be1955f1d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->delete( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/get-attribute.md new file mode 100644 index 0000000000..67294862fa --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/get-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/get-collection.md b/docs/examples/1.7.x/server-php/examples/databases/get-collection.md new file mode 100644 index 0000000000..8c7b6be8b4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/get-document.md b/docs/examples/1.7.x/server-php/examples/databases/get-document.md new file mode 100644 index 0000000000..d6ec311cfb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/get-document.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/get-index.md b/docs/examples/1.7.x/server-php/examples/databases/get-index.md new file mode 100644 index 0000000000..e0c0b14299 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/get.md b/docs/examples/1.7.x/server-php/examples/databases/get.md new file mode 100644 index 0000000000..0fd418e195 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->get( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-php/examples/databases/list-attributes.md new file mode 100644 index 0000000000..79e361f1ec --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/list-attributes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/list-collections.md b/docs/examples/1.7.x/server-php/examples/databases/list-collections.md new file mode 100644 index 0000000000..c40d0564d7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/list-collections.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/list-documents.md b/docs/examples/1.7.x/server-php/examples/databases/list-documents.md new file mode 100644 index 0000000000..ca0d7431f9 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/list-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-php/examples/databases/list-indexes.md new file mode 100644 index 0000000000..dc8afb98ec --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/list.md b/docs/examples/1.7.x/server-php/examples/databases/list.md new file mode 100644 index 0000000000..2504ed0a05 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..4670ff1473 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-collection.md b/docs/examples/1.7.x/server-php/examples/databases/update-collection.md new file mode 100644 index 0000000000..b6157726e1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..506888d41d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-document.md b/docs/examples/1.7.x/server-php/examples/databases/update-document.md new file mode 100644 index 0000000000..0ffb68b030 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-document.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..7c5614ec65 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..ad7918e6b1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..edda4f586d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..4bb1d649b7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..bf33405163 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..ed856d0fdd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..ca2a6dd37d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-string-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-php/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..a2a186d0e6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/update.md b/docs/examples/1.7.x/server-php/examples/databases/update.md new file mode 100644 index 0000000000..1b5df893bb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/databases/update.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 0000000000..dc55a1b0ae --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile::withPath('file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..6bba4ebe4f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-execution.md b/docs/examples/1.7.x/server-php/examples/functions/create-execution.md new file mode 100644 index 0000000000..c409d9c08a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: ExecutionMethod::GET(), // optional + headers: [], // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..be9b7d7974 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-variable.md b/docs/examples/1.7.x/server-php/examples/functions/create-variable.md new file mode 100644 index 0000000000..5b1e3f8456 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..54e1b20442 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/create.md b/docs/examples/1.7.x/server-php/examples/functions/create.md new file mode 100644 index 0000000000..73be93bab1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/create.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..4da48f32f6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-php/examples/functions/delete-execution.md new file mode 100644 index 0000000000..64771880f0 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-php/examples/functions/delete-variable.md new file mode 100644 index 0000000000..710b7eb15d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/delete.md b/docs/examples/1.7.x/server-php/examples/functions/delete.md new file mode 100644 index 0000000000..b378bacc24 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->delete( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-php/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..8c1661b656 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 0000000000..1cd9faa420 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/get-execution.md b/docs/examples/1.7.x/server-php/examples/functions/get-execution.md new file mode 100644 index 0000000000..1af63421ad --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/get-variable.md b/docs/examples/1.7.x/server-php/examples/functions/get-variable.md new file mode 100644 index 0000000000..067d6798fc --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/get.md b/docs/examples/1.7.x/server-php/examples/functions/get.md new file mode 100644 index 0000000000..d357d01b50 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->get( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 0000000000..2429a52fa7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/list-executions.md b/docs/examples/1.7.x/server-php/examples/functions/list-executions.md new file mode 100644 index 0000000000..c5539fa26f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->listExecutions( + functionId: '<FUNCTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-php/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..f2b0132163 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); diff --git a/docs/examples/1.7.x/server-php/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-php/examples/functions/list-specifications.md new file mode 100644 index 0000000000..65da9047e4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listSpecifications(); diff --git a/docs/examples/1.7.x/server-php/examples/functions/list-variables.md b/docs/examples/1.7.x/server-php/examples/functions/list-variables.md new file mode 100644 index 0000000000..04c167d26c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listVariables( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/list.md b/docs/examples/1.7.x/server-php/examples/functions/list.md new file mode 100644 index 0000000000..9f27f4f657 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-php/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..f135a0dc7c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-php/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..6793a44b6d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/update-function-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/update-variable.md b/docs/examples/1.7.x/server-php/examples/functions/update-variable.md new file mode 100644 index 0000000000..03d3e963fa --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/functions/update.md b/docs/examples/1.7.x/server-php/examples/functions/update.md new file mode 100644 index 0000000000..6e82e9ddb1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/functions/update.md @@ -0,0 +1,32 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), // optional + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/graphql/mutation.md b/docs/examples/1.7.x/server-php/examples/graphql/mutation.md new file mode 100644 index 0000000000..765a31daa8 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->mutation( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/graphql/query.md b/docs/examples/1.7.x/server-php/examples/graphql/query.md new file mode 100644 index 0000000000..f86162d132 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/graphql/query.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->query( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-php/examples/health/get-antivirus.md new file mode 100644 index 0000000000..c166d81b0a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-antivirus.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getAntivirus(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-cache.md b/docs/examples/1.7.x/server-php/examples/health/get-cache.md new file mode 100644 index 0000000000..24b92cda5f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-cache.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCache(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-certificate.md b/docs/examples/1.7.x/server-php/examples/health/get-certificate.md new file mode 100644 index 0000000000..6bf5d89f4b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-certificate.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCertificate( + domain: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-d-b.md b/docs/examples/1.7.x/server-php/examples/health/get-d-b.md new file mode 100644 index 0000000000..a6d517e4a6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-d-b.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getDB(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-php/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..e0975f37b8 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-failed-jobs.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getFailedJobs( + name: ::V1DATABASE(), + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-php/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..e5df80340d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-pub-sub.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getPubSub(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..342580994c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-builds.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueBuilds( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b45057b703 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-certificates.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueCertificates( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..0b4924a6d2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-databases.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDatabases( + name: '<NAME>', // optional + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..b122d90214 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-deletes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDeletes( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..98918fd379 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueFunctions( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..95d31c5c35 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueLogs( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..33a6fb54f1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-mails.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMails( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..929434c49a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-messaging.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMessaging( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..17b9d1ce26 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-migrations.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMigrations( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..a90c92fc1f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-resources.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueStatsResources( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..2b3f87f5a1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueStatsUsageDump( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b3a8544701 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-usage.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueUsage( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-php/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..f92d59789f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-queue-webhooks.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueWebhooks( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-php/examples/health/get-storage-local.md new file mode 100644 index 0000000000..79129ce18e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-storage-local.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorageLocal(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-storage.md b/docs/examples/1.7.x/server-php/examples/health/get-storage.md new file mode 100644 index 0000000000..69e33204cb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-storage.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorage(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get-time.md b/docs/examples/1.7.x/server-php/examples/health/get-time.md new file mode 100644 index 0000000000..e64bb11214 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get-time.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getTime(); diff --git a/docs/examples/1.7.x/server-php/examples/health/get.md b/docs/examples/1.7.x/server-php/examples/health/get.md new file mode 100644 index 0000000000..4e17f20713 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/health/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->get(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/get.md b/docs/examples/1.7.x/server-php/examples/locale/get.md new file mode 100644 index 0000000000..7378e4b2f7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->get(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-codes.md b/docs/examples/1.7.x/server-php/examples/locale/list-codes.md new file mode 100644 index 0000000000..eb9ca52f3f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCodes(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-continents.md b/docs/examples/1.7.x/server-php/examples/locale/list-continents.md new file mode 100644 index 0000000000..7b4f3cc07a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listContinents(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-php/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..fb94f3dc58 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-countries-e-u.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesEU(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-php/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..875871f4e7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesPhones(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-countries.md b/docs/examples/1.7.x/server-php/examples/locale/list-countries.md new file mode 100644 index 0000000000..4b73781589 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountries(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-php/examples/locale/list-currencies.md new file mode 100644 index 0000000000..98eddd0fe4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCurrencies(); diff --git a/docs/examples/1.7.x/server-php/examples/locale/list-languages.md b/docs/examples/1.7.x/server-php/examples/locale/list-languages.md new file mode 100644 index 0000000000..ba26381cbf --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listLanguages(); diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..c0ad1ad74e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-email.md b/docs/examples/1.7.x/server-php/examples/messaging/create-email.md new file mode 100644 index 0000000000..d6f871668c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..34d3824766 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: [], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..a092bf260a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..e673d63292 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-push.md b/docs/examples/1.7.x/server-php/examples/messaging/create-push.md new file mode 100644 index 0000000000..4f37c59ea3 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..051ea88ab1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-php/examples/messaging/create-sms.md new file mode 100644 index 0000000000..1276c982c1 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..faeecc1241 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-php/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..a2ba079831 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..a8fcdfc25f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..f9b1461411 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-php/examples/messaging/create-topic.md new file mode 100644 index 0000000000..ff63b2311c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..0aa5b95eb7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..f8e9036022 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..6529064f3c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/delete-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-php/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..90634e2121 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-php/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..69af80499c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/delete-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/delete.md b/docs/examples/1.7.x/server-php/examples/messaging/delete.md new file mode 100644 index 0000000000..ead07fa3b4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->delete( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/get-message.md b/docs/examples/1.7.x/server-php/examples/messaging/get-message.md new file mode 100644 index 0000000000..aefc29ac96 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/get-message.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getMessage( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/get-provider.md new file mode 100644 index 0000000000..f737af2e1c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/get-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-php/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..4aeed780de --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/get-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-php/examples/messaging/get-topic.md new file mode 100644 index 0000000000..57ad7a5806 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/get-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-php/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..9f14d7c897 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-message-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-php/examples/messaging/list-messages.md new file mode 100644 index 0000000000..e9a9483650 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-messages.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessages( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-php/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..b8312ccc2d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-provider-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-php/examples/messaging/list-providers.md new file mode 100644 index 0000000000..c6d2c264fa --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-providers.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviders( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-php/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..01773eb7fd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-php/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f6cbd07e9e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-subscribers.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-php/examples/messaging/list-targets.md new file mode 100644 index 0000000000..53c268dc18 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTargets( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-php/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..7dcaba5981 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-topic-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-php/examples/messaging/list-topics.md new file mode 100644 index 0000000000..a06bb5baa2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/list-topics.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopics( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..7cce4e1c3f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-email.md b/docs/examples/1.7.x/server-php/examples/messaging/update-email.md new file mode 100644 index 0000000000..2d88d57215 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: '', // optional + attachments: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..6194fd6d96 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..d792664981 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..d04bffee10 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-push.md b/docs/examples/1.7.x/server-php/examples/messaging/update-push.md new file mode 100644 index 0000000000..c18cc60398 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..50705d6301 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-php/examples/messaging/update-sms.md new file mode 100644 index 0000000000..400e10c983 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + content: '<CONTENT>', // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..8eb29132ad --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..d457b797f8 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..6e6e30b730 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-php/examples/messaging/update-topic.md new file mode 100644 index 0000000000..6cdd4dca14 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..c5c629d0e7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-php/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..78db3f4adf --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/create-deployment.md new file mode 100644 index 0000000000..c9e7de0b17 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create-deployment.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDeployment( + siteId: '<SITE_ID>', + code: InputFile::withPath('file.png'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..c5a85b5c6d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..ff29052683 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create-variable.md b/docs/examples/1.7.x/server-php/examples/sites/create-variable.md new file mode 100644 index 0000000000..d2c710646e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..a6fd8f4674 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/create.md b/docs/examples/1.7.x/server-php/examples/sites/create.md new file mode 100644 index 0000000000..9e473dd9b0 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/create.md @@ -0,0 +1,34 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + buildRuntime: ::NODE145(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: ::STATIC(), // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..80bd1ab258 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/delete-log.md b/docs/examples/1.7.x/server-php/examples/sites/delete-log.md new file mode 100644 index 0000000000..5ef463e805 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-php/examples/sites/delete-variable.md new file mode 100644 index 0000000000..1028742f68 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/delete.md b/docs/examples/1.7.x/server-php/examples/sites/delete.md new file mode 100644 index 0000000000..a2dc1be7b9 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->delete( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-php/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..03cf28f476 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/get-deployment.md new file mode 100644 index 0000000000..d1d8c50ae5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/get-log.md b/docs/examples/1.7.x/server-php/examples/sites/get-log.md new file mode 100644 index 0000000000..2397607565 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/get-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/get-variable.md b/docs/examples/1.7.x/server-php/examples/sites/get-variable.md new file mode 100644 index 0000000000..2776b66a9b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/get.md b/docs/examples/1.7.x/server-php/examples/sites/get.md new file mode 100644 index 0000000000..71dc61c44c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->get( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-php/examples/sites/list-deployments.md new file mode 100644 index 0000000000..1114716cf2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listDeployments( + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-php/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..73093e3e78 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list-frameworks.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listFrameworks(); diff --git a/docs/examples/1.7.x/server-php/examples/sites/list-logs.md b/docs/examples/1.7.x/server-php/examples/sites/list-logs.md new file mode 100644 index 0000000000..cfc465a50a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listLogs( + siteId: '<SITE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-php/examples/sites/list-specifications.md new file mode 100644 index 0000000000..4a5e1ab934 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listSpecifications(); diff --git a/docs/examples/1.7.x/server-php/examples/sites/list-variables.md b/docs/examples/1.7.x/server-php/examples/sites/list-variables.md new file mode 100644 index 0000000000..732b7e5038 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listVariables( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/list.md b/docs/examples/1.7.x/server-php/examples/sites/list.md new file mode 100644 index 0000000000..b282b84e37 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-php/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..c19fd575ee --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-php/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..e743b64ab4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/update-site-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/update-variable.md b/docs/examples/1.7.x/server-php/examples/sites/update-variable.md new file mode 100644 index 0000000000..7d00033d15 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/sites/update.md b/docs/examples/1.7.x/server-php/examples/sites/update.md new file mode 100644 index 0000000000..103e6363b2 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/sites/update.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: ::NODE145(), // optional + adapter: ::STATIC(), // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a14709656e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/create-file.md b/docs/examples/1.7.x/server-php/examples/storage/create-file.md new file mode 100644 index 0000000000..980f7e82dc --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/create-file.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile::withPath('file.png'), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..d080cfeb43 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->deleteBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/delete-file.md b/docs/examples/1.7.x/server-php/examples/storage/delete-file.md new file mode 100644 index 0000000000..0d8737de97 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e2c6d3c863 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->getBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 0000000000..51910b5e90 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..512e3c184a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity::CENTER(), // optional + quality: 0, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat::JPG() // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 0000000000..bc30f9e6a8 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file.md b/docs/examples/1.7.x/server-php/examples/storage/get-file.md new file mode 100644 index 0000000000..53170d0996 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a2a3b3576d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->listBuckets( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/list-files.md b/docs/examples/1.7.x/server-php/examples/storage/list-files.md new file mode 100644 index 0000000000..75b7bf973f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/list-files.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 0000000000..9fef766a87 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/update-file.md b/docs/examples/1.7.x/server-php/examples/storage/update-file.md new file mode 100644 index 0000000000..496627af70 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/storage/update-file.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/create-membership.md b/docs/examples/1.7.x/server-php/examples/teams/create-membership.md new file mode 100644 index 0000000000..e61756976b --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/create.md b/docs/examples/1.7.x/server-php/examples/teams/create.md new file mode 100644 index 0000000000..fba03ac4fa --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 0000000000..939b5a1be7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/delete.md b/docs/examples/1.7.x/server-php/examples/teams/delete.md new file mode 100644 index 0000000000..754f94672a --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->delete( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/get-membership.md b/docs/examples/1.7.x/server-php/examples/teams/get-membership.md new file mode 100644 index 0000000000..c1de959109 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-php/examples/teams/get-prefs.md new file mode 100644 index 0000000000..d39bf02ebe --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getPrefs( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/get.md b/docs/examples/1.7.x/server-php/examples/teams/get.md new file mode 100644 index 0000000000..b11a2597c0 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->get( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-php/examples/teams/list-memberships.md new file mode 100644 index 0000000000..af8759b4bd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->listMemberships( + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/list.md b/docs/examples/1.7.x/server-php/examples/teams/list.md new file mode 100644 index 0000000000..1664d0c7f4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c6ec10f888 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/update-membership.md b/docs/examples/1.7.x/server-php/examples/teams/update-membership.md new file mode 100644 index 0000000000..0131c43ed6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/update-name.md b/docs/examples/1.7.x/server-php/examples/teams/update-name.md new file mode 100644 index 0000000000..7441e0d595 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateName( + teamId: '<TEAM_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-php/examples/teams/update-prefs.md new file mode 100644 index 0000000000..a819033002 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updatePrefs( + teamId: '<TEAM_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..d865f9156c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '', // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/delete.md b/docs/examples/1.7.x/server-php/examples/tokens/delete.md new file mode 100644 index 0000000000..25827dbad7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->delete( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-php/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..ccee592811 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/get-j-w-t.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->getJWT( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/get.md b/docs/examples/1.7.x/server-php/examples/tokens/get.md new file mode 100644 index 0000000000..239781607c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->get( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/list.md b/docs/examples/1.7.x/server-php/examples/tokens/list.md new file mode 100644 index 0000000000..077b0bb0cb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/update.md b/docs/examples/1.7.x/server-php/examples/tokens/update.md new file mode 100644 index 0000000000..f4edd9b1f3 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/tokens/update.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tokens = new Tokens($client); + +$result = $tokens->update( + tokenId: '<TOKEN_ID>', + expire: '', // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-php/examples/users/create-argon2user.md new file mode 100644 index 0000000000..fe8145bea5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-argon2user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-php/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..e978e17f34 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-bcrypt-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-php/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..c54e99f1df --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-j-w-t.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-php/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..fbc237ff6d --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-m-d5user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..3e74e68a70 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-php/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..fc94a18102 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-p-h-pass-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-php/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..b1c1f8add4 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash::SHA1(), // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-php/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..90c474b11c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-php/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..2fc64e4a71 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-scrypt-user.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-session.md b/docs/examples/1.7.x/server-php/examples/users/create-session.md new file mode 100644 index 0000000000..b0835e47b8 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSession( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-target.md b/docs/examples/1.7.x/server-php/examples/users/create-target.md new file mode 100644 index 0000000000..b0392ba269 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-target.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\MessagingProviderType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType::EMAIL(), + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create-token.md b/docs/examples/1.7.x/server-php/examples/users/create-token.md new file mode 100644 index 0000000000..7cf7680ca7 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createToken( + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/create.md b/docs/examples/1.7.x/server-php/examples/users/create.md new file mode 100644 index 0000000000..7b8afd4ffb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/create.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->create( + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: '', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete-identity.md b/docs/examples/1.7.x/server-php/examples/users/delete-identity.md new file mode 100644 index 0000000000..83ce8c20d6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-php/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..06ca928fdb --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete-session.md b/docs/examples/1.7.x/server-php/examples/users/delete-session.md new file mode 100644 index 0000000000..8acc71b976 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete-session.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 0000000000..0399a917be --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete-target.md b/docs/examples/1.7.x/server-php/examples/users/delete-target.md new file mode 100644 index 0000000000..739fb5528c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/delete.md b/docs/examples/1.7.x/server-php/examples/users/delete.md new file mode 100644 index 0000000000..27b841de58 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->delete( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..000615ca27 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/get-prefs.md b/docs/examples/1.7.x/server-php/examples/users/get-prefs.md new file mode 100644 index 0000000000..763cd36168 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getPrefs( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/get-target.md b/docs/examples/1.7.x/server-php/examples/users/get-target.md new file mode 100644 index 0000000000..aad22e75ad --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/get-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/get.md b/docs/examples/1.7.x/server-php/examples/users/get.md new file mode 100644 index 0000000000..f2646e4e73 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->get( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-identities.md b/docs/examples/1.7.x/server-php/examples/users/list-identities.md new file mode 100644 index 0000000000..6166931bb6 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-identities.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listIdentities( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-logs.md b/docs/examples/1.7.x/server-php/examples/users/list-logs.md new file mode 100644 index 0000000000..2430f15507 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listLogs( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-memberships.md b/docs/examples/1.7.x/server-php/examples/users/list-memberships.md new file mode 100644 index 0000000000..f66bf017c5 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMemberships( + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-php/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..17def80484 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-mfa-factors.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMfaFactors( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-sessions.md b/docs/examples/1.7.x/server-php/examples/users/list-sessions.md new file mode 100644 index 0000000000..b457bc004e --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list-targets.md b/docs/examples/1.7.x/server-php/examples/users/list-targets.md new file mode 100644 index 0000000000..6a3fce3ece --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listTargets( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/list.md b/docs/examples/1.7.x/server-php/examples/users/list.md new file mode 100644 index 0000000000..300cc1bf16 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-php/examples/users/update-email-verification.md new file mode 100644 index 0000000000..d7b0ed4e12 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-email.md b/docs/examples/1.7.x/server-php/examples/users/update-email.md new file mode 100644 index 0000000000..40f0914134 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmail( + userId: '<USER_ID>', + email: 'email@example.com' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-labels.md b/docs/examples/1.7.x/server-php/examples/users/update-labels.md new file mode 100644 index 0000000000..97fa65ff89 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-labels.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateLabels( + userId: '<USER_ID>', + labels: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-php/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..1655c941ec --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-mfa.md b/docs/examples/1.7.x/server-php/examples/users/update-mfa.md new file mode 100644 index 0000000000..0075584b8f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-mfa.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfa( + userId: '<USER_ID>', + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-name.md b/docs/examples/1.7.x/server-php/examples/users/update-name.md new file mode 100644 index 0000000000..6815a6ecea --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateName( + userId: '<USER_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-password.md b/docs/examples/1.7.x/server-php/examples/users/update-password.md new file mode 100644 index 0000000000..108c3badcc --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePassword( + userId: '<USER_ID>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-php/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..cf09a1f83f --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-phone.md b/docs/examples/1.7.x/server-php/examples/users/update-phone.md new file mode 100644 index 0000000000..789f3f14ce --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhone( + userId: '<USER_ID>', + number: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-prefs.md b/docs/examples/1.7.x/server-php/examples/users/update-prefs.md new file mode 100644 index 0000000000..67db200f7c --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePrefs( + userId: '<USER_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-status.md b/docs/examples/1.7.x/server-php/examples/users/update-status.md new file mode 100644 index 0000000000..8bce7f0c21 --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateStatus( + userId: '<USER_ID>', + status: false +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/users/update-target.md b/docs/examples/1.7.x/server-php/examples/users/update-target.md new file mode 100644 index 0000000000..6c23fb49dd --- /dev/null +++ b/docs/examples/1.7.x/server-php/examples/users/update-target.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://example.com/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-python/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-python/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..65ff868bd9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.7.x/server-python/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-python/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..a7521ac3c5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_password_session( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-email-token.md b/docs/examples/1.7.x/server-python/examples/account/create-email-token.md new file mode 100644 index 0000000000..0928e4f879 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_token( + user_id = '<USER_ID>', + email = 'email@example.com', + phrase = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-python/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..25d336a0a3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_jwt() diff --git a/docs/examples/1.7.x/server-python/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-python/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..2d8ce222fa --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_magic_url_token( + user_id = '<USER_ID>', + email = 'email@example.com', + url = 'https://example.com', # optional + phrase = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-python/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..58f40ed530 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-python/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..12016a26b9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticationFactor + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_mfa_challenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f085b4f04b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-python/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-python/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..5f42ebf0a0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import OAuthProvider + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_o_auth2_token( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-python/examples/account/create-phone-token.md new file mode 100644 index 0000000000..811d702661 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_phone_token( + user_id = '<USER_ID>', + phone = '+12065550100' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-python/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..6440981886 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.7.x/server-python/examples/account/create-recovery.md b/docs/examples/1.7.x/server-python/examples/account/create-recovery.md new file mode 100644 index 0000000000..8c9eaa4341 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_recovery( + email = 'email@example.com', + url = 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-session.md b/docs/examples/1.7.x/server-python/examples/account/create-session.md new file mode 100644 index 0000000000..26c2c4a108 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create-verification.md b/docs/examples/1.7.x/server-python/examples/account/create-verification.md new file mode 100644 index 0000000000..8e66fb49f6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create-verification.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_verification( + url = 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/create.md b/docs/examples/1.7.x/server-python/examples/account/create.md new file mode 100644 index 0000000000..21072b72d0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create( + user_id = '<USER_ID>', + email = 'email@example.com', + password = '', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/delete-identity.md b/docs/examples/1.7.x/server-python/examples/account/delete-identity.md new file mode 100644 index 0000000000..0467ef0506 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-python/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..c58b861e11 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-python/examples/account/delete-session.md b/docs/examples/1.7.x/server-python/examples/account/delete-session.md new file mode 100644 index 0000000000..baf5a1191e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/delete-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-python/examples/account/delete-sessions.md new file mode 100644 index 0000000000..4779f7d0d6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.7.x/server-python/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0fff1f2669 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-python/examples/account/get-prefs.md b/docs/examples/1.7.x/server-python/examples/account/get-prefs.md new file mode 100644 index 0000000000..2760f3fb9c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_prefs() diff --git a/docs/examples/1.7.x/server-python/examples/account/get-session.md b/docs/examples/1.7.x/server-python/examples/account/get-session.md new file mode 100644 index 0000000000..39a1dfee2f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/get-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/get.md b/docs/examples/1.7.x/server-python/examples/account/get.md new file mode 100644 index 0000000000..4d82826006 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get() diff --git a/docs/examples/1.7.x/server-python/examples/account/list-identities.md b/docs/examples/1.7.x/server-python/examples/account/list-identities.md new file mode 100644 index 0000000000..fe8e120b77 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/list-identities.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_identities( + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/list-logs.md b/docs/examples/1.7.x/server-python/examples/account/list-logs.md new file mode 100644 index 0000000000..7a48ab6ae9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/list-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_logs( + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-python/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..4ba8af1874 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.7.x/server-python/examples/account/list-sessions.md b/docs/examples/1.7.x/server-python/examples/account/list-sessions.md new file mode 100644 index 0000000000..25b1db769f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_sessions() diff --git a/docs/examples/1.7.x/server-python/examples/account/update-email.md b/docs/examples/1.7.x/server-python/examples/account/update-email.md new file mode 100644 index 0000000000..7f1a33c9cc --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_email( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-python/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..bc7a546a4b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa( + mfa = False +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-python/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..38c978eac4 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_magic_url_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-python/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..20063e2f3f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_authenticator( + type = AuthenticatorType.TOTP, + otp = '<OTP>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-python/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..19a0395b2f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_challenge( + challenge_id = '<CHALLENGE_ID>', + otp = '<OTP>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..bb95926fb1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-python/examples/account/update-name.md b/docs/examples/1.7.x/server-python/examples/account/update-name.md new file mode 100644 index 0000000000..ccdb9e1afb --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-name.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_name( + name = '<NAME>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-password.md b/docs/examples/1.7.x/server-python/examples/account/update-password.md new file mode 100644 index 0000000000..df5356a360 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_password( + password = '', + old_password = 'password' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-python/examples/account/update-phone-session.md new file mode 100644 index 0000000000..bd9dc02472 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_phone_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-python/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..51d8671b56 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-phone.md b/docs/examples/1.7.x/server-python/examples/account/update-phone.md new file mode 100644 index 0000000000..af8580cc8e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone( + phone = '+12065550100', + password = 'password' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-prefs.md b/docs/examples/1.7.x/server-python/examples/account/update-prefs.md new file mode 100644 index 0000000000..09a5fd6f5f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_prefs( + prefs = {} +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-recovery.md b/docs/examples/1.7.x/server-python/examples/account/update-recovery.md new file mode 100644 index 0000000000..e18f773b4a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_recovery( + user_id = '<USER_ID>', + secret = '<SECRET>', + password = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-session.md b/docs/examples/1.7.x/server-python/examples/account/update-session.md new file mode 100644 index 0000000000..9127df0cf3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/account/update-status.md b/docs/examples/1.7.x/server-python/examples/account/update-status.md new file mode 100644 index 0000000000..931f379757 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-status.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_status() diff --git a/docs/examples/1.7.x/server-python/examples/account/update-verification.md b/docs/examples/1.7.x/server-python/examples/account/update-verification.md new file mode 100644 index 0000000000..a3da321e34 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/account/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ccca6ff109 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Browser + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_browser( + code = Browser.AVANT_BROWSER, + width = 0, # optional + height = 0, # optional + quality = 0 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..1fdfd571bf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import CreditCard + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_credit_card( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, # optional + height = 0, # optional + quality = 0 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e658d776a1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_favicon( + url = 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 0000000000..4a0577a4d8 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Flag + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_flag( + code = Flag.AFGHANISTAN, + width = 0, # optional + height = 0, # optional + quality = 0 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-image.md b/docs/examples/1.7.x/server-python/examples/avatars/get-image.md new file mode 100644 index 0000000000..e4f754154f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_image( + url = 'https://example.com', + width = 0, # optional + height = 0 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 0000000000..37e16e5439 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_initials( + name = '<NAME>', # optional + width = 0, # optional + height = 0, # optional + background = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-python/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..9deeb9d158 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_qr( + text = '<TEXT>', + size = 1, # optional + margin = 0, # optional + download = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..3337703318 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-collection.md b/docs/examples/1.7.x/server-python/examples/databases/create-collection.md new file mode 100644 index 0000000000..04b8ace86a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..528a6d1b29 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-document.md b/docs/examples/1.7.x/server-python/examples/databases/create-document.md new file mode 100644 index 0000000000..80d4bb7181 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-document.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..3575911726 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..6a3cf99bff --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b8d1d980b9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-index.md b/docs/examples/1.7.x/server-python/examples/databases/create-index.md new file mode 100644 index 0000000000..e3ee24eede --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-index.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + type = IndexType.KEY, + attributes = [], + orders = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..1575fb79cf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..b01ae6b19d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..0f81f3dfb5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + related_collection_id = '<RELATED_COLLECTION_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..61b5421a7b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..86a0fd220f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create.md b/docs/examples/1.7.x/server-python/examples/databases/create.md new file mode 100644 index 0000000000..11a98a39e8 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..c9c25ba718 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-python/examples/databases/delete-collection.md new file mode 100644 index 0000000000..c413315a21 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/delete-document.md b/docs/examples/1.7.x/server-python/examples/databases/delete-document.md new file mode 100644 index 0000000000..340d2886d2 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/delete-index.md b/docs/examples/1.7.x/server-python/examples/databases/delete-index.md new file mode 100644 index 0000000000..8b897dd1e8 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/delete.md b/docs/examples/1.7.x/server-python/examples/databases/delete.md new file mode 100644 index 0000000000..946559ddf6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/get-attribute.md new file mode 100644 index 0000000000..a0149b4fe1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/get-collection.md b/docs/examples/1.7.x/server-python/examples/databases/get-collection.md new file mode 100644 index 0000000000..5b244761a9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/get-document.md b/docs/examples/1.7.x/server-python/examples/databases/get-document.md new file mode 100644 index 0000000000..2c39e8384d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/get-document.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/get-index.md b/docs/examples/1.7.x/server-python/examples/databases/get-index.md new file mode 100644 index 0000000000..28845ac0ef --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/get.md b/docs/examples/1.7.x/server-python/examples/databases/get.md new file mode 100644 index 0000000000..1343aa508d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-python/examples/databases/list-attributes.md new file mode 100644 index 0000000000..17d20e43c2 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_attributes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/list-collections.md b/docs/examples/1.7.x/server-python/examples/databases/list-collections.md new file mode 100644 index 0000000000..b3614d9ddc --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/list-documents.md b/docs/examples/1.7.x/server-python/examples/databases/list-documents.md new file mode 100644 index 0000000000..e0805a83b0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-python/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e9f4b068b1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/list.md b/docs/examples/1.7.x/server-python/examples/databases/list.md new file mode 100644 index 0000000000..534b86d751 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..7197579c7b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-collection.md b/docs/examples/1.7.x/server-python/examples/databases/update-collection.md new file mode 100644 index 0000000000..5d04587aa5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..fcd517c8b6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-document.md b/docs/examples/1.7.x/server-python/examples/databases/update-document.md new file mode 100644 index 0000000000..e095b93614 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-document.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..bf9031e0f1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..094a8d4d8c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..40040d599d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..3420f6b966 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..55cd071826 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..5934ab9e82 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..2bad877035 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-python/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..953f853a9e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/databases/update.md b/docs/examples/1.7.x/server-python/examples/databases/update.md new file mode 100644 index 0000000000..4bdeb2354b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/databases/update.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 0000000000..283118a7a6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_deployment( + function_id = '<FUNCTION_ID>', + code = InputFile.from_path('file.png'), + activate = False, + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..f3f0904410 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_duplicate_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + build_id = '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-execution.md b/docs/examples/1.7.x/server-python/examples/functions/create-execution.md new file mode 100644 index 0000000000..50e270decf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.create_execution( + function_id = '<FUNCTION_ID>', + body = '<BODY>', # optional + async = False, # optional + path = '<PATH>', # optional + method = ExecutionMethod.GET, # optional + headers = {}, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..3e9e759d27 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_template_deployment( + function_id = '<FUNCTION_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-variable.md b/docs/examples/1.7.x/server-python/examples/functions/create-variable.md new file mode 100644 index 0000000000..0042674c86 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_variable( + function_id = '<FUNCTION_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..9f37b2c4bd --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_vcs_deployment( + function_id = '<FUNCTION_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/create.md b/docs/examples/1.7.x/server-python/examples/functions/create.md new file mode 100644 index 0000000000..811ee38c32 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/create.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..c31caeaaa4 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-python/examples/functions/delete-execution.md new file mode 100644 index 0000000000..ab7c9780c1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-python/examples/functions/delete-variable.md new file mode 100644 index 0000000000..fa982c8cec --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/delete.md b/docs/examples/1.7.x/server-python/examples/functions/delete.md new file mode 100644 index 0000000000..f362cf5130 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-python/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..6eaeeca47a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment_download( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 0000000000..af626afae7 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/get-execution.md b/docs/examples/1.7.x/server-python/examples/functions/get-execution.md new file mode 100644 index 0000000000..81af8f6056 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.get_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/get-variable.md b/docs/examples/1.7.x/server-python/examples/functions/get-variable.md new file mode 100644 index 0000000000..b6f9e8c8c9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/get.md b/docs/examples/1.7.x/server-python/examples/functions/get.md new file mode 100644 index 0000000000..9f0e83dd8c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 0000000000..ecd48340c1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_deployments( + function_id = '<FUNCTION_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/list-executions.md b/docs/examples/1.7.x/server-python/examples/functions/list-executions.md new file mode 100644 index 0000000000..ab4bb9fccf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.list_executions( + function_id = '<FUNCTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-python/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c69a096b34 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.7.x/server-python/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-python/examples/functions/list-specifications.md new file mode 100644 index 0000000000..389ed54b03 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.7.x/server-python/examples/functions/list-variables.md b/docs/examples/1.7.x/server-python/examples/functions/list-variables.md new file mode 100644 index 0000000000..d905f6b9f6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_variables( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/list.md b/docs/examples/1.7.x/server-python/examples/functions/list.md new file mode 100644 index 0000000000..3e42032d14 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-python/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..25f2eeea89 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_deployment_status( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-python/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..711c20f6d6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_function_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/update-variable.md b/docs/examples/1.7.x/server-python/examples/functions/update-variable.md new file mode 100644 index 0000000000..0b12b8029f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/functions/update.md b/docs/examples/1.7.x/server-python/examples/functions/update.md new file mode 100644 index 0000000000..ab4024da94 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/functions/update.md @@ -0,0 +1,30 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, # optional + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/graphql/mutation.md b/docs/examples/1.7.x/server-python/examples/graphql/mutation.md new file mode 100644 index 0000000000..9030e065a6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.mutation( + query = {} +) diff --git a/docs/examples/1.7.x/server-python/examples/graphql/query.md b/docs/examples/1.7.x/server-python/examples/graphql/query.md new file mode 100644 index 0000000000..d1d8511c93 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/graphql/query.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.query( + query = {} +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-python/examples/health/get-antivirus.md new file mode 100644 index 0000000000..3866841595 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-cache.md b/docs/examples/1.7.x/server-python/examples/health/get-cache.md new file mode 100644 index 0000000000..8975e84ec1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-cache.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_cache() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-certificate.md b/docs/examples/1.7.x/server-python/examples/health/get-certificate.md new file mode 100644 index 0000000000..064ee7b921 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_certificate( + domain = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-d-b.md b/docs/examples/1.7.x/server-python/examples/health/get-d-b.md new file mode 100644 index 0000000000..dc9e7d76e4 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_db() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-python/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..85643bba94 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.health import Health +from appwrite.enums import + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_failed_jobs( + name = .V1_DATABASE, + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-python/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..f0741bb411 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..5a5c815ae3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_builds( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..58fe03a1b3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_certificates( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..4b793bf25b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_databases( + name = '<NAME>', # optional + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..010391f660 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_deletes( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..7ffa0145e7 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_functions( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..caa5740306 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_logs( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..1166f51a71 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_mails( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..2f0419c7dc --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_messaging( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..e27ee0de82 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_migrations( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..1ba929c528 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_stats_resources( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..e7989f3bfb --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_stats_usage_dump( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..da4cd4772a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_usage( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-python/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..1f86040108 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_webhooks( + threshold = None # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-python/examples/health/get-storage-local.md new file mode 100644 index 0000000000..d0c04a21fb --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-storage.md b/docs/examples/1.7.x/server-python/examples/health/get-storage.md new file mode 100644 index 0000000000..5104804819 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-storage.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage() diff --git a/docs/examples/1.7.x/server-python/examples/health/get-time.md b/docs/examples/1.7.x/server-python/examples/health/get-time.md new file mode 100644 index 0000000000..83ab465393 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get-time.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_time() diff --git a/docs/examples/1.7.x/server-python/examples/health/get.md b/docs/examples/1.7.x/server-python/examples/health/get.md new file mode 100644 index 0000000000..3b8c88ae16 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/health/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get() diff --git a/docs/examples/1.7.x/server-python/examples/locale/get.md b/docs/examples/1.7.x/server-python/examples/locale/get.md new file mode 100644 index 0000000000..5a4249aaf1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.get() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-codes.md b/docs/examples/1.7.x/server-python/examples/locale/list-codes.md new file mode 100644 index 0000000000..2fef70dd46 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_codes() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-continents.md b/docs/examples/1.7.x/server-python/examples/locale/list-continents.md new file mode 100644 index 0000000000..9a741316e5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_continents() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-python/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e1910efa93 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-python/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..67cbad1aeb --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-countries.md b/docs/examples/1.7.x/server-python/examples/locale/list-countries.md new file mode 100644 index 0000000000..5471756f49 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-python/examples/locale/list-currencies.md new file mode 100644 index 0000000000..fb9b0a1f9e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.7.x/server-python/examples/locale/list-languages.md b/docs/examples/1.7.x/server-python/examples/locale/list-languages.md new file mode 100644 index 0000000000..19ada2b44d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_languages() diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..d20013b9a9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-email.md b/docs/examples/1.7.x/server-python/examples/messaging/create-email.md new file mode 100644 index 0000000000..a08094bff3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_email( + message_id = '<MESSAGE_ID>', + subject = '<SUBJECT>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + cc = [], # optional + bcc = [], # optional + attachments = [], # optional + draft = False, # optional + html = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..3df59be323 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + service_account_json = {}, # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6ab14d4345 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ed46985f1a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-push.md b/docs/examples/1.7.x/server-python/examples/messaging/create-push.md new file mode 100644 index 0000000000..5fbc81ef11 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_push( + message_id = '<MESSAGE_ID>', + title = '<TITLE>', # optional + body = '<BODY>', # optional + topics = [], # optional + users = [], # optional + targets = [], # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..b762eaf39b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-python/examples/messaging/create-sms.md new file mode 100644 index 0000000000..3f2325b747 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sms( + message_id = '<MESSAGE_ID>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..0c1fbf6167 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + host = '<HOST>', + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-python/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..15b9ee8340 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.create_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..c2300b7a88 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..ffbde1c16e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-python/examples/messaging/create-topic.md new file mode 100644 index 0000000000..f59aa85bbf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..4bb77fb8b1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..5496e3af21 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..21a6794549 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-python/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..5c2e45b997 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.delete_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-python/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..29b4ab8ddd --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/delete.md b/docs/examples/1.7.x/server-python/examples/messaging/delete.md new file mode 100644 index 0000000000..9675ea1d9d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/get-message.md b/docs/examples/1.7.x/server-python/examples/messaging/get-message.md new file mode 100644 index 0000000000..79e57af262 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_message( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/get-provider.md new file mode 100644 index 0000000000..f7a8d6aa2a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-python/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..9dcf78b151 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-python/examples/messaging/get-topic.md new file mode 100644 index 0000000000..f31daf745a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-python/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f2a9b187c3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_message_logs( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-python/examples/messaging/list-messages.md new file mode 100644 index 0000000000..de180acb2c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_messages( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-python/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0e1a9c4287 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_provider_logs( + provider_id = '<PROVIDER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-python/examples/messaging/list-providers.md new file mode 100644 index 0000000000..3cc2a42e3e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_providers( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-python/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..049030d203 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscriber_logs( + subscriber_id = '<SUBSCRIBER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-python/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a28403671d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscribers( + topic_id = '<TOPIC_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-python/examples/messaging/list-targets.md new file mode 100644 index 0000000000..ac79043632 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_targets( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-python/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..d9d257a720 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topic_logs( + topic_id = '<TOPIC_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-python/examples/messaging/list-topics.md new file mode 100644 index 0000000000..22d718ea31 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topics( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..6820ad47a0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-email.md b/docs/examples/1.7.x/server-python/examples/messaging/update-email.md new file mode 100644 index 0000000000..2e43f98657 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_email( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional + draft = False, # optional + html = False, # optional + cc = [], # optional + bcc = [], # optional + scheduled_at = '', # optional + attachments = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..3093b9df63 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + service_account_json = {} # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..2ef8573391 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + enabled = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..bdeefba867 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-push.md b/docs/examples/1.7.x/server-python/examples/messaging/update-push.md new file mode 100644 index 0000000000..0cd1a8b0bf --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_push( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + title = '<TITLE>', # optional + body = '<BODY>', # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..6eb434bf27 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-python/examples/messaging/update-sms.md new file mode 100644 index 0000000000..7591875a97 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sms( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + content = '<CONTENT>', # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0dd1126b14 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + host = '<HOST>', # optional + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..708156c52b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..7dec3d0a9e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-python/examples/messaging/update-topic.md new file mode 100644 index 0000000000..382e7a4434 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', # optional + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..be74c1a875 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-python/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..3106917519 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/create-deployment.md new file mode 100644 index 0000000000..1dde044ee7 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_deployment( + site_id = '<SITE_ID>', + code = InputFile.from_path('file.png'), + activate = False, + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..03a54b5b89 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_duplicate_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..ecd1c0741b --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_template_deployment( + site_id = '<SITE_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create-variable.md b/docs/examples/1.7.x/server-python/examples/sites/create-variable.md new file mode 100644 index 0000000000..b5c1d78cc9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_variable( + site_id = '<SITE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..642c5061d7 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_vcs_deployment( + site_id = '<SITE_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/create.md b/docs/examples/1.7.x/server-python/examples/sites/create.md new file mode 100644 index 0000000000..1965e04718 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/create.md @@ -0,0 +1,32 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import +from appwrite.enums import + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + build_runtime = .NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + adapter = .STATIC, # optional + installation_id = '<INSTALLATION_ID>', # optional + fallback_file = '<FALLBACK_FILE>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..90cd2bf713 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/delete-log.md b/docs/examples/1.7.x/server-python/examples/sites/delete-log.md new file mode 100644 index 0000000000..a70625144a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-python/examples/sites/delete-variable.md new file mode 100644 index 0000000000..b86ca4de2a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/delete.md b/docs/examples/1.7.x/server-python/examples/sites/delete.md new file mode 100644 index 0000000000..0a48204af0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-python/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..a29081bae0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment_download( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/get-deployment.md new file mode 100644 index 0000000000..b5bf868296 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/get-log.md b/docs/examples/1.7.x/server-python/examples/sites/get-log.md new file mode 100644 index 0000000000..967ba805ca --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/get-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/get-variable.md b/docs/examples/1.7.x/server-python/examples/sites/get-variable.md new file mode 100644 index 0000000000..c113a254e0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/get.md b/docs/examples/1.7.x/server-python/examples/sites/get.md new file mode 100644 index 0000000000..034554ec55 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-python/examples/sites/list-deployments.md new file mode 100644 index 0000000000..c847efa1d1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_deployments( + site_id = '<SITE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-python/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..d6f851ad27 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.7.x/server-python/examples/sites/list-logs.md b/docs/examples/1.7.x/server-python/examples/sites/list-logs.md new file mode 100644 index 0000000000..c12fe8598f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_logs( + site_id = '<SITE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-python/examples/sites/list-specifications.md new file mode 100644 index 0000000000..87abe98d66 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.7.x/server-python/examples/sites/list-variables.md b/docs/examples/1.7.x/server-python/examples/sites/list-variables.md new file mode 100644 index 0000000000..043c38ec61 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_variables( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/list.md b/docs/examples/1.7.x/server-python/examples/sites/list.md new file mode 100644 index 0000000000..f386f7da9e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-python/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..f394fa0a87 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_deployment_status( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-python/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..2c1fe0925a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_site_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/update-variable.md b/docs/examples/1.7.x/server-python/examples/sites/update-variable.md new file mode 100644 index 0000000000..dfa661a8da --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/sites/update.md b/docs/examples/1.7.x/server-python/examples/sites/update.md new file mode 100644 index 0000000000..68aa2cbc72 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/sites/update.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + build_runtime = .NODE_14_5, # optional + adapter = .STATIC, # optional + fallback_file = '<FALLBACK_FILE>', # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a45a270c24 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.create_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/create-file.md b/docs/examples/1.7.x/server-python/examples/storage/create-file.md new file mode 100644 index 0000000000..844d690590 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/create-file.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.create_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + file = InputFile.from_path('file.png'), + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..d0dec80cb9 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.delete_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/delete-file.md b/docs/examples/1.7.x/server-python/examples/storage/delete-file.md new file mode 100644 index 0000000000..7d01f3187e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.delete_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 0000000000..1a9e278352 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.get_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 0000000000..708b798933 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_download( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c27e74b516 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_preview( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + width = 0, # optional + height = 0, # optional + gravity = ImageGravity.CENTER, # optional + quality = 0, # optional + border_width = 0, # optional + border_color = '', # optional + border_radius = 0, # optional + opacity = 0, # optional + rotation = -360, # optional + background = '', # optional + output = ImageFormat.JPG # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 0000000000..bcad3c32a1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_view( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file.md b/docs/examples/1.7.x/server-python/examples/storage/get-file.md new file mode 100644 index 0000000000..6ebe332352 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 0000000000..d0dfd4dad5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.list_buckets( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/list-files.md b/docs/examples/1.7.x/server-python/examples/storage/list-files.md new file mode 100644 index 0000000000..304615d939 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/list-files.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.list_files( + bucket_id = '<BUCKET_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 0000000000..6f8c708c1f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.update_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/storage/update-file.md b/docs/examples/1.7.x/server-python/examples/storage/update-file.md new file mode 100644 index 0000000000..327c1f2195 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/storage/update-file.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.update_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + name = '<NAME>', # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/create-membership.md b/docs/examples/1.7.x/server-python/examples/teams/create-membership.md new file mode 100644 index 0000000000..38b1b8eaee --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create_membership( + team_id = '<TEAM_ID>', + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/create.md b/docs/examples/1.7.x/server-python/examples/teams/create.md new file mode 100644 index 0000000000..c42036a8f6 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create( + team_id = '<TEAM_ID>', + name = '<NAME>', + roles = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 0000000000..24090cc7c3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/delete.md b/docs/examples/1.7.x/server-python/examples/teams/delete.md new file mode 100644 index 0000000000..61e05a0e1a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/get-membership.md b/docs/examples/1.7.x/server-python/examples/teams/get-membership.md new file mode 100644 index 0000000000..c2f29ac85c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-python/examples/teams/get-prefs.md new file mode 100644 index 0000000000..7633625a9a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_prefs( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/get.md b/docs/examples/1.7.x/server-python/examples/teams/get.md new file mode 100644 index 0000000000..fcdb812c85 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-python/examples/teams/list-memberships.md new file mode 100644 index 0000000000..8e73d5156a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list_memberships( + team_id = '<TEAM_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/list.md b/docs/examples/1.7.x/server-python/examples/teams/list.md new file mode 100644 index 0000000000..4ecdb74947 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..b702e8d07c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership_status( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/update-membership.md b/docs/examples/1.7.x/server-python/examples/teams/update-membership.md new file mode 100644 index 0000000000..42d9e2a654 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/update-name.md b/docs/examples/1.7.x/server-python/examples/teams/update-name.md new file mode 100644 index 0000000000..6c0eedd8e1 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_name( + team_id = '<TEAM_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.7.x/server-python/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-python/examples/teams/update-prefs.md new file mode 100644 index 0000000000..c25371b623 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_prefs( + team_id = '<TEAM_ID>', + prefs = {} +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..1b63a96395 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.create_file_token( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + expire = '', # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/delete.md b/docs/examples/1.7.x/server-python/examples/tokens/delete.md new file mode 100644 index 0000000000..c3b3f4f218 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-python/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..6e7ad9745f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.get_jwt( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/get.md b/docs/examples/1.7.x/server-python/examples/tokens/get.md new file mode 100644 index 0000000000..8000bbb6b2 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.get( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/list.md b/docs/examples/1.7.x/server-python/examples/tokens/list.md new file mode 100644 index 0000000000..45a3e81a78 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.list( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/update.md b/docs/examples/1.7.x/server-python/examples/tokens/update.md new file mode 100644 index 0000000000..9f489bbe45 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/tokens/update.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tokens = Tokens(client) + +result = tokens.update( + token_id = '<TOKEN_ID>', + expire = '', # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-python/examples/users/create-argon2user.md new file mode 100644 index 0000000000..f4b2cdf1cd --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_argon2_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-python/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..2f197003b0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_bcrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-python/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..56d4c3d16e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_jwt( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>', # optional + duration = 0 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-python/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..8efd90f180 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_md5_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..6f694cbfd3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-python/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..f6b0dbc586 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_ph_pass_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-python/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..39f59a280d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_sha_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_version = PasswordHash.SHA1, # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..4a9aaf8663 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_modified_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_salt_separator = '<PASSWORD_SALT_SEPARATOR>', + password_signer_key = '<PASSWORD_SIGNER_KEY>', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-python/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..c1d646d571 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_cpu = None, + password_memory = None, + password_parallel = None, + password_length = None, + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-session.md b/docs/examples/1.7.x/server-python/examples/users/create-session.md new file mode 100644 index 0000000000..36f2dfcc5f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_session( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-target.md b/docs/examples/1.7.x/server-python/examples/users/create-target.md new file mode 100644 index 0000000000..fdf99e8c9a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-target.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import MessagingProviderType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + provider_type = MessagingProviderType.EMAIL, + identifier = '<IDENTIFIER>', + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create-token.md b/docs/examples/1.7.x/server-python/examples/users/create-token.md new file mode 100644 index 0000000000..f96e9ded04 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_token( + user_id = '<USER_ID>', + length = 4, # optional + expire = 60 # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/create.md b/docs/examples/1.7.x/server-python/examples/users/create.md new file mode 100644 index 0000000000..d8371d4480 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/create.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create( + user_id = '<USER_ID>', + email = 'email@example.com', # optional + phone = '+12065550100', # optional + password = '', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete-identity.md b/docs/examples/1.7.x/server-python/examples/users/delete-identity.md new file mode 100644 index 0000000000..8806752f97 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-python/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..8bb236553c --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_mfa_authenticator( + user_id = '<USER_ID>', + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete-session.md b/docs/examples/1.7.x/server-python/examples/users/delete-session.md new file mode 100644 index 0000000000..e1a41be130 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_session( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 0000000000..f827221cdd --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete-target.md b/docs/examples/1.7.x/server-python/examples/users/delete-target.md new file mode 100644 index 0000000000..97fcaf2cee --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/delete.md b/docs/examples/1.7.x/server-python/examples/users/delete.md new file mode 100644 index 0000000000..501953feb5 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..2302b9d76e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/get-prefs.md b/docs/examples/1.7.x/server-python/examples/users/get-prefs.md new file mode 100644 index 0000000000..0624ec9597 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_prefs( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/get-target.md b/docs/examples/1.7.x/server-python/examples/users/get-target.md new file mode 100644 index 0000000000..f1d3e8bc64 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/get-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/get.md b/docs/examples/1.7.x/server-python/examples/users/get.md new file mode 100644 index 0000000000..5e5b871ea3 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-identities.md b/docs/examples/1.7.x/server-python/examples/users/list-identities.md new file mode 100644 index 0000000000..5339763435 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-identities.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_identities( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-logs.md b/docs/examples/1.7.x/server-python/examples/users/list-logs.md new file mode 100644 index 0000000000..703407a88a --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_logs( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-memberships.md b/docs/examples/1.7.x/server-python/examples/users/list-memberships.md new file mode 100644 index 0000000000..ba983ffaa0 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_memberships( + user_id = '<USER_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-python/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..eaf5a45979 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_mfa_factors( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-sessions.md b/docs/examples/1.7.x/server-python/examples/users/list-sessions.md new file mode 100644 index 0000000000..9e8db05bc7 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list-targets.md b/docs/examples/1.7.x/server-python/examples/users/list-targets.md new file mode 100644 index 0000000000..dfcad18136 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_targets( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/list.md b/docs/examples/1.7.x/server-python/examples/users/list.md new file mode 100644 index 0000000000..6c9f98f496 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-python/examples/users/update-email-verification.md new file mode 100644 index 0000000000..094bcd76fe --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email_verification( + user_id = '<USER_ID>', + email_verification = False +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-email.md b/docs/examples/1.7.x/server-python/examples/users/update-email.md new file mode 100644 index 0000000000..c4a522fce4 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email( + user_id = '<USER_ID>', + email = 'email@example.com' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-labels.md b/docs/examples/1.7.x/server-python/examples/users/update-labels.md new file mode 100644 index 0000000000..8bf3a2384f --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-labels.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_labels( + user_id = '<USER_ID>', + labels = [] +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-python/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..f6b1d1fb1d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-mfa.md b/docs/examples/1.7.x/server-python/examples/users/update-mfa.md new file mode 100644 index 0000000000..661c8179a2 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa( + user_id = '<USER_ID>', + mfa = False +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-name.md b/docs/examples/1.7.x/server-python/examples/users/update-name.md new file mode 100644 index 0000000000..0a6817adc2 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_name( + user_id = '<USER_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-password.md b/docs/examples/1.7.x/server-python/examples/users/update-password.md new file mode 100644 index 0000000000..a1cfbe0a6e --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_password( + user_id = '<USER_ID>', + password = '' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-python/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..e3d4ba3263 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone_verification( + user_id = '<USER_ID>', + phone_verification = False +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-phone.md b/docs/examples/1.7.x/server-python/examples/users/update-phone.md new file mode 100644 index 0000000000..ac5392715d --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone( + user_id = '<USER_ID>', + number = '+12065550100' +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-prefs.md b/docs/examples/1.7.x/server-python/examples/users/update-prefs.md new file mode 100644 index 0000000000..93b02bbd17 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_prefs( + user_id = '<USER_ID>', + prefs = {} +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-status.md b/docs/examples/1.7.x/server-python/examples/users/update-status.md new file mode 100644 index 0000000000..19a1df3151 --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_status( + user_id = '<USER_ID>', + status = False +) diff --git a/docs/examples/1.7.x/server-python/examples/users/update-target.md b/docs/examples/1.7.x/server-python/examples/users/update-target.md new file mode 100644 index 0000000000..f9fdd271fb --- /dev/null +++ b/docs/examples/1.7.x/server-python/examples/users/update-target.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://example.com/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + identifier = '<IDENTIFIER>', # optional + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.7.x/server-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "factor": "email" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..51b1126cc1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,6 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "phone": "+12065550100" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.7.x/server-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-session.md b/docs/examples/1.7.x/server-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create-verification.md b/docs/examples/1.7.x/server-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/create.md b/docs/examples/1.7.x/server-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.7.x/server-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/delete-session.md b/docs/examples/1.7.x/server-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..d2f0d71aac --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.7.x/server-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..f8bda5317f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/get-prefs.md @@ -0,0 +1,8 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/get-session.md b/docs/examples/1.7.x/server-rest/examples/account/get-session.md new file mode 100644 index 0000000000..988066a253 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/get-session.md @@ -0,0 +1,8 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/get.md b/docs/examples/1.7.x/server-rest/examples/account/get.md new file mode 100644 index 0000000000..b0fd14b3ef --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/get.md @@ -0,0 +1,8 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/list-identities.md b/docs/examples/1.7.x/server-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..d6b36b373c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/list-identities.md @@ -0,0 +1,8 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/list-logs.md b/docs/examples/1.7.x/server-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..7267345856 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/list-logs.md @@ -0,0 +1,8 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e7eb7fe61b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,8 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.7.x/server-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..04c9045def --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/list-sessions.md @@ -0,0 +1,8 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-email.md b/docs/examples/1.7.x/server-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "mfa": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "otp": "<OTP>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "challengeId": "<CHALLENGE_ID>", + "otp": "<OTP>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-name.md b/docs/examples/1.7.x/server-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-password.md b/docs/examples/1.7.x/server-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-phone.md b/docs/examples/1.7.x/server-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.7.x/server-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.7.x/server-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>", + "password": +} diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-session.md b/docs/examples/1.7.x/server-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-status.md b/docs/examples/1.7.x/server-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/account/update-verification.md b/docs/examples/1.7.x/server-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..78cfa7a539 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-browser.md @@ -0,0 +1,9 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..5c64ef0c23 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,9 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..27e526280a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-favicon.md @@ -0,0 +1,9 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..390c560710 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-flag.md @@ -0,0 +1,9 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..4a1694df40 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-image.md @@ -0,0 +1,9 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..f317b46116 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-initials.md @@ -0,0 +1,9 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..0c879e782a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/avatars/get-q-r.md @@ -0,0 +1,9 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8ae6c2d9ff --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-boolean-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.7.x/server-rest/examples/databases/create-collection.md new file mode 100644 index 0000000000..ea298e3706 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..6ec4b332a5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-datetime-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-document.md b/docs/examples/1.7.x/server-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..a5c25315c2 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-document.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "documentId": "<DOCUMENT_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..0fb7aa2814 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-email-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..ba033a02ce --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..ee8cb7497f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-float-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-index.md b/docs/examples/1.7.x/server-rest/examples/databases/create-index.md new file mode 100644 index 0000000000..f90876934b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-index.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "attributes": [], + "orders": [] +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..721f10e0c7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-integer-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..61378e6780 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-ip-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c519a4a494 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-relationship-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedCollectionId": "<RELATED_COLLECTION_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..7a5eafdf2a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-string-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..ea4d76ce06 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-url-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create.md b/docs/examples/1.7.x/server-rest/examples/databases/create.md new file mode 100644 index 0000000000..dab52ff67c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/create.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8b7f1eee07 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/delete-attribute.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-rest/examples/databases/delete-collection.md new file mode 100644 index 0000000000..153b3a2bdd --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/delete-collection.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.7.x/server-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..ca093c9177 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.7.x/server-rest/examples/databases/delete-index.md new file mode 100644 index 0000000000..9c27a6fd4c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/delete.md b/docs/examples/1.7.x/server-rest/examples/databases/delete.md new file mode 100644 index 0000000000..19cf58549a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/get-attribute.md new file mode 100644 index 0000000000..70f7756265 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/get-attribute.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.7.x/server-rest/examples/databases/get-collection.md new file mode 100644 index 0000000000..6d4a4f7842 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/get-collection.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/get-document.md b/docs/examples/1.7.x/server-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..05e8f01d54 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/get-document.md @@ -0,0 +1,9 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/get-index.md b/docs/examples/1.7.x/server-rest/examples/databases/get-index.md new file mode 100644 index 0000000000..895cf7c8df --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/get-index.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/get.md b/docs/examples/1.7.x/server-rest/examples/databases/get.md new file mode 100644 index 0000000000..4540de5871 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/get.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-rest/examples/databases/list-attributes.md new file mode 100644 index 0000000000..bc37efb914 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/list-attributes.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.7.x/server-rest/examples/databases/list-collections.md new file mode 100644 index 0000000000..53ae6b276b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/list-collections.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.7.x/server-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..493cb0952e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/list-documents.md @@ -0,0 +1,9 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-rest/examples/databases/list-indexes.md new file mode 100644 index 0000000000..b1bd6ae559 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/list-indexes.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/list.md b/docs/examples/1.7.x/server-rest/examples/databases/list.md new file mode 100644 index 0000000000..2b773cdcd5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/list.md @@ -0,0 +1,7 @@ +GET /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..7a2ae34ce9 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-boolean-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.7.x/server-rest/examples/databases/update-collection.md new file mode 100644 index 0000000000..4cba7f5230 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-collection.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..c9685e6c89 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-datetime-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-document.md b/docs/examples/1.7.x/server-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..19b25bdf45 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-document.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..eece253459 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-email-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..47ef168090 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-enum-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..bb35f3450c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-float-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..96290f4313 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-integer-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..9e3cf7d4b5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-ip-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..645e8f8ae4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-relationship-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..650b6f1b8b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-string-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-rest/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..8409285677 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update-url-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.7.x/server-rest/examples/databases/update.md b/docs/examples/1.7.x/server-rest/examples/databases/update.md new file mode 100644 index 0000000000..02efbf5270 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/databases/update.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5d65eff5fd --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="entrypoint" + +"<ENTRYPOINT>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="commands" + +"<COMMANDS>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..898117c117 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,11 @@ +POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>", + "buildId": "<BUILD_ID>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.7.x/server-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..5a4c7667cf --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "body": "<BODY>", + "async": false, + "path": "<PATH>", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..656c2e2a27 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/functions/{functionId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.7.x/server-rest/examples/functions/create-variable.md new file mode 100644 index 0000000000..7251a3a352 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..1b5267ca14 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/create.md b/docs/examples/1.7.x/server-rest/examples/functions/create.md new file mode 100644 index 0000000000..c5f364ad63 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/create.md @@ -0,0 +1,27 @@ +POST /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "functionId": "<FUNCTION_ID>", + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..b70f282167 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-rest/examples/functions/delete-execution.md new file mode 100644 index 0000000000..fb26ae47aa --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/delete-execution.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-rest/examples/functions/delete-variable.md new file mode 100644 index 0000000000..aa01835ae4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/delete.md b/docs/examples/1.7.x/server-rest/examples/functions/delete.md new file mode 100644 index 0000000000..9f9ab74019 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-rest/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..ade6d5d81c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/get-deployment-download.md @@ -0,0 +1,8 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/get-deployment.md new file mode 100644 index 0000000000..2fec848d26 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/get-deployment.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.7.x/server-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..156945212b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/get-execution.md @@ -0,0 +1,9 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.7.x/server-rest/examples/functions/get-variable.md new file mode 100644 index 0000000000..3a106bac75 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/get-variable.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/get.md b/docs/examples/1.7.x/server-rest/examples/functions/get.md new file mode 100644 index 0000000000..c5ab3bfd68 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/get.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-rest/examples/functions/list-deployments.md new file mode 100644 index 0000000000..2b01715876 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list-deployments.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.7.x/server-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..3f2b222cb9 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list-executions.md @@ -0,0 +1,9 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-rest/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b9a4b7fa3e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list-runtimes.md @@ -0,0 +1,7 @@ +GET /v1/functions/runtimes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-rest/examples/functions/list-specifications.md new file mode 100644 index 0000000000..867d7330ce --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list-specifications.md @@ -0,0 +1,7 @@ +GET /v1/functions/specifications HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.7.x/server-rest/examples/functions/list-variables.md new file mode 100644 index 0000000000..9a0e4f41f5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list-variables.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/list.md b/docs/examples/1.7.x/server-rest/examples/functions/list.md new file mode 100644 index 0000000000..9768146b59 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/list.md @@ -0,0 +1,7 @@ +GET /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-rest/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..8788e21c2b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-rest/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..1f89f35da0 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/update-function-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/functions/{functionId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.7.x/server-rest/examples/functions/update-variable.md new file mode 100644 index 0000000000..36ae244548 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/functions/update.md b/docs/examples/1.7.x/server-rest/examples/functions/update.md new file mode 100644 index 0000000000..ee3b8b8c6d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/functions/update.md @@ -0,0 +1,26 @@ +PUT /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.7.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.7.x/server-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..7d58d77ede --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/graphql/query.md b/docs/examples/1.7.x/server-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8b87cd9f33 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/graphql/query.md @@ -0,0 +1,13 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-rest/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2cf25ab004 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-antivirus.md @@ -0,0 +1,7 @@ +GET /v1/health/anti-virus HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-cache.md b/docs/examples/1.7.x/server-rest/examples/health/get-cache.md new file mode 100644 index 0000000000..97a16398b5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-cache.md @@ -0,0 +1,7 @@ +GET /v1/health/cache HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.7.x/server-rest/examples/health/get-certificate.md new file mode 100644 index 0000000000..f4d557a0bb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-certificate.md @@ -0,0 +1,7 @@ +GET /v1/health/certificate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.7.x/server-rest/examples/health/get-d-b.md new file mode 100644 index 0000000000..1bff913d25 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-d-b.md @@ -0,0 +1,7 @@ +GET /v1/health/db HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-rest/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..bb722dc864 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-failed-jobs.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/failed/{name} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-rest/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..af93d95fae --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-pub-sub.md @@ -0,0 +1,7 @@ +GET /v1/health/pubsub HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..9f73fac5f8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-builds.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/builds HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..45c44427a7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-certificates.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/certificates HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ba7dcf322f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-databases.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..ff0ebfbaa4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-deletes.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/deletes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..1e315fcb42 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-functions.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/functions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..d4467c571a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-logs.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..82e159be32 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-mails.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/mails HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..aa61e08979 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-messaging.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/messaging HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..6d87f3982b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-migrations.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/migrations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..09dc085a73 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-resources.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/stats-resources HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..d895643da4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/stats-usage-dump HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..59db4f7ba4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-usage.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/stats-usage HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-rest/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..b2ea697d26 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-queue-webhooks.md @@ -0,0 +1,7 @@ +GET /v1/health/queue/webhooks HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-rest/examples/health/get-storage-local.md new file mode 100644 index 0000000000..d9c38be690 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-storage-local.md @@ -0,0 +1,7 @@ +GET /v1/health/storage/local HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-storage.md b/docs/examples/1.7.x/server-rest/examples/health/get-storage.md new file mode 100644 index 0000000000..7d7ef2821b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-storage.md @@ -0,0 +1,7 @@ +GET /v1/health/storage HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get-time.md b/docs/examples/1.7.x/server-rest/examples/health/get-time.md new file mode 100644 index 0000000000..887a1e5ea7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get-time.md @@ -0,0 +1,7 @@ +GET /v1/health/time HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/health/get.md b/docs/examples/1.7.x/server-rest/examples/health/get.md new file mode 100644 index 0000000000..7e744d1565 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/health/get.md @@ -0,0 +1,7 @@ +GET /v1/health HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/get.md b/docs/examples/1.7.x/server-rest/examples/locale/get.md new file mode 100644 index 0000000000..d20f329145 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/get.md @@ -0,0 +1,9 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.7.x/server-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..01699b6f5c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.7.x/server-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..bfb96f1a9d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..1032d4f48b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..fc94672d66 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,9 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.7.x/server-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..a783dfc813 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..770b1b8c53 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-currencies.md @@ -0,0 +1,9 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.7.x/server-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..c91359a461 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/locale/list-languages.md @@ -0,0 +1,9 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b6860358c1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-apns-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/apns HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false, + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-email.md new file mode 100644 index 0000000000..efec44982c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-email.md @@ -0,0 +1,21 @@ +POST /v1/messaging/messages/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "cc": [], + "bcc": [], + "attachments": [], + "draft": false, + "html": false, + "scheduledAt": +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..ec885465a7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-fcm-provider.md @@ -0,0 +1,13 @@ +POST /v1/messaging/providers/fcm HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "serviceAccountJSON": {}, + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..8d0eb33938 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,19 @@ +POST /v1/messaging/providers/mailgun HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..2877ff7b89 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-msg91provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/msg91 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-push.md new file mode 100644 index 0000000000..6210273820 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-push.md @@ -0,0 +1,28 @@ +POST /v1/messaging/messages/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "title": "<TITLE>", + "body": "<BODY>", + "topics": [], + "users": [], + "targets": [], + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..a9f7c933dc --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/sendgrid HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-sms.md new file mode 100644 index 0000000000..f885563f6f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-sms.md @@ -0,0 +1,16 @@ +POST /v1/messaging/messages/sms HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..bbb8e7d212 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-smtp-provider.md @@ -0,0 +1,23 @@ +POST /v1/messaging/providers/smtp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2e61d50b5c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "subscriberId": "<SUBSCRIBER_ID>", + "targetId": "<TARGET_ID>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..198ccae6f5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-telesign-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/telesign HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..2f2ce558a7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/textmagic HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-topic.md new file mode 100644 index 0000000000..a44af2764d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-topic.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topicId": "<TOPIC_ID>", + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..61fd63b52e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-twilio-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/twilio HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..16d1c6b594 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/create-vonage-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/vonage HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..e25c3dcc1c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..b988897d60 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,9 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-rest/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..3c5c8a9cdb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/delete.md b/docs/examples/1.7.x/server-rest/examples/messaging/delete.md new file mode 100644 index 0000000000..a918c2b6f8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.7.x/server-rest/examples/messaging/get-message.md new file mode 100644 index 0000000000..da0694972b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/get-message.md @@ -0,0 +1,7 @@ +GET /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/get-provider.md new file mode 100644 index 0000000000..3b583dbc35 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/get-provider.md @@ -0,0 +1,7 @@ +GET /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-rest/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..1f8882925e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/get-subscriber.md @@ -0,0 +1,7 @@ +GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-rest/examples/messaging/get-topic.md new file mode 100644 index 0000000000..54e6818a04 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/get-topic.md @@ -0,0 +1,7 @@ +GET /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..851567c480 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-message-logs.md @@ -0,0 +1,7 @@ +GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-messages.md new file mode 100644 index 0000000000..3624576b61 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-messages.md @@ -0,0 +1,7 @@ +GET /v1/messaging/messages HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..29344852d6 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-provider-logs.md @@ -0,0 +1,7 @@ +GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-providers.md new file mode 100644 index 0000000000..89c13101af --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-providers.md @@ -0,0 +1,7 @@ +GET /v1/messaging/providers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..a61bfd3bae --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,7 @@ +GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..401529027a --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-subscribers.md @@ -0,0 +1,7 @@ +GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-targets.md new file mode 100644 index 0000000000..7394b7bfc1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-targets.md @@ -0,0 +1,7 @@ +GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..ffecb3425d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-topic-logs.md @@ -0,0 +1,7 @@ +GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-rest/examples/messaging/list-topics.md new file mode 100644 index 0000000000..c9f8f18200 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/list-topics.md @@ -0,0 +1,7 @@ +GET /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..a398b186cb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-apns-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-email.md new file mode 100644 index 0000000000..0ef5b89409 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-email.md @@ -0,0 +1,20 @@ +PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "draft": false, + "html": false, + "cc": [], + "bcc": [], + "scheduledAt": , + "attachments": [] +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..50e3a5400d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-fcm-provider.md @@ -0,0 +1,12 @@ +PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "serviceAccountJSON": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f05f0057e7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,18 @@ +PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "enabled": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..1c88425fc1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-msg91provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-push.md new file mode 100644 index 0000000000..adf269301c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-push.md @@ -0,0 +1,27 @@ +PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "title": "<TITLE>", + "body": "<BODY>", + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..28ffb526f8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-sms.md new file mode 100644 index 0000000000..b5ad82d0f9 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-sms.md @@ -0,0 +1,15 @@ +PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "content": "<CONTENT>", + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..8e69659ce1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-smtp-provider.md @@ -0,0 +1,22 @@ +PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>", + "enabled": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..548d39dc92 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-telesign-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..724b0a4afe --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-topic.md new file mode 100644 index 0000000000..add0bf8ee4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-topic.md @@ -0,0 +1,11 @@ +PATCH /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..38730383b1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-twilio-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "from": "<FROM>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-rest/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..8c284c827f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/messaging/update-vonage-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "from": "<FROM>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/create-deployment.md new file mode 100644 index 0000000000..554d2a5365 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create-deployment.md @@ -0,0 +1,35 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="installCommand" + +"<INSTALL_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="buildCommand" + +"<BUILD_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="outputDirectory" + +"<OUTPUT_DIRECTORY>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3da246715b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,10 @@ +POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..e37819bfb2 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/sites/{siteId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.7.x/server-rest/examples/sites/create-variable.md new file mode 100644 index 0000000000..73217d198c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..7d5fd3e92e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/create.md b/docs/examples/1.7.x/server-rest/examples/sites/create.md new file mode 100644 index 0000000000..5493e9d2b6 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/create.md @@ -0,0 +1,27 @@ +POST /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "siteId": "<SITE_ID>", + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "installationId": "<INSTALLATION_ID>", + "fallbackFile": "<FALLBACK_FILE>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..35bac59efc --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.7.x/server-rest/examples/sites/delete-log.md new file mode 100644 index 0000000000..0bd2f661cf --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/delete-log.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-rest/examples/sites/delete-variable.md new file mode 100644 index 0000000000..c3f1d2d293 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/delete.md b/docs/examples/1.7.x/server-rest/examples/sites/delete.md new file mode 100644 index 0000000000..cdb4ced577 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-rest/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..f26f155ec3 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/get-deployment-download.md @@ -0,0 +1,8 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/get-deployment.md new file mode 100644 index 0000000000..0249bf5d0b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/get-deployment.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/get-log.md b/docs/examples/1.7.x/server-rest/examples/sites/get-log.md new file mode 100644 index 0000000000..c9f5c017a6 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/get-log.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.7.x/server-rest/examples/sites/get-variable.md new file mode 100644 index 0000000000..3293a07a42 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/get-variable.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/get.md b/docs/examples/1.7.x/server-rest/examples/sites/get.md new file mode 100644 index 0000000000..bb60ffdb26 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/get.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-rest/examples/sites/list-deployments.md new file mode 100644 index 0000000000..07e3723f73 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list-deployments.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-rest/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..092c63f3bb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list-frameworks.md @@ -0,0 +1,7 @@ +GET /v1/sites/frameworks HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.7.x/server-rest/examples/sites/list-logs.md new file mode 100644 index 0000000000..b59f2251f4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list-logs.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-rest/examples/sites/list-specifications.md new file mode 100644 index 0000000000..39d09ba228 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list-specifications.md @@ -0,0 +1,7 @@ +GET /v1/sites/specifications HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.7.x/server-rest/examples/sites/list-variables.md new file mode 100644 index 0000000000..f5731b95ee --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list-variables.md @@ -0,0 +1,7 @@ +GET /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/list.md b/docs/examples/1.7.x/server-rest/examples/sites/list.md new file mode 100644 index 0000000000..76453922f9 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/list.md @@ -0,0 +1,7 @@ +GET /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-rest/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..697d9ac371 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-rest/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..51d8736df5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/update-site-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/sites/{siteId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.7.x/server-rest/examples/sites/update-variable.md new file mode 100644 index 0000000000..61902ee02f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/sites/update.md b/docs/examples/1.7.x/server-rest/examples/sites/update.md new file mode 100644 index 0000000000..ab3c4dddd1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/sites/update.md @@ -0,0 +1,26 @@ +PUT /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "fallbackFile": "<FALLBACK_FILE>", + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.7.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-rest/examples/storage/create-bucket.md new file mode 100644 index 0000000000..8ca9c5701b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/create-bucket.md @@ -0,0 +1,19 @@ +POST /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "bucketId": "<BUCKET_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/storage/create-file.md b/docs/examples/1.7.x/server-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..e8a54e723b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/create-file.md @@ -0,0 +1,27 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"<FILE_ID>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.7.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-rest/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3db8bfbb72 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.7.x/server-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..cc8a2481f7 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/delete-file.md @@ -0,0 +1,9 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-rest/examples/storage/get-bucket.md new file mode 100644 index 0000000000..fc886cf9c0 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/get-bucket.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..d00c5f6ab9 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/get-file-download.md @@ -0,0 +1,9 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..aaf1539869 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/get-file-preview.md @@ -0,0 +1,9 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..136a00569b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/get-file-view.md @@ -0,0 +1,9 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/get-file.md b/docs/examples/1.7.x/server-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..a9876808ae --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/get-file.md @@ -0,0 +1,9 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-rest/examples/storage/list-buckets.md new file mode 100644 index 0000000000..741418dd74 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/list-buckets.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/list-files.md b/docs/examples/1.7.x/server-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..0314f4c0f2 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/list-files.md @@ -0,0 +1,9 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-rest/examples/storage/update-bucket.md new file mode 100644 index 0000000000..adf12647e2 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/update-bucket.md @@ -0,0 +1,18 @@ +PUT /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/storage/update-file.md b/docs/examples/1.7.x/server-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..d91ab4c2d6 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/storage/update-file.md @@ -0,0 +1,13 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.7.x/server-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..f52f796d90 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "userId": "<USER_ID>", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/create.md b/docs/examples/1.7.x/server-rest/examples/teams/create.md new file mode 100644 index 0000000000..27e7429464 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/create.md @@ -0,0 +1,14 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "teamId": "<TEAM_ID>", + "name": "<NAME>", + "roles": [] +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e897d84a12 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/delete-membership.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/delete.md b/docs/examples/1.7.x/server-rest/examples/teams/delete.md new file mode 100644 index 0000000000..213489c7fb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/delete.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.7.x/server-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..bcac2b980e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/get-membership.md @@ -0,0 +1,9 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e49b4c7855 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/get-prefs.md @@ -0,0 +1,8 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/get.md b/docs/examples/1.7.x/server-rest/examples/teams/get.md new file mode 100644 index 0000000000..0bf8cfda8d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/get.md @@ -0,0 +1,9 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4a284f92d8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/list-memberships.md @@ -0,0 +1,9 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/list.md b/docs/examples/1.7.x/server-rest/examples/teams/list.md new file mode 100644 index 0000000000..678c955a5e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/list.md @@ -0,0 +1,9 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.7.x/server-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..6730d5c27c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/update-membership.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "roles": [] +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/update-name.md b/docs/examples/1.7.x/server-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..fa811a2438 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/update-name.md @@ -0,0 +1,12 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..4e67197c36 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md @@ -0,0 +1,13 @@ +POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "expire": , + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/delete.md b/docs/examples/1.7.x/server-rest/examples/tokens/delete.md new file mode 100644 index 0000000000..e869bd60bd --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/delete.md @@ -0,0 +1,9 @@ +DELETE /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-rest/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..8199b76479 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/get-j-w-t.md @@ -0,0 +1,9 @@ +GET /v1/tokens/{tokenId}/jwt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/get.md b/docs/examples/1.7.x/server-rest/examples/tokens/get.md new file mode 100644 index 0000000000..894b0cf2fc --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/get.md @@ -0,0 +1,9 @@ +GET /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/list.md b/docs/examples/1.7.x/server-rest/examples/tokens/list.md new file mode 100644 index 0000000000..1a62ebacc5 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/list.md @@ -0,0 +1,9 @@ +GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/update.md b/docs/examples/1.7.x/server-rest/examples/tokens/update.md new file mode 100644 index 0000000000..14d6144e95 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/tokens/update.md @@ -0,0 +1,13 @@ +PATCH /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "expire": , + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-rest/examples/users/create-argon2user.md new file mode 100644 index 0000000000..d557cf6d5f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-argon2user.md @@ -0,0 +1,13 @@ +POST /v1/users/argon2 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-rest/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..cda7491160 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-bcrypt-user.md @@ -0,0 +1,13 @@ +POST /v1/users/bcrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-rest/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..83208adadb --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-j-w-t.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "sessionId": "<SESSION_ID>", + "duration": 0 +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-rest/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..d4896133a1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-m-d5user.md @@ -0,0 +1,13 @@ +POST /v1/users/md5 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2f6524646d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-rest/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c10b1a82d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-p-h-pass-user.md @@ -0,0 +1,13 @@ +POST /v1/users/phpass HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-rest/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5c6467a2fe --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +POST /v1/users/sha HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordVersion": "sha1", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..19d0650840 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,16 @@ +POST /v1/users/scrypt-modified HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordSaltSeparator": "<PASSWORD_SALT_SEPARATOR>", + "passwordSignerKey": "<PASSWORD_SIGNER_KEY>", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..008eab6848 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-scrypt-user.md @@ -0,0 +1,18 @@ +POST /v1/users/scrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordCpu": 0, + "passwordMemory": 0, + "passwordParallel": 0, + "passwordLength": 0, + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-session.md b/docs/examples/1.7.x/server-rest/examples/users/create-session.md new file mode 100644 index 0000000000..ec71d421e0 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-session.md @@ -0,0 +1,7 @@ +POST /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-target.md b/docs/examples/1.7.x/server-rest/examples/users/create-target.md new file mode 100644 index 0000000000..fced935c1b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-target.md @@ -0,0 +1,14 @@ +POST /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "targetId": "<TARGET_ID>", + "providerType": "email", + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create-token.md b/docs/examples/1.7.x/server-rest/examples/users/create-token.md new file mode 100644 index 0000000000..4339252660 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create-token.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "length": 4, + "expire": 60 +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/create.md b/docs/examples/1.7.x/server-rest/examples/users/create.md new file mode 100644 index 0000000000..67d377255b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/create.md @@ -0,0 +1,14 @@ +POST /v1/users HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phone": "+12065550100", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.7.x/server-rest/examples/users/delete-identity.md new file mode 100644 index 0000000000..c2aa5eed16 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/users/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-rest/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..9d9e2e950f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete-session.md b/docs/examples/1.7.x/server-rest/examples/users/delete-session.md new file mode 100644 index 0000000000..be204911a2 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-rest/examples/users/delete-sessions.md new file mode 100644 index 0000000000..54f3a8d4f1 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete-target.md b/docs/examples/1.7.x/server-rest/examples/users/delete-target.md new file mode 100644 index 0000000000..77e2c23dd8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete-target.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/delete.md b/docs/examples/1.7.x/server-rest/examples/users/delete.md new file mode 100644 index 0000000000..c31212aa71 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..8dc3e2a9ac --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.7.x/server-rest/examples/users/get-prefs.md new file mode 100644 index 0000000000..d3149c8d8b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/get-prefs.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/get-target.md b/docs/examples/1.7.x/server-rest/examples/users/get-target.md new file mode 100644 index 0000000000..deaa063d5e --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/get-target.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/get.md b/docs/examples/1.7.x/server-rest/examples/users/get.md new file mode 100644 index 0000000000..fb8938f835 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/get.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-identities.md b/docs/examples/1.7.x/server-rest/examples/users/list-identities.md new file mode 100644 index 0000000000..a526df4773 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-identities.md @@ -0,0 +1,7 @@ +GET /v1/users/identities HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-logs.md b/docs/examples/1.7.x/server-rest/examples/users/list-logs.md new file mode 100644 index 0000000000..1dda938025 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-logs.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/logs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.7.x/server-rest/examples/users/list-memberships.md new file mode 100644 index 0000000000..df6897a912 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-memberships.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-rest/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..3feffa2285 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-mfa-factors.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.7.x/server-rest/examples/users/list-sessions.md new file mode 100644 index 0000000000..a1405962fc --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-sessions.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list-targets.md b/docs/examples/1.7.x/server-rest/examples/users/list-targets.md new file mode 100644 index 0000000000..8a5f01ceac --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list-targets.md @@ -0,0 +1,7 @@ +GET /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/list.md b/docs/examples/1.7.x/server-rest/examples/users/list.md new file mode 100644 index 0000000000..05f5898527 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/list.md @@ -0,0 +1,7 @@ +GET /v1/users HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-rest/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cf65c72b0c --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-email-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "emailVerification": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-email.md b/docs/examples/1.7.x/server-rest/examples/users/update-email.md new file mode 100644 index 0000000000..10ccafb079 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-email.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "email": "email@example.com" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-labels.md b/docs/examples/1.7.x/server-rest/examples/users/update-labels.md new file mode 100644 index 0000000000..f01603f1f4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-labels.md @@ -0,0 +1,10 @@ +PUT /v1/users/{userId}/labels HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "labels": [] +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-rest/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..aa3bb3f6e6 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.7.x/server-rest/examples/users/update-mfa.md new file mode 100644 index 0000000000..fce9198887 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-mfa.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "mfa": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-name.md b/docs/examples/1.7.x/server-rest/examples/users/update-name.md new file mode 100644 index 0000000000..c8988dfb1d --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-password.md b/docs/examples/1.7.x/server-rest/examples/users/update-password.md new file mode 100644 index 0000000000..fb796d5619 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-password.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "password": +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-rest/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ca3958605b --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-phone-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "phoneVerification": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-phone.md b/docs/examples/1.7.x/server-rest/examples/users/update-phone.md new file mode 100644 index 0000000000..5bc196d668 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-phone.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "number": "+12065550100" +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.7.x/server-rest/examples/users/update-prefs.md new file mode 100644 index 0000000000..1db82743e8 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "prefs": {} +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-status.md b/docs/examples/1.7.x/server-rest/examples/users/update-status.md new file mode 100644 index 0000000000..6d07f2e15f --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-status.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "status": false +} diff --git a/docs/examples/1.7.x/server-rest/examples/users/update-target.md b/docs/examples/1.7.x/server-rest/examples/users/update-target.md new file mode 100644 index 0000000000..926fb166a4 --- /dev/null +++ b/docs/examples/1.7.x/server-rest/examples/users/update-target.md @@ -0,0 +1,12 @@ +PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-ruby/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..c2efab0e06 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-ruby/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..e6d0574bd9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_password_session( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-email-token.md b/docs/examples/1.7.x/server-ruby/examples/account/create-email-token.md new file mode 100644 index 0000000000..c20861fe85 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_token( + user_id: '<USER_ID>', + email: 'email@example.com', + phrase: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-ruby/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fdc14c89ef --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_jwt() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-ruby/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4dde83ed90 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_magic_url_token( + user_id: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', # optional + phrase: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..53f6cd107b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..d7664285e3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_mfa_challenge( + factor: AuthenticationFactor::EMAIL +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8a92a29297 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-ruby/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..38fce97c7e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_o_auth2_token( + provider: OAuthProvider::AMAZON, + success: 'https://example.com', # optional + failure: 'https://example.com', # optional + scopes: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-ruby/examples/account/create-phone-token.md new file mode 100644 index 0000000000..5f8fd8558a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_phone_token( + user_id: '<USER_ID>', + phone: '+12065550100' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-ruby/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..6b90805b05 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-recovery.md b/docs/examples/1.7.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 0000000000..74874bb68d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_recovery( + email: 'email@example.com', + url: 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-session.md b/docs/examples/1.7.x/server-ruby/examples/account/create-session.md new file mode 100644 index 0000000000..ef9c4723a5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create-verification.md b/docs/examples/1.7.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 0000000000..3422eb3ee8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_verification( + url: 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/create.md b/docs/examples/1.7.x/server-ruby/examples/account/create.md new file mode 100644 index 0000000000..d2fae53d97 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create( + user_id: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/delete-identity.md b/docs/examples/1.7.x/server-ruby/examples/account/delete-identity.md new file mode 100644 index 0000000000..cf33f05154 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-ruby/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..4be3df467f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/delete-session.md b/docs/examples/1.7.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 0000000000..08de9b0639 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/delete-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-ruby/examples/account/delete-sessions.md new file mode 100644 index 0000000000..d9cdb52300 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..adb38e545f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/get-prefs.md b/docs/examples/1.7.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 0000000000..5bceb498c6 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_prefs() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/get-session.md b/docs/examples/1.7.x/server-ruby/examples/account/get-session.md new file mode 100644 index 0000000000..4a9832a352 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/get-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/get.md b/docs/examples/1.7.x/server-ruby/examples/account/get.md new file mode 100644 index 0000000000..49be640045 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/list-identities.md b/docs/examples/1.7.x/server-ruby/examples/account/list-identities.md new file mode 100644 index 0000000000..3803a81d11 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/list-identities.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_identities( + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/list-logs.md b/docs/examples/1.7.x/server-ruby/examples/account/list-logs.md new file mode 100644 index 0000000000..a183851008 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/list-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_logs( + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-ruby/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..761186356c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/list-sessions.md b/docs/examples/1.7.x/server-ruby/examples/account/list-sessions.md new file mode 100644 index 0000000000..caa43420d3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_sessions() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-email.md b/docs/examples/1.7.x/server-ruby/examples/account/update-email.md new file mode 100644 index 0000000000..a8042df6f8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_email( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-ruby/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..a9955f8b06 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa( + mfa: false +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-ruby/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..632ce981f7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_magic_url_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..1d1c00e6be --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_authenticator( + type: AuthenticatorType::TOTP, + otp: '<OTP>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..dfe9882d9b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_challenge( + challenge_id: '<CHALLENGE_ID>', + otp: '<OTP>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..067eef7ec5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-name.md b/docs/examples/1.7.x/server-ruby/examples/account/update-name.md new file mode 100644 index 0000000000..af32497487 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-name.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_name( + name: '<NAME>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-password.md b/docs/examples/1.7.x/server-ruby/examples/account/update-password.md new file mode 100644 index 0000000000..6be7fe63cc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_password( + password: '', + old_password: 'password' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-ruby/examples/account/update-phone-session.md new file mode 100644 index 0000000000..961968a5bd --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_phone_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-ruby/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..eea0c0c590 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-phone.md b/docs/examples/1.7.x/server-ruby/examples/account/update-phone.md new file mode 100644 index 0000000000..e01fee4ca1 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone( + phone: '+12065550100', + password: 'password' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-prefs.md b/docs/examples/1.7.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 0000000000..6e3a7352d4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_prefs( + prefs: {} +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-recovery.md b/docs/examples/1.7.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 0000000000..825d9c34aa --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_recovery( + user_id: '<USER_ID>', + secret: '<SECRET>', + password: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-session.md b/docs/examples/1.7.x/server-ruby/examples/account/update-session.md new file mode 100644 index 0000000000..0c99d6a07f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-status.md b/docs/examples/1.7.x/server-ruby/examples/account/update-status.md new file mode 100644 index 0000000000..8caf1b55a9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-status.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_status() diff --git a/docs/examples/1.7.x/server-ruby/examples/account/update-verification.md b/docs/examples/1.7.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 0000000000..b0b7b00e34 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 0000000000..5fdcb9c7e2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_browser( + code: Browser::AVANT_BROWSER, + width: 0, # optional + height: 0, # optional + quality: 0 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..6dd40aaf9f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_credit_card( + code: CreditCard::AMERICAN_EXPRESS, + width: 0, # optional + height: 0, # optional + quality: 0 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e48d79ee9b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_favicon( + url: 'https://example.com' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 0000000000..bd6a7c9032 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_flag( + code: Flag::AFGHANISTAN, + width: 0, # optional + height: 0, # optional + quality: 0 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-image.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 0000000000..b80fd13ae9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_image( + url: 'https://example.com', + width: 0, # optional + height: 0 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 0000000000..92bbe03959 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_initials( + name: '<NAME>', # optional + width: 0, # optional + height: 0, # optional + background: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..ce22e02c59 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_qr( + text: '<TEXT>', + size: 1, # optional + margin: 0, # optional + download: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..0279510aad --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-collection.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-collection.md new file mode 100644 index 0000000000..0e0d7c1542 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d6e11b9348 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-document.md new file mode 100644 index 0000000000..38f1e6561b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-document.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..fbde8e20e7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..0d3e672676 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..0df46ce844 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md new file mode 100644 index 0000000000..3311980d67 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY, + attributes: [], + orders: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..978ce196c0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..0baeeabae6 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..4d79d76a80 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + related_collection_id: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..c303ba9179 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..feef97e928 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create.md b/docs/examples/1.7.x/server-ruby/examples/databases/create.md new file mode 100644 index 0000000000..143ea0e248 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..d0d80409a7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-ruby/examples/databases/delete-collection.md new file mode 100644 index 0000000000..57257ff029 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/delete-document.md b/docs/examples/1.7.x/server-ruby/examples/databases/delete-document.md new file mode 100644 index 0000000000..fd475cd036 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/delete-index.md b/docs/examples/1.7.x/server-ruby/examples/databases/delete-index.md new file mode 100644 index 0000000000..a4eb1c17a4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/delete.md b/docs/examples/1.7.x/server-ruby/examples/databases/delete.md new file mode 100644 index 0000000000..b0753fa7f8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/get-attribute.md new file mode 100644 index 0000000000..d9b444eb99 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/get-collection.md b/docs/examples/1.7.x/server-ruby/examples/databases/get-collection.md new file mode 100644 index 0000000000..49adba742c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/get-document.md b/docs/examples/1.7.x/server-ruby/examples/databases/get-document.md new file mode 100644 index 0000000000..44106e5c5c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/get-document.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/get-index.md b/docs/examples/1.7.x/server-ruby/examples/databases/get-index.md new file mode 100644 index 0000000000..6ddd5e5c9d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/get.md b/docs/examples/1.7.x/server-ruby/examples/databases/get.md new file mode 100644 index 0000000000..30c339ca9b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-ruby/examples/databases/list-attributes.md new file mode 100644 index 0000000000..7fab0fc711 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_attributes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/list-collections.md b/docs/examples/1.7.x/server-ruby/examples/databases/list-collections.md new file mode 100644 index 0000000000..46cba91f4f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/list-documents.md b/docs/examples/1.7.x/server-ruby/examples/databases/list-documents.md new file mode 100644 index 0000000000..d9e45e7c4c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-ruby/examples/databases/list-indexes.md new file mode 100644 index 0000000000..52009aba5e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/list.md b/docs/examples/1.7.x/server-ruby/examples/databases/list.md new file mode 100644 index 0000000000..55ddeb5927 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..1453d21cc2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-collection.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-collection.md new file mode 100644 index 0000000000..05609ff3f0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..46e93d1954 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-document.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-document.md new file mode 100644 index 0000000000..e20b3f1a02 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-document.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..a64af64969 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..dd91d177d2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..21e94edabe --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..b0029e871d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..ec404a4429 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..a37089051e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..80cfeeecd5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-ruby/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..1f4ce44b12 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/update.md b/docs/examples/1.7.x/server-ruby/examples/databases/update.md new file mode 100644 index 0000000000..32966f1c52 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/databases/update.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 0000000000..9e6d7d08ff --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_deployment( + function_id: '<FUNCTION_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..af399e32fa --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_duplicate_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + build_id: '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 0000000000..57dc3a6eca --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.create_execution( + function_id: '<FUNCTION_ID>', + body: '<BODY>', # optional + async: false, # optional + path: '<PATH>', # optional + method: ExecutionMethod::GET, # optional + headers: {}, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..8212b742ba --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_template_deployment( + function_id: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-variable.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-variable.md new file mode 100644 index 0000000000..4beb2dcb00 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_variable( + function_id: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..7ceb8508e6 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_vcs_deployment( + function_id: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/create.md b/docs/examples/1.7.x/server-ruby/examples/functions/create.md new file mode 100644 index 0000000000..ce1fd0e1af --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..51fa725e43 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-ruby/examples/functions/delete-execution.md new file mode 100644 index 0000000000..ef8125ee12 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-ruby/examples/functions/delete-variable.md new file mode 100644 index 0000000000..2714b8ce5c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/delete.md b/docs/examples/1.7.x/server-ruby/examples/functions/delete.md new file mode 100644 index 0000000000..64ed9c6a9c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..af80d7d8fb --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment_download( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 0000000000..a79af5d71b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/get-execution.md b/docs/examples/1.7.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 0000000000..2abd0d6e78 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.get_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/get-variable.md b/docs/examples/1.7.x/server-ruby/examples/functions/get-variable.md new file mode 100644 index 0000000000..9f5ce6f733 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/get.md b/docs/examples/1.7.x/server-ruby/examples/functions/get.md new file mode 100644 index 0000000000..e88624276d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 0000000000..25f65da35e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_deployments( + function_id: '<FUNCTION_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list-executions.md b/docs/examples/1.7.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 0000000000..31fd111ee8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.list_executions( + function_id: '<FUNCTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-ruby/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..b486cff747 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-ruby/examples/functions/list-specifications.md new file mode 100644 index 0000000000..3536e59067 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list-variables.md b/docs/examples/1.7.x/server-ruby/examples/functions/list-variables.md new file mode 100644 index 0000000000..c52f43e822 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_variables( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/list.md b/docs/examples/1.7.x/server-ruby/examples/functions/list.md new file mode 100644 index 0000000000..bc110b12af --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-ruby/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..2dd0abddbc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_deployment_status( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-ruby/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..862ee9bbf5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_function_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/update-variable.md b/docs/examples/1.7.x/server-ruby/examples/functions/update-variable.md new file mode 100644 index 0000000000..b8326e8425 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/functions/update.md b/docs/examples/1.7.x/server-ruby/examples/functions/update.md new file mode 100644 index 0000000000..89cd55735e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/functions/update.md @@ -0,0 +1,31 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, # optional + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/graphql/mutation.md b/docs/examples/1.7.x/server-ruby/examples/graphql/mutation.md new file mode 100644 index 0000000000..024e37762a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.mutation( + query: {} +) diff --git a/docs/examples/1.7.x/server-ruby/examples/graphql/query.md b/docs/examples/1.7.x/server-ruby/examples/graphql/query.md new file mode 100644 index 0000000000..9724163498 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/graphql/query.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.query( + query: {} +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-ruby/examples/health/get-antivirus.md new file mode 100644 index 0000000000..9b4e20a2d3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-cache.md b/docs/examples/1.7.x/server-ruby/examples/health/get-cache.md new file mode 100644 index 0000000000..a03521ebf7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-cache.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_cache() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-certificate.md b/docs/examples/1.7.x/server-ruby/examples/health/get-certificate.md new file mode 100644 index 0000000000..dc2850d4dd --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_certificate( + domain: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-d-b.md b/docs/examples/1.7.x/server-ruby/examples/health/get-d-b.md new file mode 100644 index 0000000000..dcca1635b3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_db() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-ruby/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..7af1c67f44 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_failed_jobs( + name: ::V1_DATABASE, + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-ruby/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..dc9dcabbdb --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..732a5a3f27 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_builds( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..83793a0224 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_certificates( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ff57bc7938 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_databases( + name: '<NAME>', # optional + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..d152d53956 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_deletes( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..5a133bc07e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_functions( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..3168cc2bf1 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_logs( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..2e7689e127 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_mails( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..0d4b977b1a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_messaging( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..8fd95b9824 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_migrations( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..3a9ab4cf5b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_stats_resources( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..1cc14477f9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_stats_usage_dump( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..30939f6c5f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_usage( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..625dbf9174 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_webhooks( + threshold: null # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-ruby/examples/health/get-storage-local.md new file mode 100644 index 0000000000..9cb7fefcf1 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-storage.md b/docs/examples/1.7.x/server-ruby/examples/health/get-storage.md new file mode 100644 index 0000000000..fef1502b2a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-storage.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get-time.md b/docs/examples/1.7.x/server-ruby/examples/health/get-time.md new file mode 100644 index 0000000000..32a813c03c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get-time.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_time() diff --git a/docs/examples/1.7.x/server-ruby/examples/health/get.md b/docs/examples/1.7.x/server-ruby/examples/health/get.md new file mode 100644 index 0000000000..77ac7f364f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/health/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/get.md b/docs/examples/1.7.x/server-ruby/examples/locale/get.md new file mode 100644 index 0000000000..df38b7de70 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.get() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-codes.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-codes.md new file mode 100644 index 0000000000..d99d1d24bc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_codes() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-continents.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-continents.md new file mode 100644 index 0000000000..62392a0e5a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_continents() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..3594fc40c3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..b3e25b401d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-countries.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries.md new file mode 100644 index 0000000000..361bdb573c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e8348c8dfa --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.7.x/server-ruby/examples/locale/list-languages.md b/docs/examples/1.7.x/server-ruby/examples/locale/list-languages.md new file mode 100644 index 0000000000..04f63047e6 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_languages() diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..1555725e18 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-email.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-email.md new file mode 100644 index 0000000000..7fd124b57c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_email( + message_id: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + cc: [], # optional + bcc: [], # optional + attachments: [], # optional + draft: false, # optional + html: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..f04ea84dd7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + service_account_json: {}, # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..8f8518c083 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..b4b3bc4a3b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-push.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-push.md new file mode 100644 index 0000000000..6f7c1c767e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_push( + message_id: '<MESSAGE_ID>', + title: '<TITLE>', # optional + body: '<BODY>', # optional + topics: [], # optional + users: [], # optional + targets: [], # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..e11fb9b7f7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-sms.md new file mode 100644 index 0000000000..47691fb0b8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sms( + message_id: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..9d949d80e5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..81fa39cc05 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.create_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..001e4b8001 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..2618bf9f33 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-topic.md new file mode 100644 index 0000000000..d63b8969d7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..0652ec90fa --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..05b89d2dfc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..5a3e61a294 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..854786e806 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.delete_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..94c428b0d0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/delete.md b/docs/examples/1.7.x/server-ruby/examples/messaging/delete.md new file mode 100644 index 0000000000..998cdca1c5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/get-message.md b/docs/examples/1.7.x/server-ruby/examples/messaging/get-message.md new file mode 100644 index 0000000000..0ee5b9750d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_message( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/get-provider.md new file mode 100644 index 0000000000..b3d88e0177 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-ruby/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..aa270364ba --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-ruby/examples/messaging/get-topic.md new file mode 100644 index 0000000000..d074388066 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..c6999b4a18 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_message_logs( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-messages.md new file mode 100644 index 0000000000..8b16c55c82 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_messages( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..e140018820 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_provider_logs( + provider_id: '<PROVIDER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-providers.md new file mode 100644 index 0000000000..d18e25d0d7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_providers( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..d998c85527 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscriber_logs( + subscriber_id: '<SUBSCRIBER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..39b6815f10 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscribers( + topic_id: '<TOPIC_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-targets.md new file mode 100644 index 0000000000..f8234c21fe --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_targets( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..7ef13efd1d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topic_logs( + topic_id: '<TOPIC_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-ruby/examples/messaging/list-topics.md new file mode 100644 index 0000000000..cbe2e1e152 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topics( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..6aa0db27ee --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-email.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-email.md new file mode 100644 index 0000000000..80fa113b39 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_email( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + subject: '<SUBJECT>', # optional + content: '<CONTENT>', # optional + draft: false, # optional + html: false, # optional + cc: [], # optional + bcc: [], # optional + scheduled_at: '', # optional + attachments: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..d6c352fb3a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + service_account_json: {} # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..5becd81e72 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + enabled: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..441af2c69d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-push.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-push.md new file mode 100644 index 0000000000..7e3ad37ac4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_push( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + title: '<TITLE>', # optional + body: '<BODY>', # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..24cc5267f3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-sms.md new file mode 100644 index 0000000000..d507df72e4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sms( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + content: '<CONTENT>', # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..40611115d3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + host: '<HOST>', # optional + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..0a817ff093 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..dd4828a6c1 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-topic.md new file mode 100644 index 0000000000..589ee2a296 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', # optional + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..07daa90732 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-ruby/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..3190e61a29 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/create-deployment.md new file mode 100644 index 0000000000..a95ee8d835 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_deployment( + site_id: '<SITE_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..4cf5f7b9cb --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_duplicate_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..17a9131fe0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_template_deployment( + site_id: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create-variable.md b/docs/examples/1.7.x/server-ruby/examples/sites/create-variable.md new file mode 100644 index 0000000000..dbf49045fc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_variable( + site_id: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..d1a7d5d33a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_vcs_deployment( + site_id: '<SITE_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/create.md b/docs/examples/1.7.x/server-ruby/examples/sites/create.md new file mode 100644 index 0000000000..f15278df08 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + build_runtime: ::NODE_14_5, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + adapter: ::STATIC, # optional + installation_id: '<INSTALLATION_ID>', # optional + fallback_file: '<FALLBACK_FILE>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..53b00189c4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/delete-log.md b/docs/examples/1.7.x/server-ruby/examples/sites/delete-log.md new file mode 100644 index 0000000000..8e787b54f0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-ruby/examples/sites/delete-variable.md new file mode 100644 index 0000000000..61a9cd3c86 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/delete.md b/docs/examples/1.7.x/server-ruby/examples/sites/delete.md new file mode 100644 index 0000000000..e469cc2a45 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..11282ab514 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment_download( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment.md new file mode 100644 index 0000000000..f7667af8b6 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/get-log.md b/docs/examples/1.7.x/server-ruby/examples/sites/get-log.md new file mode 100644 index 0000000000..d7feb0a016 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/get-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/get-variable.md b/docs/examples/1.7.x/server-ruby/examples/sites/get-variable.md new file mode 100644 index 0000000000..db067b4d40 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/get.md b/docs/examples/1.7.x/server-ruby/examples/sites/get.md new file mode 100644 index 0000000000..8955e0f76f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-ruby/examples/sites/list-deployments.md new file mode 100644 index 0000000000..50d95c5fb3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_deployments( + site_id: '<SITE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-ruby/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..9e791b5e08 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list-logs.md b/docs/examples/1.7.x/server-ruby/examples/sites/list-logs.md new file mode 100644 index 0000000000..80e6b27745 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_logs( + site_id: '<SITE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-ruby/examples/sites/list-specifications.md new file mode 100644 index 0000000000..4244912da3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list-variables.md b/docs/examples/1.7.x/server-ruby/examples/sites/list-variables.md new file mode 100644 index 0000000000..f09a4d3860 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_variables( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/list.md b/docs/examples/1.7.x/server-ruby/examples/sites/list.md new file mode 100644 index 0000000000..8b1588b3c2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-ruby/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..bbcbeea9db --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_deployment_status( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-ruby/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..2c6118e5bf --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_site_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/update-variable.md b/docs/examples/1.7.x/server-ruby/examples/sites/update-variable.md new file mode 100644 index 0000000000..a52e842bb5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/sites/update.md b/docs/examples/1.7.x/server-ruby/examples/sites/update.md new file mode 100644 index 0000000000..ec6b06cbc4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/sites/update.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + build_runtime: ::NODE_14_5, # optional + adapter: ::STATIC, # optional + fallback_file: '<FALLBACK_FILE>', # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 0000000000..0e6f2b56ec --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.create_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/create-file.md b/docs/examples/1.7.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 0000000000..1964842164 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.create_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + file: InputFile.from_path('dir/file.png'), + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..a9fd0e36f9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.delete_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/delete-file.md b/docs/examples/1.7.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 0000000000..26fe41a5a4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.delete_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e1d649602b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.get_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 0000000000..b1dbf9ac28 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_download( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..47c3b8a2e0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_preview( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + width: 0, # optional + height: 0, # optional + gravity: ImageGravity::CENTER, # optional + quality: 0, # optional + border_width: 0, # optional + border_color: '', # optional + border_radius: 0, # optional + opacity: 0, # optional + rotation: -360, # optional + background: '', # optional + output: ImageFormat::JPG # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 0000000000..fbba039cab --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_view( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 0000000000..bdc969a6b5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 0000000000..88850174e3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.list_buckets( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/list-files.md b/docs/examples/1.7.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 0000000000..f5dc70bf87 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/list-files.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.list_files( + bucket_id: '<BUCKET_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 0000000000..32fc5a3d33 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.update_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/update-file.md b/docs/examples/1.7.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 0000000000..69a6cb01cc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.update_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + name: '<NAME>', # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/create-membership.md b/docs/examples/1.7.x/server-ruby/examples/teams/create-membership.md new file mode 100644 index 0000000000..4d98af8ba2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_membership( + team_id: '<TEAM_ID>', + roles: [], + email: 'email@example.com', # optional + user_id: '<USER_ID>', # optional + phone: '+12065550100', # optional + url: 'https://example.com', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/create.md b/docs/examples/1.7.x/server-ruby/examples/teams/create.md new file mode 100644 index 0000000000..e5818470bc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create( + team_id: '<TEAM_ID>', + name: '<NAME>', + roles: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 0000000000..b880b2a616 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/delete.md b/docs/examples/1.7.x/server-ruby/examples/teams/delete.md new file mode 100644 index 0000000000..01169f822e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/get-membership.md b/docs/examples/1.7.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 0000000000..62eefeba7a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-ruby/examples/teams/get-prefs.md new file mode 100644 index 0000000000..4aa9927144 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_prefs( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/get.md b/docs/examples/1.7.x/server-ruby/examples/teams/get.md new file mode 100644 index 0000000000..2b6d8aeef9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-ruby/examples/teams/list-memberships.md new file mode 100644 index 0000000000..21318f46c7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_memberships( + team_id: '<TEAM_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/list.md b/docs/examples/1.7.x/server-ruby/examples/teams/list.md new file mode 100644 index 0000000000..6ae840bdff --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c324c1da5e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership_status( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/update-membership.md b/docs/examples/1.7.x/server-ruby/examples/teams/update-membership.md new file mode 100644 index 0000000000..191e4bfe4b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + roles: [] +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/update-name.md b/docs/examples/1.7.x/server-ruby/examples/teams/update-name.md new file mode 100644 index 0000000000..6ef628b086 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_name( + team_id: '<TEAM_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-ruby/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e284056016 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_prefs( + team_id: '<TEAM_ID>', + prefs: {} +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..564d7044e5 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.create_file_token( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + expire: '', # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md b/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md new file mode 100644 index 0000000000..d4cc2b5334 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.delete( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-ruby/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..dba135747d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/get-j-w-t.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.get_jwt( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/get.md b/docs/examples/1.7.x/server-ruby/examples/tokens/get.md new file mode 100644 index 0000000000..34af42ae88 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.get( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/list.md b/docs/examples/1.7.x/server-ruby/examples/tokens/list.md new file mode 100644 index 0000000000..3514f2aa97 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.list( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/update.md b/docs/examples/1.7.x/server-ruby/examples/tokens/update.md new file mode 100644 index 0000000000..10a8b0b00e --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/update.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tokens = Tokens.new(client) + +result = tokens.update( + token_id: '<TOKEN_ID>', + expire: '', # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-argon2user.md new file mode 100644 index 0000000000..0ab3882012 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_argon2_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7cbc63af07 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_bcrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-ruby/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..3c220c2acd --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_jwt( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>', # optional + duration: 0 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..a7f0b910de --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_md5_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c846910e46 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..30613e281b --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_ph_pass_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..832bcf7bed --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_sha_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_version: PasswordHash::SHA1, # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..83ad2b10a7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_modified_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_salt_separator: '<PASSWORD_SALT_SEPARATOR>', + password_signer_key: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..83852df628 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_cpu: null, + password_memory: null, + password_parallel: null, + password_length: null, + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-session.md b/docs/examples/1.7.x/server-ruby/examples/users/create-session.md new file mode 100644 index 0000000000..318794ea9a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_session( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-target.md b/docs/examples/1.7.x/server-ruby/examples/users/create-target.md new file mode 100644 index 0000000000..a7a65006ee --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-target.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + provider_type: MessagingProviderType::EMAIL, + identifier: '<IDENTIFIER>', + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create-token.md b/docs/examples/1.7.x/server-ruby/examples/users/create-token.md new file mode 100644 index 0000000000..8ce7dfa5c9 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_token( + user_id: '<USER_ID>', + length: 4, # optional + expire: 60 # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/create.md b/docs/examples/1.7.x/server-ruby/examples/users/create.md new file mode 100644 index 0000000000..3d2b4bcb87 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/create.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create( + user_id: '<USER_ID>', + email: 'email@example.com', # optional + phone: '+12065550100', # optional + password: '', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete-identity.md b/docs/examples/1.7.x/server-ruby/examples/users/delete-identity.md new file mode 100644 index 0000000000..fc984c25e3 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-ruby/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..b884a39141 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_mfa_authenticator( + user_id: '<USER_ID>', + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete-session.md b/docs/examples/1.7.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 0000000000..29f0cbefb2 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_session( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 0000000000..88600036b4 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete-target.md b/docs/examples/1.7.x/server-ruby/examples/users/delete-target.md new file mode 100644 index 0000000000..bb0faca3bc --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/delete.md b/docs/examples/1.7.x/server-ruby/examples/users/delete.md new file mode 100644 index 0000000000..2c2d482244 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0cf2679067 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/get-prefs.md b/docs/examples/1.7.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 0000000000..fd70276b28 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_prefs( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/get-target.md b/docs/examples/1.7.x/server-ruby/examples/users/get-target.md new file mode 100644 index 0000000000..f8b05f43ed --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/get-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/get.md b/docs/examples/1.7.x/server-ruby/examples/users/get.md new file mode 100644 index 0000000000..b780a3388f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-identities.md b/docs/examples/1.7.x/server-ruby/examples/users/list-identities.md new file mode 100644 index 0000000000..11362eb2d8 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-identities.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_identities( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-logs.md b/docs/examples/1.7.x/server-ruby/examples/users/list-logs.md new file mode 100644 index 0000000000..5a5cc7b06a --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_logs( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-memberships.md b/docs/examples/1.7.x/server-ruby/examples/users/list-memberships.md new file mode 100644 index 0000000000..8f0fd3e081 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_memberships( + user_id: '<USER_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-ruby/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e2b51b8966 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_mfa_factors( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-sessions.md b/docs/examples/1.7.x/server-ruby/examples/users/list-sessions.md new file mode 100644 index 0000000000..cd4b3be3ac --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list-targets.md b/docs/examples/1.7.x/server-ruby/examples/users/list-targets.md new file mode 100644 index 0000000000..e39dc0a663 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_targets( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/list.md b/docs/examples/1.7.x/server-ruby/examples/users/list.md new file mode 100644 index 0000000000..7659efebb7 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-ruby/examples/users/update-email-verification.md new file mode 100644 index 0000000000..888f29d2c0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email_verification( + user_id: '<USER_ID>', + email_verification: false +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-email.md b/docs/examples/1.7.x/server-ruby/examples/users/update-email.md new file mode 100644 index 0000000000..65d717ec0f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email( + user_id: '<USER_ID>', + email: 'email@example.com' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-labels.md b/docs/examples/1.7.x/server-ruby/examples/users/update-labels.md new file mode 100644 index 0000000000..56cadbf477 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-labels.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_labels( + user_id: '<USER_ID>', + labels: [] +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-ruby/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..5575bdb393 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-mfa.md b/docs/examples/1.7.x/server-ruby/examples/users/update-mfa.md new file mode 100644 index 0000000000..02c3c8f122 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa( + user_id: '<USER_ID>', + mfa: false +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-name.md b/docs/examples/1.7.x/server-ruby/examples/users/update-name.md new file mode 100644 index 0000000000..cc518d1f3c --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_name( + user_id: '<USER_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-password.md b/docs/examples/1.7.x/server-ruby/examples/users/update-password.md new file mode 100644 index 0000000000..8683343f82 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_password( + user_id: '<USER_ID>', + password: '' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-ruby/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..e915d02c0d --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone_verification( + user_id: '<USER_ID>', + phone_verification: false +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-phone.md b/docs/examples/1.7.x/server-ruby/examples/users/update-phone.md new file mode 100644 index 0000000000..070dd84ed0 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone( + user_id: '<USER_ID>', + number: '+12065550100' +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-prefs.md b/docs/examples/1.7.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 0000000000..a0e6b2c610 --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_prefs( + user_id: '<USER_ID>', + prefs: {} +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-status.md b/docs/examples/1.7.x/server-ruby/examples/users/update-status.md new file mode 100644 index 0000000000..fd967487fd --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_status( + user_id: '<USER_ID>', + status: false +) diff --git a/docs/examples/1.7.x/server-ruby/examples/users/update-target.md b/docs/examples/1.7.x/server-ruby/examples/users/update-target.md new file mode 100644 index 0000000000..233e54602f --- /dev/null +++ b/docs/examples/1.7.x/server-ruby/examples/users/update-target.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://example.com/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + identifier: '<IDENTIFIER>', # optional + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/server-swift/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..9de3b937b1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-email-password-session.md b/docs/examples/1.7.x/server-swift/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..0e5e7cf083 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-email-token.md b/docs/examples/1.7.x/server-swift/examples/account/create-email-token.md new file mode 100644 index 0000000000..164956349e --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-j-w-t.md b/docs/examples/1.7.x/server-swift/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..20bc4049f7 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/server-swift/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..b2a0d89e93 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..adce646717 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..a141428071 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2a6f08867b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/server-swift/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..c36e27119f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-phone-token.md b/docs/examples/1.7.x/server-swift/examples/account/create-phone-token.md new file mode 100644 index 0000000000..8d8e36c07d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-phone-verification.md b/docs/examples/1.7.x/server-swift/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..481acd719d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-recovery.md b/docs/examples/1.7.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 0000000000..1d86a78dba --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-session.md b/docs/examples/1.7.x/server-swift/examples/account/create-session.md new file mode 100644 index 0000000000..cfa44adbe8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create-verification.md b/docs/examples/1.7.x/server-swift/examples/account/create-verification.md new file mode 100644 index 0000000000..beaa5ea462 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/create.md b/docs/examples/1.7.x/server-swift/examples/account/create.md new file mode 100644 index 0000000000..3e67824361 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/delete-identity.md b/docs/examples/1.7.x/server-swift/examples/account/delete-identity.md new file mode 100644 index 0000000000..af3add8222 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-swift/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..3fd7b444ec --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/delete-session.md b/docs/examples/1.7.x/server-swift/examples/account/delete-session.md new file mode 100644 index 0000000000..f3ec37b84f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/delete-sessions.md b/docs/examples/1.7.x/server-swift/examples/account/delete-sessions.md new file mode 100644 index 0000000000..d0e5b4847c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..218c0131cc --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/get-prefs.md b/docs/examples/1.7.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 0000000000..2ef1d27437 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/get-session.md b/docs/examples/1.7.x/server-swift/examples/account/get-session.md new file mode 100644 index 0000000000..b1960d3d6d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/get-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/get.md b/docs/examples/1.7.x/server-swift/examples/account/get.md new file mode 100644 index 0000000000..007197ec5a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/list-identities.md b/docs/examples/1.7.x/server-swift/examples/account/list-identities.md new file mode 100644 index 0000000000..249a1de7a3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/list-logs.md b/docs/examples/1.7.x/server-swift/examples/account/list-logs.md new file mode 100644 index 0000000000..73dcc87d14 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/server-swift/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..b90fdbd793 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/list-sessions.md b/docs/examples/1.7.x/server-swift/examples/account/list-sessions.md new file mode 100644 index 0000000000..98e16d73a1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-email.md b/docs/examples/1.7.x/server-swift/examples/account/update-email.md new file mode 100644 index 0000000000..136d2f8bf5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-m-f-a.md b/docs/examples/1.7.x/server-swift/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..93c75fe72c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/server-swift/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..6f4ede1c91 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b7df2d9dbb --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "<OTP>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..cfafb4a2af --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7711aeb62b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-name.md b/docs/examples/1.7.x/server-swift/examples/account/update-name.md new file mode 100644 index 0000000000..de06aafff1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateName( + name: "<NAME>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-password.md b/docs/examples/1.7.x/server-swift/examples/account/update-password.md new file mode 100644 index 0000000000..357a96a542 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-phone-session.md b/docs/examples/1.7.x/server-swift/examples/account/update-phone-session.md new file mode 100644 index 0000000000..bdd4c1a9dd --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-phone-verification.md b/docs/examples/1.7.x/server-swift/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..7ff75a6435 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-phone.md b/docs/examples/1.7.x/server-swift/examples/account/update-phone.md new file mode 100644 index 0000000000..25e3198056 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-prefs.md b/docs/examples/1.7.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 0000000000..1c0ff55724 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-recovery.md b/docs/examples/1.7.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 0000000000..5a5ff51c9c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-session.md b/docs/examples/1.7.x/server-swift/examples/account/update-session.md new file mode 100644 index 0000000000..9b65edc0bc --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-status.md b/docs/examples/1.7.x/server-swift/examples/account/update-status.md new file mode 100644 index 0000000000..73dbfc3cb4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-status.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.7.x/server-swift/examples/account/update-verification.md b/docs/examples/1.7.x/server-swift/examples/account/update-verification.md new file mode 100644 index 0000000000..765f64133f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 0000000000..184a960daa --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a4b12d6983 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..73a72c1fbe --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6bb9371d68 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-image.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 0000000000..e8eb25d906 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-initials.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 0000000000..54b2e00153 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..94a7ffff4b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..03b4caf052 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.createBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.7.x/server-swift/examples/databases/create-collection.md new file mode 100644 index 0000000000..e035153bb0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..f1db7b5b29 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.createDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-document.md b/docs/examples/1.7.x/server-swift/examples/databases/create-document.md new file mode 100644 index 0000000000..9af8ed5d81 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..1aeab6287a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.createEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..1aefd37560 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.createEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c4bad36bf0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.createFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-index.md b/docs/examples/1.7.x/server-swift/examples/databases/create-index.md new file mode 100644 index 0000000000..8d740183c9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-index.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: .key, + attributes: [], + orders: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..1169f7726c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.createIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..c9695e441f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.createIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..59fb3ff700 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.createRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..454d7c7b3c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.createStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..560b16db52 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.createUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create.md b/docs/examples/1.7.x/server-swift/examples/databases/create.md new file mode 100644 index 0000000000..e4f01402f2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/delete-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..688878f297 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/delete-collection.md b/docs/examples/1.7.x/server-swift/examples/databases/delete-collection.md new file mode 100644 index 0000000000..f857eee7f2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/delete-document.md b/docs/examples/1.7.x/server-swift/examples/databases/delete-document.md new file mode 100644 index 0000000000..ab7a1e3976 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/delete-index.md b/docs/examples/1.7.x/server-swift/examples/databases/delete-index.md new file mode 100644 index 0000000000..30b82952c8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/delete.md b/docs/examples/1.7.x/server-swift/examples/databases/delete.md new file mode 100644 index 0000000000..ee4b4d537b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.delete( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/get-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1e0d891d2b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.getAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/get-collection.md b/docs/examples/1.7.x/server-swift/examples/databases/get-collection.md new file mode 100644 index 0000000000..4b50fb5287 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/get-document.md b/docs/examples/1.7.x/server-swift/examples/databases/get-document.md new file mode 100644 index 0000000000..d2ea27d3aa --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/get-index.md b/docs/examples/1.7.x/server-swift/examples/databases/get-index.md new file mode 100644 index 0000000000..ccc4d078a9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/get.md b/docs/examples/1.7.x/server-swift/examples/databases/get.md new file mode 100644 index 0000000000..a6409ce695 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.get( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/list-attributes.md b/docs/examples/1.7.x/server-swift/examples/databases/list-attributes.md new file mode 100644 index 0000000000..d9537ece7c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeList = try await databases.listAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/list-collections.md b/docs/examples/1.7.x/server-swift/examples/databases/list-collections.md new file mode 100644 index 0000000000..eb1ade568f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collectionList = try await databases.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/list-documents.md b/docs/examples/1.7.x/server-swift/examples/databases/list-documents.md new file mode 100644 index 0000000000..6f77ff0c6f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/list-indexes.md b/docs/examples/1.7.x/server-swift/examples/databases/list-indexes.md new file mode 100644 index 0000000000..11a1697b77 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let indexList = try await databases.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/list.md b/docs/examples/1.7.x/server-swift/examples/databases/list.md new file mode 100644 index 0000000000..062168754f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let databaseList = try await databases.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..9af9023623 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.updateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.7.x/server-swift/examples/databases/update-collection.md new file mode 100644 index 0000000000..aab46445bb --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..d5cacab7ac --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.updateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-document.md b/docs/examples/1.7.x/server-swift/examples/databases/update-document.md new file mode 100644 index 0000000000..445658906d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e471b013ca --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.updateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..5c9d8db496 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.updateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..6509cc9708 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.updateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..5e4acac936 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.updateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..b4d2c0f110 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.updateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..ba8c5d2f3f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.updateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..c0b10758c8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.updateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/server-swift/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..6187fae07b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.updateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/databases/update.md b/docs/examples/1.7.x/server-swift/examples/databases/update.md new file mode 100644 index 0000000000..ef9a74a734 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/databases/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 0000000000..fce356206a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..dda6a23016 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.7.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 0000000000..b6e82663ba --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..2e6e0221e0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-variable.md b/docs/examples/1.7.x/server-swift/examples/functions/create-variable.md new file mode 100644 index 0000000000..716f9ef2f0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.createVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..305dd970a2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createVcsDeployment( + functionId: "<FUNCTION_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/create.md b/docs/examples/1.7.x/server-swift/examples/functions/create.md new file mode 100644 index 0000000000..87bddb16b9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..c2e76ccb66 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/delete-execution.md b/docs/examples/1.7.x/server-swift/examples/functions/delete-execution.md new file mode 100644 index 0000000000..eddcc9eee7 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/delete-variable.md b/docs/examples/1.7.x/server-swift/examples/functions/delete-variable.md new file mode 100644 index 0000000000..5938828266 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/delete.md b/docs/examples/1.7.x/server-swift/examples/functions/delete.md new file mode 100644 index 0000000000..c4129589e8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.delete( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/server-swift/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..01ed54b953 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let bytes = try await functions.getDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/get-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 0000000000..9783c6a975 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.getDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/get-execution.md b/docs/examples/1.7.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 0000000000..2cb52fe93c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/get-variable.md b/docs/examples/1.7.x/server-swift/examples/functions/get-variable.md new file mode 100644 index 0000000000..d0175e32d5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.getVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/get.md b/docs/examples/1.7.x/server-swift/examples/functions/get.md new file mode 100644 index 0000000000..5a22a2c906 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.get( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list-deployments.md b/docs/examples/1.7.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 0000000000..4b8e948ef8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deploymentList = try await functions.listDeployments( + functionId: "<FUNCTION_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list-executions.md b/docs/examples/1.7.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 0000000000..1df1853bbc --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "<FUNCTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/1.7.x/server-swift/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..801711b660 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let runtimeList = try await functions.listRuntimes() + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list-specifications.md b/docs/examples/1.7.x/server-swift/examples/functions/list-specifications.md new file mode 100644 index 0000000000..5f8f434762 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let specificationList = try await functions.listSpecifications() + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list-variables.md b/docs/examples/1.7.x/server-swift/examples/functions/list-variables.md new file mode 100644 index 0000000000..b1b40b8ed0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variableList = try await functions.listVariables( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/list.md b/docs/examples/1.7.x/server-swift/examples/functions/list.md new file mode 100644 index 0000000000..09a28d7458 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let functionList = try await functions.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/server-swift/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..f576df19b3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.updateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/server-swift/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..06df7f3f2b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.updateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/update-variable.md b/docs/examples/1.7.x/server-swift/examples/functions/update-variable.md new file mode 100644 index 0000000000..77cb5c0aac --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.updateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/functions/update.md b/docs/examples/1.7.x/server-swift/examples/functions/update.md new file mode 100644 index 0000000000..5c48195e09 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/functions/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, // optional + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/graphql/mutation.md b/docs/examples/1.7.x/server-swift/examples/graphql/mutation.md new file mode 100644 index 0000000000..0f8e1fc04e --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/graphql/query.md b/docs/examples/1.7.x/server-swift/examples/graphql/query.md new file mode 100644 index 0000000000..a2c912bf9f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/graphql/query.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-antivirus.md b/docs/examples/1.7.x/server-swift/examples/health/get-antivirus.md new file mode 100644 index 0000000000..107e7ae46b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthAntivirus = try await health.getAntivirus() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-cache.md b/docs/examples/1.7.x/server-swift/examples/health/get-cache.md new file mode 100644 index 0000000000..a558273d80 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getCache() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-certificate.md b/docs/examples/1.7.x/server-swift/examples/health/get-certificate.md new file mode 100644 index 0000000000..096f38593f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthCertificate = try await health.getCertificate( + domain: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-d-b.md b/docs/examples/1.7.x/server-swift/examples/health/get-d-b.md new file mode 100644 index 0000000000..86f76f6862 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getDB() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/server-swift/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..a091a81416 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getFailedJobs( + name: .v1Database, + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-pub-sub.md b/docs/examples/1.7.x/server-swift/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..431998e6d0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getPubSub() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-builds.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..1e87d35347 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueBuilds( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7d28f1ae04 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueCertificates( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-databases.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..682dab01a4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..f6cee1a1bb --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDeletes( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d683292eee --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueFunctions( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..7e52df23e5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueLogs( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-mails.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..7a0dcaf718 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMails( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..3436c142a3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMessaging( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..48a76fe6df --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMigrations( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..278d611400 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueStatsResources( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-usage-dump.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-usage-dump.md new file mode 100644 index 0000000000..8efcdba77b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-stats-usage-dump.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueStatsUsageDump( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-usage.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..8d9c1065e1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueUsage( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/server-swift/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..3bca95fd07 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueWebhooks( + threshold: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-storage-local.md b/docs/examples/1.7.x/server-swift/examples/health/get-storage-local.md new file mode 100644 index 0000000000..4b0fedf095 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorageLocal() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-storage.md b/docs/examples/1.7.x/server-swift/examples/health/get-storage.md new file mode 100644 index 0000000000..bdd033d025 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorage() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get-time.md b/docs/examples/1.7.x/server-swift/examples/health/get-time.md new file mode 100644 index 0000000000..c516c7ccc4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get-time.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthTime = try await health.getTime() + diff --git a/docs/examples/1.7.x/server-swift/examples/health/get.md b/docs/examples/1.7.x/server-swift/examples/health/get.md new file mode 100644 index 0000000000..a910fd17f8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/health/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.get() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/get.md b/docs/examples/1.7.x/server-swift/examples/locale/get.md new file mode 100644 index 0000000000..84d886a50f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-codes.md b/docs/examples/1.7.x/server-swift/examples/locale/list-codes.md new file mode 100644 index 0000000000..a14ffd2e93 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-continents.md b/docs/examples/1.7.x/server-swift/examples/locale/list-continents.md new file mode 100644 index 0000000000..9479664259 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/server-swift/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c10351cd6e --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/server-swift/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..ed651accb0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-countries.md b/docs/examples/1.7.x/server-swift/examples/locale/list-countries.md new file mode 100644 index 0000000000..3c76d1e754 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-currencies.md b/docs/examples/1.7.x/server-swift/examples/locale/list-currencies.md new file mode 100644 index 0000000000..5c48580a3f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.7.x/server-swift/examples/locale/list-languages.md b/docs/examples/1.7.x/server-swift/examples/locale/list-languages.md new file mode 100644 index 0000000000..d10be600ee --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..59ccc47d7b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-email.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-email.md new file mode 100644 index 0000000000..c5e7b2934f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..b6e68b9e84 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [:], // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..f1fa2e2d69 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ff2a280ca3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-push.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-push.md new file mode 100644 index 0000000000..637f966d9d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createPush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..4961b4aaa4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-sms.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-sms.md new file mode 100644 index 0000000000..a9852e24f0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..19e66339ef --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5d0100e602 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..33e88c733f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..229135d51b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-topic.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-topic.md new file mode 100644 index 0000000000..17ccb76efa --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.createTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..e467e2bdb8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..902bccd6b7 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/delete-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a2588ea38a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/server-swift/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..26bb900266 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/delete-topic.md b/docs/examples/1.7.x/server-swift/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..eda8c191c3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/delete.md b/docs/examples/1.7.x/server-swift/examples/messaging/delete.md new file mode 100644 index 0000000000..f606567560 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.delete( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/get-message.md b/docs/examples/1.7.x/server-swift/examples/messaging/get-message.md new file mode 100644 index 0000000000..d042a86704 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.getMessage( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/get-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/get-provider.md new file mode 100644 index 0000000000..f9fbd0a97b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.getProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/server-swift/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..99ce8005b0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriber = try await messaging.getSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/get-topic.md b/docs/examples/1.7.x/server-swift/examples/messaging/get-topic.md new file mode 100644 index 0000000000..25d393ebfd --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.getTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..3a9a46d50b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listMessageLogs( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-messages.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-messages.md new file mode 100644 index 0000000000..48fa3031ce --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let messageList = try await messaging.listMessages( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..b3f14f9b39 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listProviderLogs( + providerId: "<PROVIDER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-providers.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-providers.md new file mode 100644 index 0000000000..542c4a5fa2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let providerList = try await messaging.listProviders( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..ba3570fc4b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..160669d8ac --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriberList = try await messaging.listSubscribers( + topicId: "<TOPIC_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-targets.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-targets.md new file mode 100644 index 0000000000..a3e9af7a55 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let targetList = try await messaging.listTargets( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..5802dd89de --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listTopicLogs( + topicId: "<TOPIC_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/list-topics.md b/docs/examples/1.7.x/server-swift/examples/messaging/list-topics.md new file mode 100644 index 0000000000..dc09212227 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topicList = try await messaging.listTopics( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..57fe19bd3e --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-email.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-email.md new file mode 100644 index 0000000000..9cfe610974 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateEmail( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: "", // optional + attachments: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..e066af8909 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [:] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..92d870cff5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..616fe79415 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-push.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-push.md new file mode 100644 index 0000000000..ffcf7f551a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updatePush( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..52631c676c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-sms.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-sms.md new file mode 100644 index 0000000000..3cae8d18d9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateSms( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..8f62f9588a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..b54288db5c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..d14d1f5a6f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-topic.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-topic.md new file mode 100644 index 0000000000..0281364d22 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.updateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..b73ef4dfe3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/server-swift/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..d77c697f9f --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/create-deployment.md new file mode 100644 index 0000000000..69519ac103 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDeployment( + siteId: "<SITE_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..99a5a20c82 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..1fb5492a61 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create-variable.md b/docs/examples/1.7.x/server-swift/examples/sites/create-variable.md new file mode 100644 index 0000000000..e6dce93164 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.createVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..4ff0be7cb3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createVcsDeployment( + siteId: "<SITE_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/create.md b/docs/examples/1.7.x/server-swift/examples/sites/create.md new file mode 100644 index 0000000000..8ff42c2b7c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + buildRuntime: .node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/delete-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..5b70b2119b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/delete-log.md b/docs/examples/1.7.x/server-swift/examples/sites/delete-log.md new file mode 100644 index 0000000000..4fecc18de4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/delete-variable.md b/docs/examples/1.7.x/server-swift/examples/sites/delete-variable.md new file mode 100644 index 0000000000..8e0d80f19b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/delete.md b/docs/examples/1.7.x/server-swift/examples/sites/delete.md new file mode 100644 index 0000000000..c7ee1e2ff2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.delete( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/server-swift/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..ba6d02c471 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let bytes = try await sites.getDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/get-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/get-deployment.md new file mode 100644 index 0000000000..57d51f8798 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.getDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/get-log.md b/docs/examples/1.7.x/server-swift/examples/sites/get-log.md new file mode 100644 index 0000000000..1f243b7654 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let execution = try await sites.getLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/get-variable.md b/docs/examples/1.7.x/server-swift/examples/sites/get-variable.md new file mode 100644 index 0000000000..b3bc75af21 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.getVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/get.md b/docs/examples/1.7.x/server-swift/examples/sites/get.md new file mode 100644 index 0000000000..389b52d963 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.get( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list-deployments.md b/docs/examples/1.7.x/server-swift/examples/sites/list-deployments.md new file mode 100644 index 0000000000..d5a3adc024 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deploymentList = try await sites.listDeployments( + siteId: "<SITE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list-frameworks.md b/docs/examples/1.7.x/server-swift/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..ecf7d0acab --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let frameworkList = try await sites.listFrameworks() + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list-logs.md b/docs/examples/1.7.x/server-swift/examples/sites/list-logs.md new file mode 100644 index 0000000000..d49e59fa82 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let executionList = try await sites.listLogs( + siteId: "<SITE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list-specifications.md b/docs/examples/1.7.x/server-swift/examples/sites/list-specifications.md new file mode 100644 index 0000000000..3124e93d3b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let specificationList = try await sites.listSpecifications() + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list-variables.md b/docs/examples/1.7.x/server-swift/examples/sites/list-variables.md new file mode 100644 index 0000000000..5790fc7df8 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variableList = try await sites.listVariables( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/list.md b/docs/examples/1.7.x/server-swift/examples/sites/list.md new file mode 100644 index 0000000000..ce2787d348 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let siteList = try await sites.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/server-swift/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..54b789d49a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.updateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/server-swift/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..2f80d06802 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.updateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/update-variable.md b/docs/examples/1.7.x/server-swift/examples/sites/update-variable.md new file mode 100644 index 0000000000..c485881621 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.updateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/sites/update.md b/docs/examples/1.7.x/server-swift/examples/sites/update.md new file mode 100644 index 0000000000..e47e77adf5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/sites/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .node145, // optional + adapter: .static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.7.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 0000000000..bf5394b1b1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.createBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/create-file.md b/docs/examples/1.7.x/server-swift/examples/storage/create-file.md new file mode 100644 index 0000000000..17e834e018 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/1.7.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..1debca37d1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let result = try await storage.deleteBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/delete-file.md b/docs/examples/1.7.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 0000000000..4190b3321d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-bucket.md b/docs/examples/1.7.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 0000000000..7fdb483c24 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.getBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 0000000000..fc696f8512 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..3e78ad3ff3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: 0, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 0000000000..3d8bee17aa --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file.md new file mode 100644 index 0000000000..90d152801c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/list-buckets.md b/docs/examples/1.7.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 0000000000..4e7ee08fb6 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucketList = try await storage.listBuckets( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/list-files.md b/docs/examples/1.7.x/server-swift/examples/storage/list-files.md new file mode 100644 index 0000000000..39c876f404 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "<BUCKET_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.7.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 0000000000..4a08873a60 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.updateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/storage/update-file.md b/docs/examples/1.7.x/server-swift/examples/storage/update-file.md new file mode 100644 index 0000000000..05afedc51a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/create-membership.md b/docs/examples/1.7.x/server-swift/examples/teams/create-membership.md new file mode 100644 index 0000000000..a58d32c1b2 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/create.md b/docs/examples/1.7.x/server-swift/examples/teams/create.md new file mode 100644 index 0000000000..ee8174637d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/delete-membership.md b/docs/examples/1.7.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 0000000000..2b167ff0d3 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/delete.md b/docs/examples/1.7.x/server-swift/examples/teams/delete.md new file mode 100644 index 0000000000..8e21677fed --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/get-membership.md b/docs/examples/1.7.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 0000000000..8e13efd2c7 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/get-prefs.md b/docs/examples/1.7.x/server-swift/examples/teams/get-prefs.md new file mode 100644 index 0000000000..23833cb1cd --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/get.md b/docs/examples/1.7.x/server-swift/examples/teams/get.md new file mode 100644 index 0000000000..502e0b5cd6 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/list-memberships.md b/docs/examples/1.7.x/server-swift/examples/teams/list-memberships.md new file mode 100644 index 0000000000..d3e8466749 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "<TEAM_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/list.md b/docs/examples/1.7.x/server-swift/examples/teams/list.md new file mode 100644 index 0000000000..f02f37bdaf --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/1.7.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..0a10fc81f6 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/update-membership.md b/docs/examples/1.7.x/server-swift/examples/teams/update-membership.md new file mode 100644 index 0000000000..0621d59621 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/update-name.md b/docs/examples/1.7.x/server-swift/examples/teams/update-name.md new file mode 100644 index 0000000000..450f2c351b --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/teams/update-prefs.md b/docs/examples/1.7.x/server-swift/examples/teams/update-prefs.md new file mode 100644 index 0000000000..f5c635ff77 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "<TEAM_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..abe7aadd31 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let resourceToken = try await tokens.createFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/delete.md b/docs/examples/1.7.x/server-swift/examples/tokens/delete.md new file mode 100644 index 0000000000..b98e90c6c6 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let result = try await tokens.delete( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/get-j-w-t.md b/docs/examples/1.7.x/server-swift/examples/tokens/get-j-w-t.md new file mode 100644 index 0000000000..f016582bb0 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/get-j-w-t.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let jwt = try await tokens.getJWT( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/get.md b/docs/examples/1.7.x/server-swift/examples/tokens/get.md new file mode 100644 index 0000000000..920593f801 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let resourceToken = try await tokens.get( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/list.md b/docs/examples/1.7.x/server-swift/examples/tokens/list.md new file mode 100644 index 0000000000..f2248d8510 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let resourceTokenList = try await tokens.list( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/update.md b/docs/examples/1.7.x/server-swift/examples/tokens/update.md new file mode 100644 index 0000000000..46c4c6c3ee --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/tokens/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tokens = Tokens(client) + +let resourceToken = try await tokens.update( + tokenId: "<TOKEN_ID>", + expire: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-argon2user.md b/docs/examples/1.7.x/server-swift/examples/users/create-argon2user.md new file mode 100644 index 0000000000..8623da446a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/server-swift/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..48f38fc9da --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-j-w-t.md b/docs/examples/1.7.x/server-swift/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..08354b4e66 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let jwt = try await users.createJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-m-d5user.md b/docs/examples/1.7.x/server-swift/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..fbafebd39c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..9eb99aec83 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.createMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/server-swift/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..8aab3aee5c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createPHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/server-swift/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..bf77a01093 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: .sha1, // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..72f99d84e1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..9612701b3c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-session.md b/docs/examples/1.7.x/server-swift/examples/users/create-session.md new file mode 100644 index 0000000000..f6d41a1db5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let session = try await users.createSession( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-target.md b/docs/examples/1.7.x/server-swift/examples/users/create-target.md new file mode 100644 index 0000000000..0ea0317feb --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-target.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.createTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: .email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create-token.md b/docs/examples/1.7.x/server-swift/examples/users/create-token.md new file mode 100644 index 0000000000..258e59630a --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let token = try await users.createToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/create.md b/docs/examples/1.7.x/server-swift/examples/users/create.md new file mode 100644 index 0000000000..c24ae40ac1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/create.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete-identity.md b/docs/examples/1.7.x/server-swift/examples/users/delete-identity.md new file mode 100644 index 0000000000..aeb00b9d64 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/server-swift/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..009e78a078 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteMfaAuthenticator( + userId: "<USER_ID>", + type: .totp +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete-session.md b/docs/examples/1.7.x/server-swift/examples/users/delete-session.md new file mode 100644 index 0000000000..d5b2e8f1ae --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete-sessions.md b/docs/examples/1.7.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 0000000000..b2f6bcd881 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete-target.md b/docs/examples/1.7.x/server-swift/examples/users/delete-target.md new file mode 100644 index 0000000000..ed72eb348c --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/delete.md b/docs/examples/1.7.x/server-swift/examples/users/delete.md new file mode 100644 index 0000000000..1a6881d209 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.delete( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..71980cdbbe --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.getMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/get-prefs.md b/docs/examples/1.7.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 0000000000..1a9f5a7fce --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.getPrefs( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/get-target.md b/docs/examples/1.7.x/server-swift/examples/users/get-target.md new file mode 100644 index 0000000000..81690928ac --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/get-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.getTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/get.md b/docs/examples/1.7.x/server-swift/examples/users/get.md new file mode 100644 index 0000000000..2f8b1282a5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.get( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-identities.md b/docs/examples/1.7.x/server-swift/examples/users/list-identities.md new file mode 100644 index 0000000000..6f96ec153d --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let identityList = try await users.listIdentities( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-logs.md b/docs/examples/1.7.x/server-swift/examples/users/list-logs.md new file mode 100644 index 0000000000..856a3f17b5 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let logList = try await users.listLogs( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-memberships.md b/docs/examples/1.7.x/server-swift/examples/users/list-memberships.md new file mode 100644 index 0000000000..24d5d75fb7 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let membershipList = try await users.listMemberships( + userId: "<USER_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/server-swift/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..702ca997c4 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaFactors = try await users.listMfaFactors( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-sessions.md b/docs/examples/1.7.x/server-swift/examples/users/list-sessions.md new file mode 100644 index 0000000000..a32923e438 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let sessionList = try await users.listSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list-targets.md b/docs/examples/1.7.x/server-swift/examples/users/list-targets.md new file mode 100644 index 0000000000..21799e3a27 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let targetList = try await users.listTargets( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/list.md b/docs/examples/1.7.x/server-swift/examples/users/list.md new file mode 100644 index 0000000000..e04d1d6228 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let userList = try await users.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-email-verification.md b/docs/examples/1.7.x/server-swift/examples/users/update-email-verification.md new file mode 100644 index 0000000000..0e206d2400 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-email.md b/docs/examples/1.7.x/server-swift/examples/users/update-email.md new file mode 100644 index 0000000000..4c24056753 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmail( + userId: "<USER_ID>", + email: "email@example.com" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-labels.md b/docs/examples/1.7.x/server-swift/examples/users/update-labels.md new file mode 100644 index 0000000000..893d5217a1 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateLabels( + userId: "<USER_ID>", + labels: [] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/server-swift/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..53ab389501 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.updateMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-mfa.md b/docs/examples/1.7.x/server-swift/examples/users/update-mfa.md new file mode 100644 index 0000000000..4756b05077 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateMfa( + userId: "<USER_ID>", + mfa: false +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-name.md b/docs/examples/1.7.x/server-swift/examples/users/update-name.md new file mode 100644 index 0000000000..e31c1e59df --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateName( + userId: "<USER_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-password.md b/docs/examples/1.7.x/server-swift/examples/users/update-password.md new file mode 100644 index 0000000000..4156dcbdca --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePassword( + userId: "<USER_ID>", + password: "" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-phone-verification.md b/docs/examples/1.7.x/server-swift/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..df3e3fcbb9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-phone.md b/docs/examples/1.7.x/server-swift/examples/users/update-phone.md new file mode 100644 index 0000000000..705e412411 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhone( + userId: "<USER_ID>", + number: "+12065550100" +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-prefs.md b/docs/examples/1.7.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 0000000000..5e4f954512 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.updatePrefs( + userId: "<USER_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-status.md b/docs/examples/1.7.x/server-swift/examples/users/update-status.md new file mode 100644 index 0000000000..d7cb876df9 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateStatus( + userId: "<USER_ID>", + status: false +) + diff --git a/docs/examples/1.7.x/server-swift/examples/users/update-target.md b/docs/examples/1.7.x/server-swift/examples/users/update-target.md new file mode 100644 index 0000000000..72ee918276 --- /dev/null +++ b/docs/examples/1.7.x/server-swift/examples/users/update-target.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://example.com/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.updateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) +