{ "version": 3, "sources": ["../../../../../../owl-nest/common/api-client/src/version/2023-09-12/legacy.ts", "../../../../../../owl-nest/common/api-client/src/version/2023-09-12/api.ts", "../../../../../../owl-nest/common/api-client/src/client.ts", "../../../../../../owl-nest/common/api-client/src/oauthProxy.ts", "../../../../../../owl-nest/common/auth/src/auth.ts"], "sourcesContent": ["import { BaseMethod, ClientMethod, legacy, OAuth2 } from '../../legacy/compat.ts'\nimport { client } from './api.ts'\nimport * as types from './types.ts'\n\nexport * from './types.ts'\n\n/* /!\\ Do not add any endpoint here. This is a legacy compat that should not be\nexpended. If an existing endpoint is modified (different configuration,\ndifferent type) you can update it here. But if an existing endpoint is replace\nby another, only remove it here, write the new endpoint in the `api.ts` and use\nthe \"next\" version of the api-client for this endpoint.\n */\n\nexport type Api = {\n delete: BaseMethod & {\n account: ClientMethod\n addresses: ClientMethod\n analyticsTag: ClientMethod\n comment: ClientMethod\n image: ClientMethod\n member: ClientMethod\n projectSlug: ClientMethod\n review: ClientMethod\n }\n get: BaseMethod & {\n account: ClientMethod\n accounts: ClientMethod, 'userId'>\n addresses: ClientMethod\n categories: ClientMethod, never>\n channels: ClientMethod, never>\n commentReplies: ClientMethod>, 'commentId'>\n me: ClientMethod\n myDiscussionsStats: ClientMethod\n news: ClientMethod, 'newsId'>\n newsComment: ClientMethod>, 'newsId'>\n officialUsers: ClientMethod>\n order: ClientMethod, 'orderId'>\n partner: ClientMethod\n productReview: ClientMethod, 'productId'>\n project: ClientMethod\n projectAnalytics: ClientMethod\n projectComment: ClientMethod>, 'projectId'>\n projectEvents: ClientMethod, 'projectId'>\n projectFan: ClientMethod, 'projectId'>\n projectFaq: ClientMethod, 'projectId'>\n projectImage: ClientMethod, 'projectId'>\n projectImpact: ClientMethod\n projectMember: ClientMethod\n projectNews: ClientMethod>, 'projectId'>\n projectOrders: ClientMethod>, 'projectId'>\n projectRewards: ClientMethod\n projectSupporter: ClientMethod, 'projectId'>\n proposal: ClientMethod\n sdgs: ClientMethod\n search: ClientMethod>\n subscriptionsOrders: ClientMethod>>\n tags: ClientMethod, never>\n thread: ClientMethod\n user: ClientMethod\n userAddresses: ClientMethod\n userOrders: ClientMethod, 'userId'>\n userReviews: ClientMethod, 'userId'>\n variant: ClientMethod\n withdrawals: ClientMethod>, 'projectId'>\n }\n patch: BaseMethod & {\n addresses: ClientMethod\n proposal: ClientMethod\n member: ClientMethod\n project: ClientMethod\n projectImpact: ClientMethod\n order: ClientMethod\n review: ClientMethod\n user: ClientMethod\n userAvatar: ClientMethod<{ image: File }, unknown, 'userId'>\n }\n post: BaseMethod & {\n accounts: ClientMethod\n cancelOrder: ClientMethod\n cancelSubscription: ClientMethod\n commentReplies: ClientMethod\n likeProject: ClientMethod\n link: ClientMethod\n markOrderAsDelivered: ClientMethod, 'orderId'>\n markOrderAsUndelivered: ClientMethod, 'orderId'>\n newsComment: ClientMethod, 'newsId'>\n orderReturn: ClientMethod\n passwordScore: ClientMethod<{ password: string }, { score: types.PasswordStrength }>\n projectAnalytics: ClientMethod\n projectCancel: ClientMethod\n projectComment: ClientMethod, 'projectId'>\n projectComputeExamples: ClientMethod<\n types.ProjectExamplesRequest,\n types.ProjectExamplesResponse | undefined,\n 'projectId'\n >\n projectExports: ClientMethod\n projectEnd: ClientMethod\n projectFaq: ClientMethod\n projectImage: ClientMethod\n projectMember: ClientMethod\n projectOrders: ClientMethod\n projectPublish: ClientMethod\n projectSubmit: ClientMethod\n projectSubscriptions: ClientMethod\n /** @deprecated Set to be removed from the Ulule API, use the `video_url` field in the ProjectUpdate payload instead. */\n projectVideo: ClientMethod\n proposals: ClientMethod\n proposalRefuse: ClientMethod\n userProposals: ClientMethod\n renewOrder: ClientMethod, types.Order, 'orderId'>\n rewardReview: ClientMethod\n shippingRates: ClientMethod\n subscribeNewsLetter: ClientMethod<{ country: string; email: string; lang: string }>\n unlikeProject: ClientMethod\n userAddresses: ClientMethod\n userImage: ClientMethod }, 'userId'>\n withdrawals: ClientMethod\n }\n put: BaseMethod\n oauth2: OAuth2\n\n endpoints: {\n me: { url: string }\n }\n}\n\nexport const api = {\n ...legacy(client, {\n DELETE: (endpoint) => {\n endpoint('account', 'DELETE /accounts/:id', ({ accountId }) => ({ id: accountId }))\n endpoint('addresses', 'DELETE /addresses/:id', ({ addressId }) => ({ id: addressId }))\n endpoint('analyticsTag', 'DELETE /analytics/:id', ({ analyticsTagId }) => ({ id: analyticsTagId }))\n endpoint('comment', 'DELETE /comments/:id', ({ commentId }) => ({ id: commentId }))\n endpoint('image', 'DELETE /images/:id', ({ imageId }) => ({ id: imageId }))\n endpoint('member', 'DELETE /members/:id', ({ memberId }) => ({ id: memberId }))\n endpoint('projectSlug', 'DELETE /slugs/:id', ({ slugId }) => ({ id: slugId }))\n endpoint('review', 'DELETE /reviews/:id', ({ reviewId }) => ({ id: reviewId }))\n },\n GET: (endpoint) => {\n endpoint('account', 'GET /accounts/:id', ({ accountId }) => ({ id: accountId }))\n endpoint('accounts', 'GET /users/:id/accounts', ({ userId }) => ({ id: userId }))\n endpoint('addresses', 'GET /addresses/:id', ({ addressId }) => ({ id: addressId }))\n endpoint('categories', 'GET /categories', () => ({}))\n endpoint('channels', 'GET /channels', () => ({}))\n endpoint('commentReplies', 'GET /comments/:id/replies', ({ commentId }) => ({ id: commentId }))\n endpoint('me', 'GET /me', () => ({}))\n endpoint('myDiscussionsStats', 'GET /discussions/me', () => ({}))\n endpoint('news', 'GET /news/:id', ({ newsId }) => ({ id: newsId }))\n endpoint('newsComment', 'GET /news/:id/comments', ({ newsId }) => ({ id: newsId }))\n endpoint('officialUsers', 'GET /officialusers', () => ({}))\n endpoint('order', 'GET /orders/:id', ({ orderId }) => ({ id: orderId }))\n endpoint('partner', 'GET /partners/:id', ({ partnerId }) => ({ id: partnerId }))\n endpoint('productReview', 'GET /rewards/shopify-:id/reviews', ({ productId }) => ({ id: productId }))\n endpoint('project', 'GET /projects/:id', ({ projectId }) => ({ id: projectId }))\n endpoint('projectAnalytics', 'GET /projects/:id/analytics', ({ projectId }) => ({ id: projectId }))\n endpoint('projectComment', 'GET /projects/:id/comments', ({ projectId }) => ({ id: projectId }))\n endpoint('projectEvents', 'GET /projects/:id/events', ({ projectId }) => ({ id: projectId }))\n endpoint('projectFan', 'GET /projects/:id/fans', ({ projectId }) => ({ id: projectId }))\n endpoint('projectFaq', 'GET /projects/:id/faq', ({ projectId }) => ({ id: projectId }))\n endpoint('projectImage', 'GET /projects/:id/images', ({ projectId }) => ({ id: projectId }))\n endpoint('projectImpact', 'GET /projects/:id/impact', ({ projectId }) => ({ id: projectId }))\n endpoint('projectMember', 'GET /projects/:id/members', ({ projectId }) => ({ id: projectId }))\n endpoint('projectNews', 'GET /projects/:id/news', ({ projectId }) => ({ id: projectId }))\n endpoint('projectOrders', 'GET /projects/:id/orders', ({ projectId }) => ({ id: projectId }))\n endpoint('projectRewards', 'GET /projects/:id/rewards', ({ projectId }) => ({ id: projectId }))\n endpoint('projectSupporter', 'GET /projects/:id/supporters', ({ projectId }) => ({ id: projectId }))\n endpoint('proposal', 'GET /proposals/:id', ({ token }) => ({ id: token }))\n endpoint('sdgs', 'GET /sdgs', () => ({}))\n endpoint('search', 'GET /search/projects', () => ({}))\n endpoint('subscriptionsOrders', 'GET /subscriptions/:id/orders', ({ subscriptionId }) => ({ id: subscriptionId }))\n endpoint('tags', 'GET /tags', () => ({}))\n endpoint('thread', 'GET /threads/:id', ({ threadId }) => ({ id: threadId }))\n endpoint('user', 'GET /users/:id', ({ userId }) => ({ id: userId }))\n endpoint('userAddresses', 'GET /users/:id/addresses', ({ userId }) => ({ id: userId }))\n endpoint('userOrders', 'GET /users/:id/orders', ({ userId }) => ({ id: userId }))\n endpoint('userReviews', 'GET /users/:id/reviews', ({ userId }) => ({ id: userId }))\n endpoint('variant', 'GET /rewards/:id', ({ variantId }) => ({ id: variantId }))\n endpoint('withdrawals', 'GET /projects/:id/withdrawals', ({ projectId }) => ({ id: projectId }))\n },\n PATCH: (endpoint) => {\n endpoint('addresses', 'PATCH /addresses/:id', ({ addressId }) => ({ id: addressId }))\n endpoint('proposal', 'PATCH /proposals/:id', ({ token }) => ({ id: token }))\n endpoint('member', 'PATCH /members/:id', ({ memberId }) => ({ id: memberId }))\n endpoint('project', 'PATCH /projects/:id', ({ projectId }) => ({ id: projectId }))\n endpoint('projectImpact', 'PATCH /projects/:id/impact', ({ projectId }) => ({ id: projectId }))\n endpoint('order', 'PATCH /orders/:id', ({ orderId }) => ({ id: orderId }))\n endpoint('review', 'PATCH /reviews/:id', ({ reviewId }) => ({ id: reviewId }))\n endpoint('user', 'PATCH /users/:id', ({ userId }) => ({ id: userId }))\n endpoint('userAvatar', 'PATCH /users/:id/avatar', ({ userId }) => ({ id: userId }))\n },\n POST: (endpoint) => {\n endpoint('accounts', 'POST /users/:id/accounts', ({ userId }) => ({ id: userId }))\n endpoint('cancelOrder', 'POST /orders/:id/cancel', ({ orderId }) => ({ id: orderId }))\n endpoint('cancelSubscription', 'POST /subscriptions/:id/cancel', ({ subscriptionId }) => ({ id: subscriptionId }))\n endpoint('commentReplies', 'POST /comments/:id/replies', ({ commentId }) => ({ id: commentId }))\n endpoint('likeProject', 'POST /projects/:id/like', ({ projectId }) => ({ id: projectId }))\n endpoint('link', 'POST /links', () => ({}))\n endpoint('markOrderAsDelivered', 'POST /orders/:id/mark-as-delivered', ({ orderId }) => ({ id: orderId }))\n endpoint('markOrderAsUndelivered', 'POST /orders/:id/mark-as-undelivered', ({ orderId }) => ({ id: orderId }))\n endpoint('newsComment', 'POST /news/:id/comments', ({ newsId }) => ({ id: newsId }))\n endpoint('orderReturn', 'POST /orders/:id/returns', ({ orderId }) => ({ id: orderId }))\n endpoint('passwordScore', 'POST /passwords/score', () => ({}))\n endpoint('projectAnalytics', 'POST /projects/:id/analytics', ({ projectId }) => ({ id: projectId }))\n endpoint('projectCancel', 'POST /projects/:id/cancel', ({ projectId }) => ({ id: projectId }))\n endpoint('projectComment', 'POST /projects/:id/comments', ({ projectId }) => ({ id: projectId }))\n endpoint('projectComputeExamples', 'POST /projects/:id/compute-examples', ({ projectId }) => ({ id: projectId }))\n endpoint('projectExports', 'POST /projects/:id/exports', ({ projectId }) => ({ id: projectId }))\n endpoint('projectEnd', 'POST /projects/:id/end', ({ projectId }) => ({ id: projectId }))\n endpoint('projectFaq', 'POST /projects/:id/faq', ({ projectId }) => ({ id: projectId }))\n endpoint('projectImage', 'POST /projects/:id/images', ({ projectId }) => ({ id: projectId }))\n endpoint('projectMember', 'POST /projects/:id/members', ({ projectId }) => ({ id: projectId }))\n endpoint('projectOrders', 'POST /projects/:id/orders', ({ projectId }) => ({ id: projectId }))\n endpoint('projectPublish', 'POST /projects/:id/publish', ({ projectId }) => ({ id: projectId }))\n endpoint('projectSubmit', 'POST /projects/:id/submit', ({ projectId }) => ({ id: projectId }))\n endpoint('projectSubscriptions', 'POST /projects/:id/subscriptions', ({ projectId }) => ({ id: projectId }))\n endpoint('projectVideo', 'POST /projects/:id/videos', ({ projectId }) => ({ id: projectId }))\n endpoint('proposals', 'POST /proposals', () => ({}))\n endpoint('proposalRefuse', 'POST /proposals/:id/refuse', ({ token }) => ({ id: token }))\n endpoint('userProposals', 'POST /users/:id/proposals', ({ userId }) => ({ id: userId }))\n endpoint('renewOrder', 'POST /orders/:id/renew', ({ orderId }) => ({ id: orderId }))\n endpoint('rewardReview', 'POST /rewards/:id/reviews', ({ variantId }) => ({ id: variantId }))\n endpoint('shippingRates', 'POST /shipping-rates', () => ({}))\n endpoint('subscribeNewsLetter', 'POST /newsletters/monthly', () => ({}))\n endpoint('unlikeProject', 'POST /projects/:id/unlike', ({ projectId }) => ({ id: projectId }))\n endpoint('userAddresses', 'POST /users/:id/addresses', ({ userId }) => ({ id: userId }))\n endpoint('userImage', 'POST /users/:id/images', ({ userId }) => ({ id: userId }))\n endpoint('withdrawals', 'POST /projects/:id/withdrawals', ({ projectId }) => ({ id: projectId }))\n },\n PUT: () => {\n //empty\n },\n }),\n endpoints: {\n me: { url: '/me' },\n },\n} as unknown as Api\n", "import { createClient, endpoint } from '../../client.ts'\nimport * as api from './types.ts'\nimport { setCookie, getCookie } from '@owl-nest/cookie-helper'\nimport { djangoOauth2 } from '../../oauthProxy.ts'\nimport * as env from '@owl-nest/config'\n\nexport const client = createClient({\n endpoints: [\n // ACCOUNTS\n endpoint('GET /accounts/:id').config<{\n output: api.Account\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('PATCH /accounts/:id').config<{\n input: api.UpdateAccount\n output: api.Account\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('DELETE /accounts/:id').config({\n withToken: true,\n }),\n\n // ADDRESSES\n endpoint('GET /addresses/:id').config<{\n output: api.Address\n }>({\n withToken: true,\n }),\n endpoint('PATCH /addresses/:id').config<{\n input: api.UpdateAddress\n output: api.Address\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('DELETE /addresses/:id').config({\n withToken: true,\n }),\n\n // ANALYTICS\n endpoint('DELETE /analytics/:id').config({\n withToken: true,\n }),\n\n // CATEGORIES\n endpoint('GET /categories').config<{\n output: api.Pageable\n }>({}),\n\n // CHANNELS\n endpoint('GET /channels').config<{\n output: api.Pageable\n }>({}),\n\n // COMMENTS\n endpoint('DELETE /comments/:id').config({\n withToken: true, // only accessible to staff\n }),\n endpoint('POST /comments/:id/replies').config<{\n input: api.CreateComment\n output: api.Comment\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /comments/:id/replies').config<{\n output: api.Pageable>\n }>({}),\n\n // DISCUSSIONS\n endpoint('GET /discussions/me').config<{\n output: api.UserDiscussionsStats\n }>({\n withToken: true,\n }),\n\n // IMAGES\n endpoint('DELETE /images/:id').config({\n withToken: true,\n }),\n\n // LINKS\n endpoint('POST /links').config<{\n input: api.CreateLink\n output: api.Link\n }>({\n type: 'json',\n }),\n\n // ME\n endpoint('GET /me').config<{\n output: api.AuthenticatedUser\n }>({\n withToken: true,\n }),\n\n // MEMBERS\n endpoint('DELETE /members/:id').config({\n withToken: true,\n }),\n endpoint('PATCH /members/:id').config<{\n input: api.UpdateMember\n output: api.Member\n }>({\n withToken: true,\n type: 'json',\n }),\n\n // NEWS\n endpoint('GET /news/:id').config<{\n output: api.News\n }>({}),\n endpoint('GET /news/:id/comments').config<{\n output: api.Pageable>\n }>({}),\n endpoint('PATCH /news/:id').config<{\n input: api.CreateNews\n output: api.News\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /news/:id/comments').config<{\n input: api.CreateComment\n output: api.Comment\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /news/:id/publish').config<{\n output: api.News\n }>({\n withToken: true,\n }),\n endpoint('POST /news/:id/unpublish').config<{\n output: api.News\n }>({\n withToken: true,\n }),\n endpoint('POST /news/:id/try').config({\n withToken: true,\n }),\n endpoint('DELETE /news/:id').config({\n withToken: true,\n }),\n\n // NEWSLETTER\n endpoint('POST /newsletters/monthly').config<{\n input: { country: string; email: string; lang: string }\n }>({\n type: 'json',\n }),\n\n // OFFICIALUSER\n endpoint('GET /officialusers').config<{\n output: api.Pageable\n }>({}),\n\n // ORDERS\n endpoint('GET /orders/:id').config<{\n output: api.Order\n }>({\n withToken: true,\n }),\n endpoint('PATCH /orders/:id').config<{\n input: api.UpdateOrder\n output: api.Order\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /orders/:id/cancel').config<{\n output: api.Order\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /orders/:id/mark-as-delivered').config<{\n output: api.Order\n }>({\n withToken: true,\n }),\n endpoint('POST /orders/:id/mark-as-undelivered').config<{\n output: api.Order\n }>({\n withToken: true,\n }),\n endpoint('POST /orders/:id/renew').config<{\n input: Partial\n output: api.Order\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /orders/:id/returns').config<{\n input: api.CreateReturn\n output: api.OrderReturn\n }>({\n withToken: true,\n type: 'json',\n }),\n\n // PARTNERS\n endpoint('GET /partners/:id').config<{\n output: api.Partner\n }>({}),\n\n // PASSWORD\n endpoint('POST /passwords/score').config<{\n input: { password: string }\n output: { score: api.PasswordStrength }\n }>({\n type: 'json',\n }),\n\n // PROJECT\n endpoint('GET /projects/:id').config<{\n output: api.Project\n }>({}),\n endpoint('PATCH /projects/:id').config<{\n input: api.UpdateProject\n output: api.Project\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/analytics').config<{\n output: api.AnalyticsTags\n }>({\n withToken: true,\n }),\n endpoint('POST /projects/:id/analytics').config<{\n input: api.CreateAnalyticsTag\n output: api.NewAnalyticsTag\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/cancel').config<{\n output: api.Project\n }>({\n withToken: true,\n }),\n endpoint('GET /projects/:id/comments').config<{\n output: api.Pageable>\n }>({}),\n endpoint('POST /projects/:id/comments').config<{\n input: api.CreateComment\n output: api.Comment\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/compute-examples').config<{\n input: api.ProjectExamplesRequest\n output: api.ProjectExamplesResponse | undefined\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/dropoff-points').config<{\n input: api.ProjectDropoffPointsRequest\n output: api.ProjectDropoffPointsResponse\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/end').config<{\n output: api.Project\n }>({\n withToken: true,\n }),\n endpoint('GET /projects/:id/events').config<{\n output: api.Pageable\n }>({}),\n endpoint('POST /projects/:id/exports').config<{\n input: api.CreateExport\n output: api.Export\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/fans').config<{\n output: api.Pageable\n }>({}),\n endpoint('POST /projects/:id/faq').config<{\n input: api.CreateFaq\n output: api.Faq\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/faq').config<{\n output: api.Pageable\n }>({}),\n endpoint('POST /projects/:id/images').config<{\n input: api.CreateImage\n output: api.ImageResource\n }>({\n withToken: true,\n type: 'formdata',\n }),\n endpoint('GET /projects/:id/images').config<{\n output: api.Pageable<{ images: api.ImageResource[] | null }>\n }>({\n withToken: true,\n }),\n endpoint('GET /projects/:id/impact').config<{\n output: api.Impact\n }>({}),\n endpoint('PATCH /projects/:id/impact').config<{\n input: api.UpdateImpact\n output: api.Impact\n }>({\n type: 'json',\n withToken: true,\n }),\n endpoint('POST /projects/:id/like').config({\n withToken: true,\n }),\n endpoint('GET /projects/:id/members').config<{\n output: api.MemberList\n }>({\n withToken: true,\n }),\n endpoint('POST /projects/:id/members').config<{\n input: api.CreateMember\n output: api.Member\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/news').config<{\n output: api.Pageable>\n }>({}),\n endpoint('POST /projects/:id/news').config<{\n input: api.CreateNews\n output: api.News\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/orders').config<{\n output: api.WithOrderFacets>\n }>({\n withToken: true,\n }),\n endpoint('POST /projects/:id/orders').config<{\n input: api.CreateOrder\n output: api.Order\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/publish').config<{\n input: api.ProjectPublishRequest\n output: api.Project\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/referrals').config<{\n output: api.ReferralListPage\n }>({\n withToken: true,\n }),\n endpoint('POST /projects/:id/refresh/:provider').config<{\n output: api.Project\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/rewards').config<{\n output: api.Reward[]\n }>({}),\n endpoint('POST /projects/:id/rewards').config<{\n input: api.CreateReward\n output: api.Reward\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/send-referral-summary').config<{\n input: {\n referral_user_id: number\n }\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/shipping-zones').config<{\n input: api.CreateShippingZone\n output: api.ShippingZones\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/stats').config<{\n output: api.ProjectStatistics\n }>({\n withToken: true,\n }),\n endpoint('POST /projects/:id/submit').config<{\n input: api.ProjectSubmitRequest\n output: api.Project\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/subscriptions').config<{\n input: api.CreateSubscription\n output: api.Subscription\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/supporters').config<{\n output: api.Pageable\n }>({}),\n endpoint('POST /projects/:id/unlike').config({\n withToken: true,\n }),\n endpoint('POST /projects/:id/unlink-social').config<{\n input: api.UnlinkSocialConnect\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /projects/:id/withdrawals').config<{\n output: api.Withdrawal\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /projects/:id/withdrawals').config<{\n output: api.Pageable>\n }>({\n withToken: true,\n }),\n\n // PROPOSALS\n endpoint('POST /proposals').config<{\n input: api.CreateProposal | api.CreateAnonymousProposal\n output: api.Proposal\n }>({\n type: 'json',\n }),\n endpoint('GET /proposals/:id').config<{\n output: api.Proposal\n }>({}),\n endpoint('PATCH /proposals/:id').config<{\n input: api.UpdateProposal\n output: api.Proposal\n }>({\n type: 'json',\n }),\n endpoint('POST /proposals/:id/refuse').config<{\n input: api.UpdateProposal\n output: api.Proposal\n }>({\n type: 'json',\n withToken: true,\n }),\n\n // REVIEWS\n endpoint('PATCH /reviews/:id').config<{\n input: api.UpdateReview\n output: api.Review\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('DELETE /reviews/:id').config({\n withToken: true,\n }),\n\n // REWARDS\n endpoint('GET /rewards/:id').config<{\n output: api.Variant\n }>({\n type: 'json',\n withToken: true,\n }),\n endpoint('PATCH /rewards/:id').config<{\n input: api.UpdateReward\n output: api.Reward\n }>({\n type: 'json',\n withToken: true,\n }),\n endpoint('DELETE /rewards/:id').config({\n withToken: true,\n }),\n endpoint('POST /rewards/:id/reviews').config<{\n input: api.CreateReview\n output: api.Review\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /rewards/shopify-:id/reviews').config<{\n output: api.Pageable\n }>({}),\n endpoint('GET /rewards/:id/shippings').config<{\n output: api.RewardShipping\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('PATCH /rewards/:id/shippings').config<{\n input: api.CreateRewardShipping\n output: api.RewardShipping\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('DELETE /rewards/:id/shippings').config<{}>({\n withToken: true,\n }),\n endpoint('GET /rewards/:id/variants').config<{\n output: { variants: api.Variant[] }\n }>({}),\n\n // SEARCH\n endpoint('GET /search/projects').config<{\n output: api.Pageable\n }>({}),\n\n // SDGS\n endpoint('GET /sdgs').config<{\n output: api.SDGList\n }>({}),\n\n // SHIPPING RATES\n endpoint('POST /shipping-rates').config<{\n input: api.ShippingRateRequest\n output: api.ShippingRateList\n }>({\n type: 'json',\n }),\n\n // SHIPPING ZONES\n endpoint('DELETE /shipping-zones/:id').config({\n withToken: true,\n }),\n endpoint('PATCH /shipping-zones/:id').config<{ input: api.UpdateShippingZone; output: api.ShippingZones }>({\n withToken: true,\n type: 'json',\n }),\n\n // SLUGS\n endpoint('DELETE /slugs/:id').config({\n withToken: true,\n }),\n\n // SUBSCRIPTIONS\n endpoint('POST /subscriptions/:id/cancel').config<{\n output: api.Subscription\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /subscriptions/:id/exports').config({\n withToken: true,\n }),\n endpoint('GET /subscriptions/:id/orders').config<{\n output: api.Pageable>\n }>({\n withToken: true,\n }),\n\n // TAGS\n endpoint('GET /tags').config<{\n output: api.Pageable\n }>({}),\n\n // THREADS\n endpoint('GET /threads/:id').config<{\n output: api.DiscussionThread\n }>({\n withToken: true,\n }),\n\n // USERS\n endpoint('GET /users/:id').config<{\n output: api.PublicUser\n }>({}),\n endpoint('PATCH /users/:id').config<{\n input: api.UpdateUser\n output: api.AuthenticatedUser\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('DELETE /users/:id').config<{\n input: api.DeleteUser\n output: api.DeleteUserResponse\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('POST /users/:id/accounts').config<{\n input: api.CreateAccount\n output: api.Account\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /users/:id/accounts').config<{\n output: api.Pageable<{ accounts: api.Account[] | null }>\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /users/:id/addresses').config<{\n output: api.Addresses\n }>({\n withToken: true,\n }),\n endpoint('POST /users/:id/addresses').config<{\n input: api.CreateAddress\n output: api.Address\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('PATCH /users/:id/avatar').config<{\n input: { image: File }\n }>({\n withToken: true,\n type: 'formdata',\n }),\n endpoint('POST /users/:id/images').config<{\n input: api.CreateImage\n output: { id: number; versions?: Record }\n }>({\n withToken: true,\n type: 'formdata',\n }),\n endpoint('GET /users/:id/orders').config<{\n output: api.Pageable>\n }>({\n withToken: true,\n }),\n endpoint('GET /users/:id/projects').config<{\n output: api.Pageable\n }>({}),\n endpoint('POST /users/:id/proposals').config<{\n input: api.CreateProposal\n output: api.Proposal\n }>({\n withToken: true,\n type: 'json',\n }),\n endpoint('GET /users/:id/reviews').config<{\n output: api.Pageable\n }>({\n withToken: true,\n }),\n endpoint('POST /users/social/unlink').config<{\n input: api.UnlinkSocialConnect\n }>({\n withToken: true,\n type: 'json',\n }),\n ],\n deprecated: [\n endpoint('POST /projects/:id/videos').config<{\n input: api.CreateProjectVideo\n output: api.VideoResource\n }>({\n withToken: true,\n type: 'json',\n }),\n ],\n})({\n version: '2023-09-12',\n baseUrl: env.ROOT_ULULE_API_URL,\n getAccessToken: () => {\n if (env.ACCESS_TOKEN_COOKIE_NAME === undefined) {\n throw Error('No access token cookie name found')\n }\n return getCookie(env.ACCESS_TOKEN_COOKIE_NAME)\n },\n getRefreshToken: () => {\n if (env.REFRESH_TOKEN_COOKIE_NAME === undefined) {\n throw Error('No refresh token cookie name found')\n }\n return getCookie(env.REFRESH_TOKEN_COOKIE_NAME)\n },\n persistAccessToken: (token) => {\n if (env.ACCESS_TOKEN_COOKIE_NAME === undefined) {\n throw Error('No access token cookie name found')\n }\n return setCookie(env.ACCESS_TOKEN_COOKIE_NAME, token)\n },\n refreshAccessToken: djangoOauth2,\n})\n", "import { OAuthOptions, oauthRequest, OAuthRequestOptions } from './oauthRequester.ts'\nimport { HttpResponse } from './requester.ts'\nimport { UrlParameters } from './UrlParameters.ts'\n\ntype Transput = {\n output: RESPONSE_BODY\n input: REQUEST_BODY\n}\n\ntype CompleteTransput> = {\n output: PARTIAL extends { output: unknown } ? PARTIAL['output'] : void\n input: PARTIAL extends { input: unknown } ? PARTIAL['input'] : void\n}\n\ntype ClientOptions = {\n version: string\n baseUrl: string\n} & Partial\n\nexport type EndpointOptions = Pick\n\ntype Simplify = { [K in keyof TYPE]: TYPE[K] }\n\ntype RequestOptionBody = TRANSPUT['input'] extends void ? {} : { body: TRANSPUT['input'] }\n\ntype RequestOptionUrlParameters = UrlParameters['length'] extends 0\n ? {}\n : {\n urlParams: Record[number], string>\n }\n\ntype RequestOptions = Simplify<\n Omit & {\n getParams?: Record | string | URLSearchParams\n } & RequestOptionBody &\n RequestOptionUrlParameters\n>\n\ntype RelaxedRequestOptions = Omit & {\n version?: string\n body?: any\n getParams?: Record | string | URLSearchParams\n urlParams?: Record\n}\n\nexport type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'\n\ntype Endpoint = {\n identifier: IDENTIFIER\n options: EndpointOptions\n}\n\nexport type TypedEndpoint<\n IDENTIFIER extends `${HttpMethod} ${string}`,\n TRANSPUT extends Transput,\n> = Endpoint & {\n $$brand$$transput: TRANSPUT\n}\n\ntype DeprecatedTypedEndpoint = TypedEndpoint<\n IDENTIFIER,\n TRANSPUT\n> & {\n deprecated: true\n}\n\nexport function endpoint(\n identifier: IDENTIFIER,\n): {\n config = Record>(\n options: EndpointOptions,\n ): TypedEndpoint>\n deprecated>(\n options: EndpointOptions,\n ): DeprecatedTypedEndpoint>\n} {\n return { config, deprecated }\n\n function deprecated>(\n options: EndpointOptions,\n ): DeprecatedTypedEndpoint> {\n return { identifier, options, deprecated: true } as DeprecatedTypedEndpoint<\n IDENTIFIER,\n CompleteTransput\n >\n }\n\n function config>(\n options: EndpointOptions,\n ): TypedEndpoint> {\n return { identifier, options } as TypedEndpoint>\n }\n}\n\nexport type EndpointDict[]> = {\n [IDENTIFIER in ENDPOINTS[number]['identifier']]: Extract>\n}\n\nexport interface Client<\n ENDPOINTS extends TypedEndpoint[],\n DEPRECATED_ENDPOINTS extends TypedEndpoint[],\n> {\n (\n identifier: IDENTIFIER,\n requestOptions: RequestOptions<\n IDENTIFIER extends `${HttpMethod} ${infer URL}` ? URL : '',\n EndpointDict[IDENTIFIER]['$$brand$$transput']\n >,\n ): EndpointDict[IDENTIFIER] extends TypedEndpoint\n ? Promise>\n : never\n\n /** @deprecated */\n deprecated(\n /** @deprecated */\n identifier: IDENTIFIER,\n requestOptions: RequestOptions<\n IDENTIFIER extends `${HttpMethod} ${infer URL}` ? URL : '',\n EndpointDict[IDENTIFIER]['$$brand$$transput']\n >,\n ): EndpointDict[IDENTIFIER] extends TypedEndpoint\n ? Promise>\n : never\n\n _generic: (identifier: string, requestOptions: RequestOptions) => Promise>\n _endpoints: [...ENDPOINTS, ...DEPRECATED_ENDPOINTS]\n}\n\nexport function createClient<\n ENDPOINTS extends TypedEndpoint[],\n DEPRECATED_ENDPOINTS extends TypedEndpoint[],\n>(config: {\n endpoints: ENDPOINTS\n deprecated: DEPRECATED_ENDPOINTS\n}): (options: ClientOptions) => Client {\n return (clientOptions) => {\n const client = makeGenericClient(clientOptions, config.endpoints, true) as Client\n client.deprecated = makeGenericClient(clientOptions, config.endpoints, true) as Client<\n ENDPOINTS,\n DEPRECATED_ENDPOINTS\n >\n\n client._generic = makeGenericClient(clientOptions, config.endpoints, false)\n\n client._endpoints = [...config.endpoints, ...config.deprecated]\n\n return client\n }\n}\n\nexport function makeGenericClient(clientOptions: ClientOptions, endpoints: TypedEndpoint[], strict: boolean) {\n return (identifier: string, _requestOptions: RequestOptions) => {\n const requestOptions: RelaxedRequestOptions = { ..._requestOptions }\n\n let endpoint = endpoints.find((endpoint) => endpoint.identifier === identifier)\n if (endpoint === undefined) {\n if (strict) {\n throw Error('unknown endpoint')\n } else {\n endpoint = { identifier, options: {} } as TypedEndpoint\n }\n }\n\n const method = endpoint.identifier.slice(0, endpoint.identifier.indexOf(' '))\n let path = endpoint.identifier.slice(endpoint.identifier.indexOf(' ') + 1)\n if (path.startsWith('/')) {\n path = path.slice(1)\n }\n\n const baseUrl = clientOptions.baseUrl.endsWith('/') ? clientOptions.baseUrl : `${clientOptions.baseUrl}/`\n\n const url = new URL(path, baseUrl)\n\n if (requestOptions.getParams) {\n url.search = new URLSearchParams(requestOptions.getParams).toString()\n }\n delete requestOptions.getParams\n\n if (requestOptions.urlParams) {\n for (const [name, value] of Object.entries(requestOptions.urlParams)) {\n url.pathname = url.pathname.replace(new RegExp(`\\\\:${name}`, 'g'), String(value))\n }\n delete requestOptions.urlParams\n }\n\n const headers = new Headers(requestOptions.headers)\n headers.set('Ulule-Version', requestOptions.version ?? clientOptions.version)\n\n return oauthRequest(url.toString(), {\n ...requestOptions,\n method,\n headers,\n getAccessToken: requestOptions.getAccessToken ?? clientOptions.getAccessToken,\n getRefreshToken: requestOptions.getRefreshToken ?? clientOptions.getRefreshToken,\n persistAccessToken: requestOptions.persistAccessToken ?? clientOptions.persistAccessToken,\n refreshAccessToken: requestOptions.refreshAccessToken ?? clientOptions.refreshAccessToken,\n // checking key presence here (instead of just ?? fallback) to align with\n // legacy client-api. If a `withToken` or a `type` is passed during the\n // request, even if the value is undefined, it should override the\n // endpoint config\n withToken: 'withToken' in requestOptions ? requestOptions.withToken : endpoint.options.withToken,\n type: ('type' in requestOptions ? requestOptions.type : endpoint.options.type) as any,\n })\n }\n}\n", "import { request } from './requester.ts'\nimport * as env from '@owl-nest/config'\n\nexport type VercelOAuth2Grants = {\n shopify_order_number: {\n email: string\n shopify_order_number: number\n }\n refresh_token: {\n refresh_token: string\n }\n}\n\nexport type VercelOAuth2Response = {\n access_token: string\n expires_in: number\n refresh_token: string\n scope: string\n token_type: string\n}\n\nexport async function vercelOauth2(\n grant: GRANT,\n params: VercelOAuth2Grants[GRANT],\n) {\n const response = await request(\n env.VERCEL_URL === undefined ? '/api/oauth2' : env.VERCEL_URL + '/api/oauth2',\n {\n method: 'POST',\n type: 'json',\n body: {\n grant_type: grant,\n ...params,\n },\n },\n )\n\n return response.next((response) => response.body.access_token)\n}\n\ntype RefreshResponsBody = { access_token: string }\n\nexport async function djangoOauth2(refreshToken: string) {\n if (env.REFRESH_TOKEN_ENDPOINT === undefined) {\n throw Error('No refresh token endpoint found')\n }\n\n const response = await request(env.REFRESH_TOKEN_ENDPOINT, {\n type: 'formdata',\n method: 'POST',\n body: {\n refresh_token: refreshToken,\n },\n })\n\n return response.next((response) => response.body.access_token)\n}\n", "import { request, ApiResponse, RequestFailure } from '@owl-nest/api-client'\nimport { AuthenticatedUser, PublicUser, UpdateUser, api, ApiError } from '@owl-nest/api-client/latest'\nimport { getCookie } from '@owl-nest/cookie-helper'\nimport { Either } from '@owl-nest/monad'\nimport * as dateUtil from '@owl-nest/date'\nimport * as env from '@owl-nest/config'\n\nexport type SignupUser = {\n password: string\n lang?: string\n email: string\n username?: string\n}\n\nexport type LoginUser = {\n username: string\n password: string\n 'stay-connected': boolean\n}\n\ntype ExtendedUser = AuthenticatedUser & { extraFields: EXTRA_FIELDS[] }\n\nexport async function userExists(\n type: 'email' | 'username',\n identifier: string,\n): Promise> {\n const response = await request(env.SIGNUP_URL, {\n method: 'POST',\n type: 'urlencoded',\n body: {\n [type]: identifier,\n dry_run: true,\n // Random password to pass the password validation API-side\n password: '%JVbgkcM8yDUVCgoVzCUxtPE',\n csrfmiddlewaretoken: getCookie('csrftoken'),\n },\n })\n\n return response.caseOf>({\n left: (failure) => {\n if (failure.body?.type === 'APIError') {\n failure = unwrapDjangoError(failure)\n }\n if (isAlreadyExistsError(failure)) {\n if (isUnusablePasswordError(failure)) {\n return Either.right('facebook')\n }\n return Either.right('ulule')\n }\n return Either.left({ ...failure, bypassStatusAutomaticActions: true })\n },\n right: (_) => Either.right(undefined),\n })\n}\n\nexport async function currentUser(\n doNotRedirectToSignIn = true,\n extraFields: EXTRA_FIELDS[] = [],\n): Promise>> {\n const response = await api.get.me({\n getParams: { extra_fields: extraFields.join(',') },\n })\n\n return response.caseOf({\n left: (failure) => {\n return Either.left({ ...failure, doNotRedirectToSignIn })\n },\n right: (success) => {\n const authenticatedUser = success.body as AuthenticatedUser\n return Either.right({ ...authenticatedUser, extraFields })\n },\n })\n}\n\nexport async function signup(signup: SignupUser): Promise> {\n const response = await request(env.SIGNUP_URL, {\n method: 'POST',\n type: 'urlencoded',\n credentials: 'include',\n body: {\n ...signup,\n csrfmiddlewaretoken: getCookie('csrftoken'),\n },\n })\n\n return response.caseOf>({\n left: (failure) => {\n if (failure.body?.type === 'APIError') {\n failure = unwrapDjangoError(failure)\n }\n if (isAlreadyExistsError(failure)) {\n return Either.left({ ...failure, isAlreadyExistsError: true })\n }\n return Either.left({ ...failure, bypassStatusAutomaticActions: true })\n },\n right: (success) => {\n const user = success.body\n markUserKnown(user)\n return Either.right(user)\n },\n })\n}\n\nexport async function login(\n login: LoginUser,\n doNotRedirectToSignIn = true,\n extraFields: EXTRA_FIELDS[] = [],\n): Promise>> {\n const response = await request<{ access_token: string; refresh_token: string; expires_in: number }>(env.SIGNIN_URL, {\n method: 'POST',\n type: 'urlencoded',\n credentials: 'include',\n body: {\n ...login,\n csrfmiddlewaretoken: getCookie('csrftoken'),\n },\n })\n\n const userResponse = await response.caseOf>>>({\n left: async (failure) => {\n if (failure.body?.type === 'APIError') {\n failure = unwrapDjangoError(failure)\n }\n return Either.left({ ...failure, bypassStatusAutomaticActions: true })\n },\n right: async (_success) => {\n return await currentUser(doNotRedirectToSignIn, extraFields)\n },\n })\n return userResponse.next((user) => {\n markUserKnown(user)\n return user\n })\n}\n\nexport async function guestLogin(\n email: string,\n doNotRedirectToSignIn = true,\n extraFields: EXTRA_FIELDS[] = [],\n): Promise>> {\n const response = await request<{ access_token: string; refresh_token: string; expires_in: number }>(env.SIGNIN_URL, {\n method: 'POST',\n type: 'urlencoded',\n credentials: 'include',\n body: {\n csrfmiddlewaretoken: getCookie('csrftoken'),\n email,\n guest: 1,\n },\n })\n\n const userResponse = await response.caseOf>>>({\n left: async (failure) => {\n if (failure.body?.type === 'APIError') {\n failure = unwrapDjangoError(failure)\n }\n return Either.left({ ...failure, bypassStatusAutomaticActions: true })\n },\n right: async (_success) => {\n return await currentUser(doNotRedirectToSignIn, extraFields)\n },\n })\n\n return userResponse.next((user) => {\n return user\n })\n}\n\nexport async function logout(): Promise> {\n const response = await request(env.SIGNOUT_URL, {\n method: 'GET',\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n },\n })\n\n return response.next((_) => {\n /* Nothing to pass in case of success */\n })\n}\n\nexport type KnownUser = PublicUser & { service: 'ulule' | 'facebook' }\n\nexport async function userKnown(): Promise {\n const lastUserItem = window.localStorage.getItem('ul_last_user')\n if (lastUserItem === null) {\n return undefined\n } else {\n try {\n const { username, expires } = JSON.parse(lastUserItem)\n\n if (expires < Date.now()) {\n forgetUser()\n return undefined\n }\n\n const service = (await userExists('username', username)).doThrow()\n\n if (service === undefined) {\n return undefined\n }\n\n const { body: user } = (\n await api.get.user({\n // this is an undocumented feature of `GET /users/:id` where `:id` can be the `userId` or the `username`\n urlParams: { userId: username },\n })\n ).doThrow()\n\n return {\n ...user,\n service,\n }\n } catch (error) {\n return undefined\n }\n }\n}\n\nexport function markUserKnown(user: AuthenticatedUser): void {\n window.localStorage.setItem(\n 'ul_last_user',\n JSON.stringify({\n username: user.username,\n expires: dateUtil.daysFromNow(7 * 3),\n }),\n )\n}\n\nexport function forgetUser(): void {\n window.localStorage.removeItem('ul_last_user')\n}\n\n//FIXME: this should not be here, it is not related to authentication\nexport async function update(userId: number, user: UpdateUser): Promise> {\n const response = await api.patch.user({\n urlParams: { userId: String(userId) },\n body: user,\n })\n\n return response.next((success) => {\n return success.body\n })\n}\n\nfunction unwrapDjangoError(failure: RequestFailure): RequestFailure {\n return {\n ...failure,\n body: failure.body.errors,\n }\n}\n\nexport function isAlreadyExistsError(failure: RequestFailure): boolean {\n if (failure.status === 422) {\n const apiError = failure.body as ApiError\n for (const error of apiError) {\n if (error.classification === 'AlreadyExistsError') {\n return true\n }\n }\n }\n return false\n}\n\nexport function isUnusablePasswordError(failure: RequestFailure): boolean {\n if (failure.status === 422) {\n const apiError = failure.body as ApiError\n for (const error of apiError) {\n if (error.classification === 'UnusablePasswordError') {\n return true\n }\n }\n }\n return false\n}\n"], "mappings": "2QAAAA,IAAAC,ICAAC,IAAAC,ICAAC,IAAAC,IAkEO,SAASC,EACdC,EAQA,CACA,MAAO,CAAE,OAAAC,EAAQ,WAAAC,CAAW,EAE5B,SAASA,EACPC,EACyE,CACzE,MAAO,CAAE,WAAAH,EAAY,QAAAG,EAAS,WAAY,EAAK,CAIjD,CAEA,SAASF,EACPE,EAC+D,CAC/D,MAAO,CAAE,WAAAH,EAAY,QAAAG,CAAQ,CAC/B,CACF,CAoCO,SAASC,EAGdH,EAGsE,CACtE,OAAQI,GAAkB,CACxB,IAAMC,EAASC,EAAkBF,EAAeJ,EAAO,UAAW,EAAI,EACtE,OAAAK,EAAO,WAAaC,EAAkBF,EAAeJ,EAAO,UAAW,EAAI,EAK3EK,EAAO,SAAWC,EAAkBF,EAAeJ,EAAO,UAAW,EAAK,EAE1EK,EAAO,WAAa,CAAC,GAAGL,EAAO,UAAW,GAAGA,EAAO,UAAU,EAEvDK,CACT,CACF,CAEO,SAASC,EAAkBF,EAA8BG,EAAsCC,EAAiB,CACrH,MAAO,CAAOT,EAAoBU,IAA8C,CAvJlF,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAwJI,IAAMC,EAAwCC,EAAA,GAAKP,GAE/CX,EAAWS,EAAU,KAAMT,GAAaA,EAAS,aAAeC,CAAU,EAC9E,GAAID,IAAa,OA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CACxBC,EAAW,EACX,MACF,CAEA,IAAMC,GAAW,MAAMpC,EAAW,WAAYiC,CAAQ,GAAG,QAAQ,EAEjE,GAAIG,IAAY,OACd,OAGF,GAAM,CAAE,KAAMd,CAAK,GACjB,MAAMJ,EAAI,IAAI,KAAK,CAEjB,UAAW,CAAE,OAAQe,CAAS,CAChC,CAAC,GACD,QAAQ,EAEV,OAAOrB,EAAAC,EAAA,GACFS,GADE,CAEL,QAAAc,CACF,EACF,OAASC,EAAO,CACd,MACF,CAEJ,CAEO,SAASd,EAAgCD,EAAkC,CAChF,OAAO,aAAa,QAClB,eACA,KAAK,UAAU,CACb,SAAUA,EAAK,SACf,QAAkBgB,EAAY,EAAI,CAAC,CACrC,CAAC,CACH,CACF,CAEO,SAASH,GAAmB,CACjC,OAAO,aAAa,WAAW,cAAc,CAC/C,CAGA,eAAsBI,GAAOC,EAAgBlB,EAA2D,CAMtG,OALiB,MAAMJ,EAAI,MAAM,KAAK,CACpC,UAAW,CAAE,OAAQ,OAAOsB,CAAM,CAAE,EACpC,KAAMlB,CACR,CAAC,GAEe,KAAMH,GACbA,EAAQ,IAChB,CACH,CAEA,SAASX,EAAkBF,EAAyC,CAClE,OAAOM,EAAAC,EAAA,GACFP,GADE,CAEL,KAAMA,EAAQ,KAAK,MACrB,EACF,CAEO,SAASG,EAAqBH,EAAkC,CACrE,GAAIA,EAAQ,SAAW,IAAK,CAC1B,IAAMmC,EAAWnC,EAAQ,KACzB,QAAW+B,KAASI,EAClB,GAAIJ,EAAM,iBAAmB,qBAC3B,MAAO,EAGb,CACA,MAAO,EACT,CAEO,SAAS3B,EAAwBJ,EAAkC,CACxE,GAAIA,EAAQ,SAAW,IAAK,CAC1B,IAAMmC,EAAWnC,EAAQ,KACzB,QAAW+B,KAASI,EAClB,GAAIJ,EAAM,iBAAmB,wBAC3B,MAAO,EAGb,CACA,MAAO,EACT", "names": ["init_define_process_env", "init_sentry_release_injection_stub", "init_define_process_env", "init_sentry_release_injection_stub", "init_define_process_env", "init_sentry_release_injection_stub", "endpoint", "identifier", "config", "deprecated", "options", "createClient", "clientOptions", "client", "makeGenericClient", "endpoints", "strict", "_requestOptions", "_a", "_b", "_c", "_d", "_e", "requestOptions", "__spreadValues", "method", "path", "baseUrl", "url", "name", "value", "headers", "oauthRequest", "__spreadProps", "init_define_process_env", "init_sentry_release_injection_stub", "djangoOauth2", "refreshToken", "REFRESH_TOKEN_ENDPOINT", "request", "response", "client", "createClient", "endpoint", "ROOT_ULULE_API_URL", "ACCESS_TOKEN_COOKIE_NAME", "getCookie", "REFRESH_TOKEN_COOKIE_NAME", "token", "setCookie", "djangoOauth2", "api", "__spreadProps", "__spreadValues", "legacy", "client", "endpoint", "accountId", "addressId", "analyticsTagId", "commentId", "imageId", "memberId", "slugId", "reviewId", "userId", "newsId", "orderId", "partnerId", "productId", "projectId", "token", "subscriptionId", "threadId", "variantId", "init_define_process_env", "init_sentry_release_injection_stub", "userExists", "type", "identifier", "request", "SIGNUP_URL", "getCookie", "failure", "_a", "unwrapDjangoError", "isAlreadyExistsError", "isUnusablePasswordError", "Either", "__spreadProps", "__spreadValues", "_", "currentUser", "doNotRedirectToSignIn", "extraFields", "api", "success", "authenticatedUser", "signup", "user", "markUserKnown", "login", "SIGNIN_URL", "_success", "guestLogin", "email", "logout", "SIGNOUT_URL", "userKnown", "lastUserItem", "username", "expires", "forgetUser", "service", "error", "daysFromNow", "update", "userId", "apiError"] }