import nock from "nock"; nock("https://cloud.appwrite.io:443", { encodedQueryParams: true }) .post("/v1/databases/default/collections/blog_posts/documents", { documentId: "unique()", data: { title: "Lorem Ipsum" }, permissions: ['read("any")', 'write("any")'], }) .reply( 201, { title: "Lorem Ipsum", $id: "669e6a4e201863f43c2e", $permissions: ['read("any")', 'update("any")', 'delete("any")'], $createdAt: "2024-07-22T14:18:54.134+00:00", $updatedAt: "2024-07-22T14:18:54.134+00:00", $tenant: "169888", status: "published", content: null, images: null, $databaseId: "default", $collectionId: "blog_posts", }, [ "Access-Control-Allow-Credentials", "true", "Access-Control-Allow-Headers", "Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent", "Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE", "Access-Control-Allow-Origin", "https://localhost", "Access-Control-Expose-Headers", "X-Appwrite-Session, X-Fallback-Cookies", "Content-Length", "333", "Content-Type", "application/json; charset=UTF-8", "Date", "Mon, 22 Jul 2024 14:18:54 GMT", "Server", "Appwrite", "Strict-Transport-Security", "max-age=10886400", "X-Content-Type-Options", "nosniff", "X-Debug-Fallback", "true", "X-Debug-Speed", "0.08755087852478", "X-Ratelimit-Limit", "120", "X-Ratelimit-Remaining", "119", "X-Ratelimit-Reset", "1721657940", "Connection", "close", ], ); nock("https://cloud.appwrite.io:443", { encodedQueryParams: true }) .post("/v1/databases/default/collections/blog_posts/documents", { documentId: "lorem_ipsum", data: { title: "Lorem Ipsum" }, permissions: ['read("any")', 'write("any")'], }) .reply( 201, { title: "Lorem Ipsum", $id: "lorem_ipsum", $permissions: ['read("any")', 'update("any")', 'delete("any")'], $createdAt: "2024-07-22T14:18:54.584+00:00", $updatedAt: "2024-07-22T14:18:54.584+00:00", $tenant: "169888", status: "published", content: null, images: null, $databaseId: "default", $collectionId: "blog_posts", }, [ "Access-Control-Allow-Credentials", "true", "Access-Control-Allow-Headers", "Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent", "Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE", "Access-Control-Allow-Origin", "https://localhost", "Access-Control-Expose-Headers", "X-Appwrite-Session, X-Fallback-Cookies", "Content-Length", "324", "Content-Type", "application/json; charset=UTF-8", "Date", "Mon, 22 Jul 2024 14:18:54 GMT", "Server", "Appwrite", "Strict-Transport-Security", "max-age=10886400", "X-Content-Type-Options", "nosniff", "X-Debug-Fallback", "true", "X-Debug-Speed", "0.059834003448486", "X-Ratelimit-Limit", "120", "X-Ratelimit-Remaining", "118", "X-Ratelimit-Reset", "1721657940", "Connection", "close", ], );