@overmap-ai/core 1.0.78-view-sets.28 → 1.0.78-view-sets-cleanup.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +203 -195
- package/dist/overmap-core.umd.cjs +1 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +2 -2
- package/dist/store/slices/organizationAccessSlice.d.ts +20 -20
- package/dist/store/slices/projectAccessSlice.d.ts +1 -1
- package/dist/store/slices/projectAttachmentSlice.d.ts +1 -1
- package/dist/store/slices/projectFileSlice.d.ts +1 -1
- package/dist/typings/models/attachments.d.ts +2 -2
- package/dist/typings/models/forms.d.ts +1 -1
- package/dist/typings/models/geoImages.d.ts +2 -2
- package/dist/typings/models/issueTypes.d.ts +2 -2
- package/dist/typings/models/issues.d.ts +3 -4
- package/dist/typings/models/organizations.d.ts +3 -3
- package/dist/typings/models/projects.d.ts +4 -4
- package/dist/typings/models/teams.d.ts +3 -3
- package/package.json +1 -1
|
@@ -11,5 +11,5 @@ Action:`,e);const p=Ce();if(!p)throw new Error("Outbox coordinator not set");p.r
|
|
|
11
11
|
REST API, you will be requesting localhost:80 (where this app runs), resulting in a transformed blob
|
|
12
12
|
(with an uuid attached) being returned. Alternatively, you may be running with
|
|
13
13
|
import.meta.env.PROD, which will result in some file requests being treated as
|
|
14
|
-
external URLs and therefore not prepended with VITE_API_URL.`;throw new Error(y)}const p=u.type.split("/")[1];if(!p)throw new Error("File has no extension");const A=c??l+"."+p;if(u=gc(u,A),!u.name)throw new Error("Failed to set file's name");await this.addCache(u,l),Bt[n]=new Promise(y=>{y(u)})}return u}}class kb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{revisionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,form_revision:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,field_identifier:p,file_extension:y.extension,file_sha1:y.sha1,form_revision:l};r.push(P)}this.dispatch(iu(n));const o=this.enqueueRequest({description:"Attach files to form revision",method:h.POST,url:"/form-revision-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.form_revision),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(cu(u.attachments))}).catch(()=>{this.dispatch(nu(n.map(u=>u.uuid)))}),[n,o.then(({attachments:u})=>u)]}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization form revision attachments",method:h.GET,url:"/form-revision-attachments/",queryParams:{form_revision__form__organization:e},blockers:[e],blocks:[]});return this.dispatch(au(s)),s}}class Bb extends j{add(e){var o;const{store:s}=this.client,c=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,n=T({...e,created_by:c,submitted_at:new Date().toISOString()});this.dispatch(Ma(n));const r=this.enqueueRequest({description:"Create form revision",method:h.POST,url:"/form-revisions/",payload:v(n),blockers:[e.form],blocks:[n.uuid]});return r.then(m=>{this.dispatch(hu(m))}).catch(()=>{this.dispatch(Ea(n.uuid))}),[n,r]}async refreshStore(e){const s=await this.enqueueRequest({description:"Get organization form revisions",method:h.GET,url:"/form-revisions/",queryParams:{form__organization:e},blockers:[e],blocks:[]});return this.dispatch(ou(s)),s}}class $b extends j{add(e,s){var u;const{store:i}=this.client,c=new Date().toISOString(),n=(u=i.getState().userReducer.currentUser)==null?void 0:u.id,r=T({...e,submitted_at:c,created_by:n}),o=T({...s,form:r.uuid,submitted_at:c,created_by:n});this.dispatch(qa(r)),this.dispatch(Ma(o));const m=this.enqueueRequest({description:"Create form",method:h.POST,url:"/forms/",payload:{...v(r),initial_revision:{uuid:o.uuid,submitted_at:o.submitted_at,title:o.title,description:o.description,fields:o.fields}},blockers:[],blocks:[r.uuid,o.uuid]});return m.catch(l=>{throw this.dispatch(Va(r.uuid)),this.dispatch(Ea(o.uuid)),l}),[r,o,m]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Fu(e)(i);if(!c)throw new Error("Expected form to exist");const n=ju(e)(i);n.length>0&&this.dispatch(jt(n.map(({uuid:o})=>o)));const r=Au(e)(i);r.length>0&&this.dispatch(mu(r.map(({uuid:o})=>o))),this.dispatch(Va(e));try{return await this.enqueueRequest({description:"Delete form",method:h.DELETE,url:`/forms/${e}/`,blockers:[e],blocks:[]})}catch(o){throw this.dispatch(qa(c)),r.length>0&&this.dispatch(lu(r)),n.length>0&&this.dispatch(Et(n)),o}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization forms",method:h.GET,url:"/forms/",queryParams:{organization:e},blockers:[e],blocks:[]});return this.dispatch(Su(s)),s}}class Gb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{submissionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,form_submission:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_sha1:y.sha1,file_extension:y.extension,field_identifier:p,form_submission:l};r.push(P)}this.dispatch(vt(n));const o=this.enqueueRequest({description:"Attach files to form submission",method:h.POST,url:"/form-submission-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.form_submission),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(Ou(u.attachments))}).catch(u=>{throw this.dispatch(wt(n.map(l=>l.uuid))),u}),[n,o.then(({attachments:u})=>u)]}async bulkDelete(e){const{store:s}=this.client,i=s.getState(),c=_u(e)(i);this.dispatch(wt(e));try{await this.enqueueRequest({description:"Delete form submission attachments",method:h.DELETE,url:"/form-submission-attachments/bulk/",payload:{uuids:e},blockers:e,blocks:[]})}catch(n){throw this.dispatch(vt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get form submission attachments",method:h.GET,url:"/form-submission-attachments/",queryParams:{form_submission__project:e},blockers:[],blocks:[]});return this.dispatch(Iu(s)),s}}class Lb extends j{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,created_by:(r=i.userReducer.currentUser)==null?void 0:r.id,submitted_at:new Date().toISOString()}),n=this.enqueueRequest({description:"Add form submission",method:h.POST,url:"/form-submissions/",payload:v(c),blockers:[e.form_revision,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[c.uuid]});return this.dispatch(Ca(c)),n.then(o=>(this.dispatch(Mt(o)),o)).catch(()=>{this.dispatch(ka(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=Ga(e.uuid)(i);if(!c)throw new Error(`Expected submission with uuid ${e.uuid} to exist`);const n={...c,...e};this.dispatch(Eu(n));const r=this.enqueueRequest({description:"Delete user form submissions",method:h.PATCH,url:`/form-submissions/${n.uuid}/`,payload:e,blockers:[n.uuid],blocks:[n.uuid]});return r.then(o=>{this.dispatch(Mt(o))}).catch(()=>{this.dispatch(Mt(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Ga(e)(i);if(!c)throw new Error(`Expected submission with uuid ${e} to exist`);const n=Ru(e)(i);this.dispatch(ka(e)),this.dispatch(wt(n.map(r=>r.uuid)));try{return await this.enqueueRequest({description:"Delete user form submissions",method:h.DELETE,url:`/form-submissions/${e}/`,blockers:[e],blocks:[]})}catch(r){throw this.dispatch(Ca(c)),this.dispatch(vt(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch form submissions",method:h.GET,url:"/form-submissions/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(Mu(s)),s}}class Nb extends j{async add(e){var p;const{store:s}=this.client,{file:i,...c}=e,n=new Date().toISOString(),r=(p=s.getState().userReducer.currentUser)==null?void 0:p.id,o=c.project,m=await this.getFilePayload(i),u=T({...c,file_name:i.name,file_sha1:m.sha1,file:URL.createObjectURL(i),submitted_at:n,created_by:r});this.dispatch(ku(u));const l=this.enqueueRequest({description:"Add geo image",method:h.POST,url:"/geo-images/",payload:{uuid:u.uuid,submitted_at:n,title:u.title,description:u.description,geo_marker:u.geo_marker,canvas_marker:u.canvas_marker,sha1:u.file_sha1,project:u.project,file_name:u.file_name,direction:u.direction,original_date:u.original_date,file:m},blocks:[o],blockers:[o]});return l.then(A=>{this.processPresignedUrls(A.presigned_urls),this.dispatch(at(A.geo_image))}).catch(()=>{this.dispatch(Na(u.uuid))}),[u,l.then(A=>A.geo_image)]}async bulkAdd(e,s){var p;const{store:i}=this.client,c=new Date().toISOString(),n=(p=i.getState().userReducer.currentUser)==null?void 0:p.id,r=[],o=[],m=[],u={};for(const A of e){const{file:y,...b}=A,P=await this.getFilePayload(y);P.sha1 in u||(u[P.sha1]=P);const O=T({...b,file_name:y.name,file_sha1:P.sha1,file:URL.createObjectURL(y),submitted_at:c,created_by:n,project:s});r.push(O),o.push(O.uuid),m.push({uuid:O.uuid,sha1:O.file_sha1,file_name:O.file_name,title:O.title,description:O.description,geo_marker:O.geo_marker,canvas_marker:O.canvas_marker,direction:O.direction,original_date:O.original_date})}this.dispatch(Bu(r));const l=this.enqueueRequest({description:"Bulk add geo images",method:h.POST,url:"/geo-images/bulk/",payload:{submitted_at:c,project:s,geo_images:m,files:Object.values(u)},blocks:[s],blockers:o});return l.then(A=>{this.processPresignedUrls(A.presigned_urls),this.dispatch(Cu(A.geo_images))}).catch(()=>{this.dispatch(Gu(o))}),[r,l.then(A=>A.geo_images)]}update(e){const{store:s}=this.client,i=s.getState(),c=Ha(e.uuid)(i);if(!c)throw new Error(`Map image with uuid ${e.uuid} does not exist in the store`);const n={...c,...e};this.dispatch($u(n));const r=this.enqueueRequest({description:"Update geo image",method:h.PATCH,url:`/geo-images/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return r.then(o=>{this.dispatch(at(o))}).catch(()=>{this.dispatch(at(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Ha(e)(i);if(!c)throw new Error(`Map image with uuid ${e} does not exist in the store`);this.dispatch(Na(e));const n=this.enqueueRequest({description:"Delete geo image",method:h.DELETE,url:`/geo-images/${e}/`,blocks:[e],blockers:[e]});return n.catch(()=>{this.dispatch(at(c))}),n}async refreshStore(e){const s=await this.enqueueRequest({description:"Get geo images",method:h.GET,url:"/geo-images/",queryParams:{project:e},blocks:[e],blockers:[]});return this.dispatch(Du(s)),s}}class Hb extends R{add(e){var o;const{store:s}=this.client,i=new Date().toISOString(),c=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,n=T({...e,submitted_at:i,created_by:c});this.dispatch(Ka(n));const r=this.enqueueRequest({description:"Add issue association",method:h.POST,url:"/issue-associations/",payload:v(n),blockers:[e.associated_issue,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[n.uuid]});return r.then(m=>{this.dispatch(Yu(m))}).catch(()=>{this.dispatch(Ja(n.uuid))}),[n,r]}async delete(e){const{store:s}=this.client,i=Ju(e)(s.getState());if(!i)throw new Error(`Issue association with uuid ${e} not found in store.`);this.dispatch(Ja(e));const c=this.enqueueRequest({description:"Delete issue association",method:h.DELETE,url:`/issue-associations/${e}/`,blockers:[e],blocks:[]});return c.catch(()=>{this.dispatch(Ka(i))}),c}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch issue associations",method:h.GET,url:"/issue-associations/",queryParams:{associated_issue__project:e},blockers:[],blocks:[]});return this.dispatch(Ku(s)),s}}class Wb extends De{constructor(){super(...arguments);S(this,"name","Issue Attachment");S(this,"url","/issue-attachments");S(this,"initializeAttachments",Qa);S(this,"addAttachments",xa);S(this,"updateAttachments",so);S(this,"removeAttachments",ei);S(this,"removeAttachment",ao);S(this,"setAttachment",to);S(this,"selectAttachment",ro)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue__project:s},blocks:[],blockers:[]});return this.dispatch(Qa(i)),i}}class Kb extends De{constructor(){super(...arguments);S(this,"name","Issue Comment Attachment");S(this,"url","/issue-comment-attachments");S(this,"initializeAttachments",si);S(this,"addAttachments",lo);S(this,"updateAttachments",mo);S(this,"removeAttachments",Ao);S(this,"removeAttachment",po);S(this,"setAttachment",ho);S(this,"selectAttachment",So)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue_comment:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue_comment:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueCommentUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue comment attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue_comment__issue__project:s},blocks:[],blockers:[]});return this.dispatch(si(i)),i}}class Yb extends R{add(e){var n;const{store:s}=this.client,i=T({...e,author:(n=s.getState().userReducer.currentUser)==null?void 0:n.id,submitted_at:new Date().toISOString()});this.dispatch(ii(i));const c=this.enqueueRequest({description:"Add issue comment",method:h.POST,url:"/issue-comments/",payload:v(i),blockers:[e.issue],blocks:[i.uuid]});return c.catch(()=>{this.dispatch(ni(i.uuid))}),[i,c]}update(e){const{store:s}=this.client,i=ri(e.uuid)(s.getState());if(!i)throw new Error(`Comment with uuid ${e.uuid} not found in store`);const c={...i,...e};this.dispatch(ci(c));const n=this.enqueueRequest({description:"Edit issue comment",method:h.PATCH,url:`/issue-comments/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return n.catch(()=>{this.dispatch(ci(i))}),[c,n]}remove(e){const{store:s}=this.client,i=ri(e)(s.getState());if(!i)throw new Error(`Comment with uuid ${e} not found in store`);this.dispatch(ni(e));const c=this.enqueueRequest({description:"Delete comment",method:h.DELETE,url:`/issue-comments/${e}/`,blockers:[e],blocks:[]});return c.catch(()=>{this.dispatch(ii(i))}),c}async refreshStore(e){const s=await this.enqueueRequest({description:"Get comments",method:h.GET,url:"/issue-comments/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(Po(s)),s}}class Jb extends R{add(e){var m;const{store:s}=this.client,i=s.getState(),c=new Date().toISOString(),n=(m=i.userReducer.currentUser)==null?void 0:m.id,r=T({...e,submitted_at:c,created_by:n});this.dispatch(ui(r));const o=this.enqueueRequest({description:"Create issue",method:h.POST,url:"/issues/",payload:v(r),blockers:[r.project,r.issue_type,...r.category?[r.category]:[]],blocks:[r.uuid]});return o.then(u=>{this.dispatch(qt(u))}).catch(u=>{throw this.dispatch(oi(r.uuid)),u}),[r,o]}update(e){var m;const s=this.client.store.getState(),i=hi(e.uuid)(s);if(!i)throw new Error(`Attempting to update an issue with uuid ${e.uuid} that doesn't exist in the store`);const c={...i,...e};this.dispatch(qt(c));const n={};for(const u of[E.TITLE,E.DESCRIPTION,E.STATUS,E.CATEGORY,E.PRIORITY,E.ASSIGNED_TO,E.DUE_DATE])if(u in e&&e[u]!==i[u])switch(u){case E.PRIORITY:case E.STATUS:{const l=e[u];n[u]=l!==void 0?Number(l):null;break}case E.DUE_DATE:case E.DESCRIPTION:case E.TITLE:n[u]=e[u]??null;break;case E.CATEGORY:{let l=null;const p=e[u];if(p&&(l=s.categoryReducer.instances[p]??null,!l))throw new Error(`Trying to update issue category to ${p} which does not exist in store`);n[u]=l?{name:l.name,color:l.color,uuid:l.uuid}:null;break}case E.ASSIGNED_TO:{let l=null;const p=e[u];if(p&&(l=s.userReducer.instances[p]??null,!l))throw new Error(`Trying to update issue assigned_to to ${p} which does not exist in store`);n[u]=l?{full_name:l.username,id:l.id}:null;break}}const r=T({created_by:(m=s.userReducer.currentUser)==null?void 0:m.id,submitted_at:new Date().toISOString(),issue:i.uuid,changes:n});this.dispatch(bl(r));const o=this.enqueueRequest({description:"Edit issue",method:h.PATCH,url:`/issues/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return o.catch(()=>{this.dispatch(qt(i)),this.dispatch(Fl(r.uuid))}),[c,o]}async remove(e){const{store:s}=this.client,i=s.getState(),c=hi(e)(i);if(!c)throw new Error(`No issue with uuid ${e} found in the store`);const n=no(e)(i),r=Ol(e)(i),o=qu(e)(i),m={};for(const l of Zu(e)(i))m[l.uuid]=l;for(const l of Xu(e)(i))m[l.uuid]=l;const u=Object.values(m);this.dispatch(oi(e)),n.length>0&&this.dispatch(ei(n.map(({uuid:l})=>l))),r.length>0&&this.dispatch(Tl(r.map(({uuid:l})=>l))),o.length>0&&this.dispatch(jt(o.map(({uuid:l})=>l))),u.length>0&&this.dispatch(Za(u.map(({uuid:l})=>l)));try{return await this.enqueueRequest({description:"Delete issue",method:h.DELETE,url:`/issues/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(ui(c)),this.dispatch(xa(n)),this.dispatch(Pl(r)),this.dispatch(Et(o)),this.dispatch(Ya(u)),l}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issues",method:h.GET,url:"/issues/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(Oo(s)),s}}class Zb extends De{constructor(){super(...arguments);S(this,"name","Issue Type Attachment");S(this,"url","/issue-type-attachments");S(this,"initializeAttachments",pi);S(this,"addAttachments",Mo);S(this,"updateAttachments",jo);S(this,"removeAttachments",Vo);S(this,"removeAttachment",qo);S(this,"setAttachment",Eo);S(this,"selectAttachment",Do)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue_type:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue_type:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueTypeUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue type attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue_type__organization:s},blocks:[],blockers:[]});return this.dispatch(pi(i)),i}}class Xb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{fieldsRevisionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,fields_revision:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_extension:y.extension,field_identifier:p,file_sha1:y.sha1,fields_revision:l};r.push(P)}this.dispatch($o(n));const o=this.enqueueRequest({description:"Add issue type fields attachments",method:h.POST,url:"/issue-type-fields-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.fields_revision),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(Go(u.attachments))}).catch(()=>{this.dispatch(Lo(n.map(u=>u.uuid)))}),[n,o.then(({attachments:u})=>u)]}async refreshStore(e){const s=await this.enqueueRequest({description:"get issue type fields attachments",method:h.GET,url:"/issue-type-fields-attachments/",queryParams:{fields_revision__issue_type__organization:e},blockers:[e],blocks:[]});return this.dispatch(Bo(s)),s}}class Qb extends R{add(e){var o;const{store:s}=this.client,i=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,c=new Date().toISOString(),n=T({...e,created_by:i,submitted_at:c});this.dispatch(xo(n));const r=this.enqueueRequest({description:"Add Issue Type Fields",method:h.POST,url:"/issue-type-fields/",payload:v(n),blockers:[n.issue_type],blocks:[n.uuid]});return r.then(m=>{this.dispatch(el(m))}).catch(m=>{throw this.dispatch(tl(n.uuid)),m}),[n,r]}async refreshStore(e){const s=await this.enqueueRequest({description:"Get Issue Type Fields",method:h.GET,url:"/issue-type-fields/",queryParams:{issue_type__organization:e},blockers:[],blocks:[]});return this.dispatch(Qo(s)),s}}class xb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{fieldValuesUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,field_values:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_sha1:y.sha1,file_extension:y.extension,field_identifier:p,field_values:l};r.push(P)}this.dispatch(zt(n));const o=this.enqueueRequest({description:"Add issue type field values attachments",method:h.POST,url:"/issue-type-field-values-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.field_values),blocks:n.map(u=>u.uuid)});return o.then(({presigned_urls:u,attachments:l})=>{this.processPresignedUrls(u),this.dispatch(nl(l))}).catch(u=>{throw this.dispatch(Ut(n.map(l=>l.uuid))),u}),[n,o.then(({attachments:u})=>u)]}async bulkDelete(e){const{store:s}=this.client,i=s.getState(),c=dl(e)(i);this.dispatch(Ut(e));try{await this.enqueueRequest({description:"Delete issue type field values attachments",method:h.DELETE,url:"/issue-type-field-values-attachments/bulk/",payload:{uuids:e},blockers:e,blocks:[]})}catch(n){throw this.dispatch(zt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue type field values attachments",method:h.GET,url:"/issue-type-field-values-attachments/",queryParams:{field_values__issue__project:e},blockers:[],blocks:[]});return this.dispatch(cl(s)),s}}class eP extends R{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,created_by:(r=i.userReducer.currentUser)==null?void 0:r.id,submitted_at:new Date().toISOString()}),n=this.enqueueRequest({description:"Add issue type field values",method:h.POST,url:"/issue-type-field-values/",payload:v(c),blockers:[e.issue,e.fields_revision],blocks:[c.uuid]});return this.dispatch(fi(c)),n.then(o=>(this.dispatch(ct(o)),o)).catch(()=>{this.dispatch(Si(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=bi(e.uuid)(i);if(!c)throw new Error(`Expected IssueTypeFieldValues with uuid ${e.uuid} to exist`);const n={...c,...e};this.dispatch(ct(n));const r=this.enqueueRequest({description:"Update issue type field values",method:h.PATCH,url:`/issue-type-field-values/${e.uuid}/`,payload:e,blockers:[n.uuid,n.fields_revision,n.issue],blocks:[n.uuid]});return r.then(o=>{this.dispatch(ct(o))}).catch(()=>{this.dispatch(ct(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=bi(e)(i);if(!c)throw new Error(`Expected submission with uuid ${e} to exist`);const n=ul(e)(i);this.dispatch(Si(e)),this.dispatch(Ut(n.map(r=>r.uuid)));try{await this.enqueueRequest({description:"Delete issue type field values",method:h.DELETE,url:`/issue-type-field-values/${e}/`,blockers:[e],blocks:[]})}catch(r){throw this.dispatch(fi(c)),this.dispatch(zt(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue type field values",method:h.GET,url:"/issue-type-field-values/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(Yo(s)),s}}class tP extends R{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,submitted_at:new Date().toISOString(),created_by:(r=i.userReducer.currentUser)==null?void 0:r.id});this.dispatch(ml(c));const n=this.enqueueRequest({method:h.POST,url:"/issue-types/",payload:v(c),blockers:[],blocks:[c.uuid]});return n.then(o=>{this.dispatch(nt(o))}).catch(()=>{this.dispatch(Oi(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=_i(e.uuid)(i);if(!c)throw new Error(`IssueType with uuid ${e.uuid} does not exist in the store.`);const n={...c,...e};this.dispatch(pl(n));const r=this.enqueueRequest({method:h.PATCH,url:`/issue-types/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return r.then(o=>{this.dispatch(nt(o))}).catch(()=>{this.dispatch(nt(c))}),[n,r]}delete(e){const{store:s}=this.client,i=s.getState(),c=_i(e)(i);if(!c)throw new Error(`IssueType with uuid ${e} does not exist in the store.`);const n=Ri(e)(i);this.dispatch(Oi(e)),this.dispatch(Ro(n.map(o=>o.uuid)));const r=this.enqueueRequest({method:h.DELETE,url:`/issue-types/${e}/`,blockers:[e],blocks:[]});return r.catch(()=>{this.dispatch(nt(c)),this.dispatch(_o(n))}),r}async refreshStore(e){const s=await this.enqueueRequest({method:h.GET,url:"/issue-types/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch(hl(s)),s}}class sP extends R{async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue updates",method:h.GET,url:"/issue-updates/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(gl(s)),s}}const aP=1800;function iP(t){if(!t.access)throw new Error("Missing access token");if(!t.refresh)throw new Error("Missing refresh token");return{accessToken:t.access,refreshToken:t.refresh}}class cP extends db{constructor(){super(...arguments);S(this,"_getRenewedTokens",async s=>{const i=this.enqueueRequest({description:"Get renewed tokens",method:h.POST,url:this.refreshTokensUrl,payload:{refresh:s},isAuthNeeded:!1,blockers:[],blocks:[],checkAuth:!1,immediate:!0});let c;try{c=await i}catch(n){console.error("Could not renew tokens; clearing auth",n),this.clearAuth();return}if(!c.access)throw new Error("Missing access token");return{accessToken:c.access,refreshToken:c.refresh??this.getRefreshToken()}})}clearAuth(){console.debug(this.constructor.name,"clearing auth;"),this.dispatch(bd(!1)),this.clearTokens(),this.dispatch(F()),this.dispatch(F())}async renewTokens(){const s=this.getRefreshToken();if(!s)throw new Error("No refresh token found");console.debug(this.constructor.name,"renewing tokens");try{const i=await this._getRenewedTokens(s);if(!i)return;console.log("Got renewed tokens"),this.setTokens(i)}catch(i){throw console.error("Could not renew tokens; clearing auth",i),this.clearAuth(),i}}tokenIsExpiringSoon(){const s=this.getAccessToken();if(!s)return!1;const i=Date.now()/1e3;let c;try{c=Am(s).exp??i}catch{c=i}return c-i<aP}getAuthHeader(){return`Bearer ${this.getAccessToken()}`}async prepareAuth(){if(this.tokenIsExpiringSoon()){console.debug(this.constructor.name,"preparing auth");try{await this.renewTokens()}catch(s){return s instanceof U&&this.clearAuth(),s instanceof Error?Promise.reject(s):Promise.reject(new Error((s??He).toString()))}}}async handleUnauthorized(s,i){const c=this.client.store.getState();if(s.url.endsWith("/token/refresh/"))throw c.authReducer.isLoggedIn&&console.warn("No signed-in user to sign out."),this.clearAuth(),new U({message:"You have been signed out due to inactivity.",response:i,discard:!0});if(c.authReducer.isLoggedIn)await this.renewTokens();else throw console.debug("Forbidden; user is not logged in."),new U({message:"Incorrect username or password.",response:i,discard:!0})}async initAuth(s){const i=Ge.v4();return console.debug(this.constructor.name,"Initiating auth"),this.enqueueRequest({uuid:i,description:"Get token pair",method:h.POST,url:this.initTokensUrl,payload:s,isAuthNeeded:!1,checkAuth:!1,immediate:!0,blockers:[],blocks:[]}).then(c=>{this.setTokens(iP(c))})}}class nP extends R{update(e){const{store:s}=this.client,i=qi(e.uuid)(s.getState()),c={...i,...e};this.dispatch(Ct(c));const n=this.enqueueRequest({description:"Edit organization access",method:h.PATCH,url:`/organization-accesses/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return n.then(r=>{this.dispatch(Ct(r))}).catch(r=>{throw this.dispatch(Ct(i)),r}),[c,n]}async remove(e){const{store:s}=this.client,i=s.getState(),c=qi(e)(i),n=ql(c.user)(i);this.dispatch(Dl(c.uuid)),this.dispatch(Ml(c.user));try{await this.enqueueRequest({description:"Remove organization access",method:h.DELETE,url:`/organization-accesses/${c.uuid}/`,blockers:[c.uuid],blocks:[]})}catch(r){throw this.dispatch(Ul(c)),this.dispatch(wl(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get organization accesses",method:h.GET,url:"/organization-accesses/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch(zl(s)),s}}class rP extends R{async add(e){const s=await this.enqueueRequest({description:"Create organization",method:h.POST,url:"/organizations/",payload:e,blockers:[],blocks:[]});return this.dispatch(Gl(s)),s}async update(e){const s=await this.enqueueRequest({description:"Edit organization",method:h.PATCH,url:`/organizations/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return this.dispatch(Ll(s)),s}async invite(e,s){return this.enqueueRequest({description:"Invite user to organization",method:h.POST,url:`/organizations/${e}/invite/${s}/`,blockers:[],blocks:[]})}async refreshStore(){const e=await this.enqueueRequest({description:"Fetch organizations",method:h.GET,url:"/organizations/",blockers:[],blocks:[]});return this.dispatch($l(e)),e}}class dP extends R{add(e){const s=T(e);this.dispatch(Di(s));const i=this.enqueueRequest({description:"Add project access",method:h.POST,url:"/project-accesses/",payload:v(s),blockers:[s.organization_access,s.project],blocks:[s.uuid]});return i.then(c=>{this.dispatch(rt(c))}).catch(c=>{throw this.dispatch(Ci(s.uuid)),c}),[s,i]}update(e){const{store:s}=this.client,i=Bi(e.uuid)(s.getState()),c={...i,...e};this.dispatch(rt(c));const n=this.enqueueRequest({description:"Edit project access",method:h.PATCH,url:`/project-accesses/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[]});return n.then(r=>{this.dispatch(rt(r))}).catch(r=>{throw this.dispatch(rt(i)),r}),[c,n]}async remove(e){const{store:s}=this.client,i=Bi(e)(s.getState());this.dispatch(Ci(e));try{await this.enqueueRequest({description:"Delete project access",method:h.DELETE,url:`/project-accesses/${e}/`,blockers:[e],blocks:[]})}catch(c){throw this.dispatch(Di(i)),c}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get project accesses",method:h.GET,url:"/project-accesses/",queryParams:{project__organization_owner:e},blockers:[],blocks:[]});return this.dispatch(xl(s)),s}}class uP extends De{constructor(){super(...arguments);S(this,"name","Project Attachment");S(this,"url","/project-attachments");S(this,"addAttachments",nh);S(this,"updateAttachments",uh);S(this,"removeAttachments",Gi);S(this,"removeAttachment",oh);S(this,"setAttachment",rh);S(this,"selectAttachment",mh)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,project:s.modelUuid})}buildAttachmentPayload(s){return{...s,project:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.projectUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get project attachments",method:h.GET,url:`${this.url}/`,queryParams:{project__organization_owner:s},blockers:[],blocks:[]});return this.dispatch(ch(i)),i}}class oP extends R{async saveExisting(e){if(!e.uuid)throw new Error("You can only use this method to save existing project files. The one provided has no uuid.");const s={...e};delete s.file;const i=this.enqueueRequest({method:h.PATCH,url:`/project-files/${e.uuid}/`,payload:s,blockers:[e.uuid],blocks:[e.uuid]});return i.then(c=>{this.dispatch(Ni(c))}),i}saveActive(){const{store:e}=this.client,s=e.getState(),i=s.projectFileReducer.activeProjectFileId;if(!i)throw new Error("No active project file");const c=s.projectFileReducer.instances[i];if(!c)throw new Error("No active project file");if(!c.bounds&&!c.canvas_bounds)throw new Error("Project file must either have bounds or canvas_bounds set");let n;if(typeof c.file=="string"&&!c.file.startsWith("blob:")){const m={...c};delete m.file,n={method:h.PATCH,url:`/project-files/${i}/`,payload:m,blockers:[i],blocks:[i]}}else n=new Promise((m,u)=>{this.client.files.uploadFileToS3(c.file_sha1).then(([l])=>{m({method:h.POST,url:`/project-files${c.project}/`,payload:{...c,...l},blockers:[i],blocks:[i]})}).catch(u)});const o=Promise.resolve(n).then(m=>this.enqueueRequest(m));return o.then(m=>{this.dispatch(Ni(m))}),this.dispatch(Th),this.dispatch(Fh(null)),this.dispatch(Ph(!1)),[c,o]}delete(e){return this.dispatch(gh(e)),this.enqueueRequest({method:h.DELETE,url:`/project-files/${e}`,blockers:[e],blocks:[]})}async refreshStore(e){const s=await this.enqueueRequest({description:"Get project files",method:h.GET,url:"/project-files/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(fh(s)),s}}class lP extends R{async add(e){const s=await this.enqueueRequest({description:"Create project",method:h.POST,url:"/projects/",payload:v(e),blockers:[],blocks:[]});return this.dispatch(Wi(s)),s}async update(e){if(!e.bounds&&!e.canvas_bounds)throw new Error("Project must either have bounds or canvas_bounds set");return this.dispatch(wh(e)),await this.enqueueRequest({description:"Update project",method:h.PATCH,url:`/projects/${e.uuid}/`,payload:{name:e.name,bounds:e.bounds},blockers:[e.uuid],blocks:[e.uuid]})}async delete(e){const{store:s}=this.client,i=s.getState(),c=jh(e)(i);if(!c)throw new Error("Expected project to exist");const n=Oh(i).filter(m=>m.project===e);this.dispatch(bh(n.map(({uuid:m})=>m)));const r=ph(c.uuid)(i);this.dispatch(Gi(r.map(({uuid:m})=>m)));const o=ah(e)(i);this.dispatch(th(o.map(({uuid:m})=>m))),this.dispatch(Ki(c.uuid));try{await this.enqueueRequest({description:"Delete project",method:h.DELETE,url:`/projects/${e}/`,blockers:[e],blocks:[]}),this.dispatch(Ki(c.uuid))}catch(m){throw this.dispatch(Wi(c)),this.dispatch(eh(Object.values(o))),this.dispatch(Sh(n)),this.dispatch(dh(r)),m}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch projects",method:h.GET,url:"/projects/",queryParams:{organization_owner:e},blockers:[],blocks:[]});return this.dispatch(vh(s)),s}}class hP extends R{add(e){const s=T(e);this.dispatch(Uh(s));const i=this.enqueueRequest({description:"Create team membership",method:h.POST,url:"/team-memberships/",payload:v(s),blockers:[e.team],blocks:[s.uuid]});return i.then(c=>{this.dispatch(Xi(c))}).catch(()=>{this.dispatch(Qi(s.uuid))}),[s,i]}async delete(e){const{store:s}=this.client,i=s.getState(),c=kh(e)(i);if(!c)throw new Error(`Expected team membership with uuid ${e} to exist`);this.dispatch(Qi(e));try{return await this.enqueueRequest({description:"Delete team membership",method:h.DELETE,url:`/team-memberships/${e}/`,blockers:[e],blocks:[e]})}catch(n){throw this.dispatch(Xi(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch team memberships",method:h.GET,url:"/team-memberships/",queryParams:{team__organization:e},blockers:[],blocks:[]});return this.dispatch(zh(s)),s}}class mP extends R{add(e){const s=T({...e,submitted_at:new Date().toISOString()});this.dispatch(Gh(s));const i=this.enqueueRequest({description:"Create team",method:h.POST,url:"/teams/",payload:v(s),blockers:[],blocks:[s.uuid]});return i.then(c=>{this.dispatch(dt(c))}).catch(()=>{this.dispatch(tc(s.uuid))}),[s,i]}update(e){const{store:s}=this.client,i=ac(e.uuid)(s.getState());if(!i)throw new Error(`Expected team with uuid ${e.uuid} to exist`);const c={...i,...e};this.dispatch(Lh(c));const n=this.enqueueRequest({description:"Update team",method:h.PATCH,url:`/teams/${e.uuid}/`,payload:v(e),blockers:[e.uuid],blocks:[e.uuid]});return n.then(r=>{this.dispatch(dt(r))}).catch(()=>{this.dispatch(dt(i))}),[c,n]}async delete(e){const{store:s}=this.client,i=s.getState(),c=ac(e)(i);if(!c)throw new Error(`Expected team with uuid ${e} to exist`);this.dispatch(tc(e));try{return await this.enqueueRequest({description:"Delete team",method:h.DELETE,url:`/teams/${e}/`,blockers:[e],blocks:[e]})}catch(n){throw this.dispatch(dt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch teams",method:h.GET,url:"/teams/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch($h(s)),s}}class pP extends R{async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization users",method:h.GET,url:`/organizations/${e}/users/`,blockers:[],blocks:[]});return this.dispatch(vl(s)),s}}class AP{constructor(e){S(this,"store");this.store=e}async enqueueRequest(e,s,i){return this._enqueueRequest(e,s,i).then(c=>{if(c instanceof U)throw c;return c})}_enqueueRequest(e,s,i){const c=new fc,n={...e,BASE_URL:s,serviceName:i};if(e.immediate){const r={...n,uuid:e.uuid??Ge.v4()},o={payload:r,type:"",meta:{offline:{effect:{timestamp:new Date().toISOString(),request:r,BASE_URL:s,serviceName:i}}}};nc(o,this).then(m=>{c.resolve(m.body)}).catch(m=>{rc(m,o),m instanceof Error?c.reject(m):c.reject(new Error((m??He).toString()))})}else{const r=this.store.dispatch(Yl(n)),o=u=>{if(u)c.resolve(u.body);else{const l=new U({message:"Could not get a response from the server.",response:u,discard:!0});c.reject(l)}},m=u=>{u instanceof U?u.options.discard=!0:(console.error("Received an unexpected error while processing a request:",u,`
|
|
14
|
+
external URLs and therefore not prepended with VITE_API_URL.`;throw new Error(y)}const p=u.type.split("/")[1];if(!p)throw new Error("File has no extension");const A=c??l+"."+p;if(u=gc(u,A),!u.name)throw new Error("Failed to set file's name");await this.addCache(u,l),Bt[n]=new Promise(y=>{y(u)})}return u}}class kb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{revisionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,form_revision:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,field_identifier:p,file_extension:y.extension,file_sha1:y.sha1,form_revision:l};r.push(P)}this.dispatch(iu(n));const o=this.enqueueRequest({description:"Attach files to form revision",method:h.POST,url:"/form-revision-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.form_revision),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(cu(u.attachments))}).catch(()=>{this.dispatch(nu(n.map(u=>u.uuid)))}),[n,o.then(({attachments:u})=>u)]}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization form revision attachments",method:h.GET,url:"/form-revision-attachments/",queryParams:{form_revision__form__organization:e},blockers:[e],blocks:[]});return this.dispatch(au(s)),s}}class Bb extends j{add(e){var o;const{store:s}=this.client,c=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,n=T({...e,created_by:c,submitted_at:new Date().toISOString()});this.dispatch(Ma(n));const r=this.enqueueRequest({description:"Create form revision",method:h.POST,url:"/form-revisions/",payload:v(n),blockers:[e.form],blocks:[n.uuid]});return r.then(m=>{this.dispatch(hu(m))}).catch(()=>{this.dispatch(Ea(n.uuid))}),[n,r]}async refreshStore(e){const s=await this.enqueueRequest({description:"Get organization form revisions",method:h.GET,url:"/form-revisions/",queryParams:{form__organization:e},blockers:[e],blocks:[]});return this.dispatch(ou(s)),s}}class $b extends j{add(e,s){var u;const{store:i}=this.client,c=new Date().toISOString(),n=(u=i.getState().userReducer.currentUser)==null?void 0:u.id,r=T({...e,submitted_at:c,created_by:n}),o=T({...s,form:r.uuid,submitted_at:c,created_by:n});this.dispatch(qa(r)),this.dispatch(Ma(o));const m=this.enqueueRequest({description:"Create form",method:h.POST,url:"/forms/",payload:{...v(r),initial_revision:{uuid:o.uuid,submitted_at:o.submitted_at,title:o.title,description:o.description,fields:o.fields}},blockers:[],blocks:[r.uuid,o.uuid]});return m.catch(l=>{throw this.dispatch(Va(r.uuid)),this.dispatch(Ea(o.uuid)),l}),[r,o,m]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Fu(e)(i);if(!c)throw new Error("Expected form to exist");const n=ju(e)(i);n.length>0&&this.dispatch(jt(n.map(({uuid:o})=>o)));const r=Au(e)(i);r.length>0&&this.dispatch(mu(r.map(({uuid:o})=>o))),this.dispatch(Va(e));try{return await this.enqueueRequest({description:"Delete form",method:h.DELETE,url:`/forms/${e}/`,blockers:[e],blocks:[]})}catch(o){throw this.dispatch(qa(c)),r.length>0&&this.dispatch(lu(r)),n.length>0&&this.dispatch(Et(n)),o}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization forms",method:h.GET,url:"/forms/",queryParams:{organization:e},blockers:[e],blocks:[]});return this.dispatch(Su(s)),s}}class Gb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{submissionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,form_submission:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_sha1:y.sha1,file_extension:y.extension,field_identifier:p,form_submission:l};r.push(P)}this.dispatch(vt(n));const o=this.enqueueRequest({description:"Attach files to form submission",method:h.POST,url:"/form-submission-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.form_submission),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(Ou(u.attachments))}).catch(u=>{throw this.dispatch(wt(n.map(l=>l.uuid))),u}),[n,o.then(({attachments:u})=>u)]}async bulkDelete(e){const{store:s}=this.client,i=s.getState(),c=_u(e)(i);this.dispatch(wt(e));try{await this.enqueueRequest({description:"Delete form submission attachments",method:h.DELETE,url:"/form-submission-attachments/bulk/",payload:{uuids:e},blockers:e,blocks:[]})}catch(n){throw this.dispatch(vt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get form submission attachments",method:h.GET,url:"/form-submission-attachments/",queryParams:{form_submission__project:e},blockers:[],blocks:[]});return this.dispatch(Iu(s)),s}}class Lb extends j{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,created_by:(r=i.userReducer.currentUser)==null?void 0:r.id,submitted_at:new Date().toISOString()}),n=this.enqueueRequest({description:"Add form submission",method:h.POST,url:"/form-submissions/",payload:v(c),blockers:[e.form_revision,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[c.uuid]});return this.dispatch(Ca(c)),n.then(o=>(this.dispatch(Mt(o)),o)).catch(()=>{this.dispatch(ka(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=Ga(e.uuid)(i);if(!c)throw new Error(`Expected submission with uuid ${e.uuid} to exist`);const n={...c,...e};this.dispatch(Eu(n));const r=this.enqueueRequest({description:"Delete user form submissions",method:h.PATCH,url:`/form-submissions/${n.uuid}/`,payload:e,blockers:[n.uuid],blocks:[n.uuid]});return r.then(o=>{this.dispatch(Mt(o))}).catch(()=>{this.dispatch(Mt(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Ga(e)(i);if(!c)throw new Error(`Expected submission with uuid ${e} to exist`);const n=Ru(e)(i);this.dispatch(ka(e)),this.dispatch(wt(n.map(r=>r.uuid)));try{return await this.enqueueRequest({description:"Delete user form submissions",method:h.DELETE,url:`/form-submissions/${e}/`,blockers:[e],blocks:[]})}catch(r){throw this.dispatch(Ca(c)),this.dispatch(vt(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch form submissions",method:h.GET,url:"/form-submissions/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(Mu(s)),s}}class Nb extends j{async add(e){var p;const{store:s}=this.client,{file:i,...c}=e,n=new Date().toISOString(),r=(p=s.getState().userReducer.currentUser)==null?void 0:p.id,o=c.project,m=await this.getFilePayload(i),u=T({...c,file_name:i.name,file_sha1:m.sha1,file:URL.createObjectURL(i),submitted_at:n,created_by:r});this.dispatch(ku(u));const l=this.enqueueRequest({description:"Add geo image",method:h.POST,url:"/geo-images/",payload:{uuid:u.uuid,submitted_at:n,title:u.title,description:u.description,geo_marker:u.geo_marker,canvas_marker:u.canvas_marker,sha1:u.file_sha1,project:u.project,file_name:u.file_name,direction:u.direction,original_date:u.original_date,file:m},blocks:[o],blockers:[o]});return l.then(A=>{this.processPresignedUrls(A.presigned_urls),this.dispatch(at(A.geo_image))}).catch(()=>{this.dispatch(Na(u.uuid))}),[u,l.then(A=>A.geo_image)]}async bulkAdd(e,s){var p;const{store:i}=this.client,c=new Date().toISOString(),n=(p=i.getState().userReducer.currentUser)==null?void 0:p.id,r=[],o=[],m=[],u={};for(const A of e){const{file:y,...b}=A,P=await this.getFilePayload(y);P.sha1 in u||(u[P.sha1]=P);const O=T({...b,file_name:y.name,file_sha1:P.sha1,file:URL.createObjectURL(y),submitted_at:c,created_by:n,project:s});r.push(O),o.push(O.uuid),m.push({uuid:O.uuid,sha1:O.file_sha1,file_name:O.file_name,title:O.title,description:O.description,geo_marker:O.geo_marker,canvas_marker:O.canvas_marker,direction:O.direction,original_date:O.original_date})}this.dispatch(Bu(r));const l=this.enqueueRequest({description:"Bulk add geo images",method:h.POST,url:"/geo-images/bulk/",payload:{submitted_at:c,project:s,geo_images:m,files:Object.values(u)},blocks:[s],blockers:o});return l.then(A=>{this.processPresignedUrls(A.presigned_urls),this.dispatch(Cu(A.geo_images))}).catch(()=>{this.dispatch(Gu(o))}),[r,l.then(A=>A.geo_images)]}update(e){const{store:s}=this.client,i=s.getState(),c=Ha(e.uuid)(i);if(!c)throw new Error(`Map image with uuid ${e.uuid} does not exist in the store`);const n={...c,...e};this.dispatch($u(n));const r=this.enqueueRequest({description:"Update geo image",method:h.PATCH,url:`/geo-images/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return r.then(o=>{this.dispatch(at(o))}).catch(()=>{this.dispatch(at(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=Ha(e)(i);if(!c)throw new Error(`Map image with uuid ${e} does not exist in the store`);this.dispatch(Na(e));const n=this.enqueueRequest({description:"Delete geo image",method:h.DELETE,url:`/geo-images/${e}/`,blocks:[e],blockers:[e]});return n.catch(()=>{this.dispatch(at(c))}),n}async refreshStore(e){const s=await this.enqueueRequest({description:"Get geo images",method:h.GET,url:"/geo-images/",queryParams:{project:e},blocks:[e],blockers:[]});return this.dispatch(Du(s)),s}}class Hb extends R{add(e){var o;const{store:s}=this.client,i=new Date().toISOString(),c=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,n=T({...e,submitted_at:i,created_by:c});this.dispatch(Ka(n));const r=this.enqueueRequest({description:"Add issue association",method:h.POST,url:"/issue-associations/",payload:v(n),blockers:[e.associated_issue,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[n.uuid]});return r.then(m=>{this.dispatch(Yu(m))}).catch(()=>{this.dispatch(Ja(n.uuid))}),[n,r]}async delete(e){const{store:s}=this.client,i=Ju(e)(s.getState());if(!i)throw new Error(`Issue association with uuid ${e} not found in store.`);this.dispatch(Ja(e));const c=this.enqueueRequest({description:"Delete issue association",method:h.DELETE,url:`/issue-associations/${e}/`,blockers:[e],blocks:[]});return c.catch(()=>{this.dispatch(Ka(i))}),c}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch issue associations",method:h.GET,url:"/issue-associations/",queryParams:{associated_issue__project:e},blockers:[],blocks:[]});return this.dispatch(Ku(s)),s}}class Wb extends De{constructor(){super(...arguments);S(this,"name","Issue Attachment");S(this,"url","/issue-attachments");S(this,"initializeAttachments",Qa);S(this,"addAttachments",xa);S(this,"updateAttachments",so);S(this,"removeAttachments",ei);S(this,"removeAttachment",ao);S(this,"setAttachment",to);S(this,"selectAttachment",ro)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue__project:s},blocks:[],blockers:[]});return this.dispatch(Qa(i)),i}}class Kb extends De{constructor(){super(...arguments);S(this,"name","Issue Comment Attachment");S(this,"url","/issue-comment-attachments");S(this,"initializeAttachments",si);S(this,"addAttachments",lo);S(this,"updateAttachments",mo);S(this,"removeAttachments",Ao);S(this,"removeAttachment",po);S(this,"setAttachment",ho);S(this,"selectAttachment",So)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue_comment:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue_comment:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueCommentUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue comment attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue_comment__issue__project:s},blocks:[],blockers:[]});return this.dispatch(si(i)),i}}class Yb extends R{add(e){var n;const{store:s}=this.client,i=T({...e,author:(n=s.getState().userReducer.currentUser)==null?void 0:n.id,submitted_at:new Date().toISOString()});this.dispatch(ii(i));const c=this.enqueueRequest({description:"Add issue comment",method:h.POST,url:"/issue-comments/",payload:v(i),blockers:[e.issue],blocks:[i.uuid]});return c.catch(()=>{this.dispatch(ni(i.uuid))}),[i,c]}update(e){const{store:s}=this.client,i=ri(e.uuid)(s.getState());if(!i)throw new Error(`Comment with uuid ${e.uuid} not found in store`);const c={...i,...e};this.dispatch(ci(c));const n=this.enqueueRequest({description:"Edit issue comment",method:h.PATCH,url:`/issue-comments/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return n.catch(()=>{this.dispatch(ci(i))}),[c,n]}remove(e){const{store:s}=this.client,i=ri(e)(s.getState());if(!i)throw new Error(`Comment with uuid ${e} not found in store`);this.dispatch(ni(e));const c=this.enqueueRequest({description:"Delete comment",method:h.DELETE,url:`/issue-comments/${e}/`,blockers:[e],blocks:[]});return c.catch(()=>{this.dispatch(ii(i))}),c}async refreshStore(e){const s=await this.enqueueRequest({description:"Get comments",method:h.GET,url:"/issue-comments/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(Po(s)),s}}class Jb extends R{add(e){var m;const{store:s}=this.client,i=s.getState(),c=new Date().toISOString(),n=(m=i.userReducer.currentUser)==null?void 0:m.id,r=T({...e,submitted_at:c,created_by:n});this.dispatch(ui(r));const o=this.enqueueRequest({description:"Create issue",method:h.POST,url:"/issues/",payload:v(r),blockers:[r.project,r.issue_type,...r.category?[r.category]:[]],blocks:[r.uuid]});return o.then(u=>{this.dispatch(qt(u))}).catch(u=>{throw this.dispatch(oi(r.uuid)),u}),[r,o]}update(e){var m;const s=this.client.store.getState(),i=hi(e.uuid)(s);if(!i)throw new Error(`Attempting to update an issue with uuid ${e.uuid} that doesn't exist in the store`);const c={...i,...e};this.dispatch(qt(c));const n={};for(const u of[E.TITLE,E.DESCRIPTION,E.STATUS,E.CATEGORY,E.PRIORITY,E.ASSIGNED_TO,E.DUE_DATE])if(u in e&&e[u]!==i[u])switch(u){case E.PRIORITY:case E.STATUS:{const l=e[u];n[u]=l!==void 0?Number(l):null;break}case E.DUE_DATE:case E.DESCRIPTION:case E.TITLE:n[u]=e[u]??null;break;case E.CATEGORY:{let l=null;const p=e[u];if(p&&(l=s.categoryReducer.instances[p]??null,!l))throw new Error(`Trying to update issue category to ${p} which does not exist in store`);n[u]=l?{name:l.name,color:l.color,uuid:l.uuid}:null;break}case E.ASSIGNED_TO:{let l=null;const p=e[u];if(p&&(l=s.userReducer.instances[p]??null,!l))throw new Error(`Trying to update issue assigned_to to ${p} which does not exist in store`);n[u]=l?{full_name:l.username,id:l.id}:null;break}}const r=T({created_by:(m=s.userReducer.currentUser)==null?void 0:m.id,submitted_at:new Date().toISOString(),issue:i.uuid,changes:n});this.dispatch(bl(r));const o=this.enqueueRequest({description:"Edit issue",method:h.PATCH,url:`/issues/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return o.catch(()=>{this.dispatch(qt(i)),this.dispatch(Fl(r.uuid))}),[c,o]}async remove(e){const{store:s}=this.client,i=s.getState(),c=hi(e)(i);if(!c)throw new Error(`No issue with uuid ${e} found in the store`);const n=no(e)(i),r=Ol(e)(i),o=qu(e)(i),m={};for(const l of Zu(e)(i))m[l.uuid]=l;for(const l of Xu(e)(i))m[l.uuid]=l;const u=Object.values(m);this.dispatch(oi(e)),n.length>0&&this.dispatch(ei(n.map(({uuid:l})=>l))),r.length>0&&this.dispatch(Tl(r.map(({uuid:l})=>l))),o.length>0&&this.dispatch(jt(o.map(({uuid:l})=>l))),u.length>0&&this.dispatch(Za(u.map(({uuid:l})=>l)));try{return await this.enqueueRequest({description:"Delete issue",method:h.DELETE,url:`/issues/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(ui(c)),this.dispatch(xa(n)),this.dispatch(Pl(r)),this.dispatch(Et(o)),this.dispatch(Ya(u)),l}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issues",method:h.GET,url:"/issues/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(Oo(s)),s}}class Zb extends De{constructor(){super(...arguments);S(this,"name","Issue Type Attachment");S(this,"url","/issue-type-attachments");S(this,"initializeAttachments",pi);S(this,"addAttachments",Mo);S(this,"updateAttachments",jo);S(this,"removeAttachments",Vo);S(this,"removeAttachment",qo);S(this,"setAttachment",Eo);S(this,"selectAttachment",Do)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,issue_type:s.modelUuid})}buildAttachmentPayload(s){return{...s,issue_type:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.issueTypeUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get issue type attachments",method:h.GET,url:`${this.url}/`,queryParams:{issue_type__organization:s},blocks:[],blockers:[]});return this.dispatch(pi(i)),i}}class Xb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{fieldsRevisionUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,fields_revision:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_extension:y.extension,field_identifier:p,file_sha1:y.sha1,fields_revision:l};r.push(P)}this.dispatch($o(n));const o=this.enqueueRequest({description:"Add issue type fields attachments",method:h.POST,url:"/issue-type-fields-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.fields_revision),blocks:n.map(u=>u.uuid)});return o.then(u=>{this.processPresignedUrls(u.presigned_urls),this.dispatch(Go(u.attachments))}).catch(()=>{this.dispatch(Lo(n.map(u=>u.uuid)))}),[n,o.then(({attachments:u})=>u)]}async refreshStore(e){const s=await this.enqueueRequest({description:"get issue type fields attachments",method:h.GET,url:"/issue-type-fields-attachments/",queryParams:{fields_revision__issue_type__organization:e},blockers:[e],blocks:[]});return this.dispatch(Bo(s)),s}}class Qb extends R{add(e){var o;const{store:s}=this.client,i=(o=s.getState().userReducer.currentUser)==null?void 0:o.id,c=new Date().toISOString(),n=T({...e,created_by:i,submitted_at:c});this.dispatch(xo(n));const r=this.enqueueRequest({description:"Add Issue Type Fields",method:h.POST,url:"/issue-type-fields/",payload:v(n),blockers:[n.issue_type],blocks:[n.uuid]});return r.then(m=>{this.dispatch(el(m))}).catch(m=>{throw this.dispatch(tl(n.uuid)),m}),[n,r]}async refreshStore(e){const s=await this.enqueueRequest({description:"Get Issue Type Fields",method:h.GET,url:"/issue-type-fields/",queryParams:{issue_type__organization:e},blockers:[],blocks:[]});return this.dispatch(Qo(s)),s}}class xb extends j{async bulkAdd(e){var m;const s=new Date().toISOString(),i=(m=this.client.store.getState().userReducer.currentUser)==null?void 0:m.id,c={},n=[],r=[];for(const u of e){const{fieldValuesUuid:l,fieldIdentifier:p,file:A}=u,y=await this.getFilePayload(A);y.sha1 in c||(c[y.sha1]=y);const b=T({file:URL.createObjectURL(A),file_type:A.type,file_name:A.name,file_sha1:y.sha1,created_by:i,field_values:l,submitted_at:s,field_identifier:p});n.push(b);const P={uuid:b.uuid,file_name:A.name,file_sha1:y.sha1,file_extension:y.extension,field_identifier:p,field_values:l};r.push(P)}this.dispatch(zt(n));const o=this.enqueueRequest({description:"Add issue type field values attachments",method:h.POST,url:"/issue-type-field-values-attachments/bulk/",payload:{submitted_at:s,attachments:r,files:Object.values(c)},blockers:n.map(u=>u.field_values),blocks:n.map(u=>u.uuid)});return o.then(({presigned_urls:u,attachments:l})=>{this.processPresignedUrls(u),this.dispatch(nl(l))}).catch(u=>{throw this.dispatch(Ut(n.map(l=>l.uuid))),u}),[n,o.then(({attachments:u})=>u)]}async bulkDelete(e){const{store:s}=this.client,i=s.getState(),c=dl(e)(i);this.dispatch(Ut(e));try{await this.enqueueRequest({description:"Delete issue type field values attachments",method:h.DELETE,url:"/issue-type-field-values-attachments/bulk/",payload:{uuids:e},blockers:e,blocks:[]})}catch(n){throw this.dispatch(zt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue type field values attachments",method:h.GET,url:"/issue-type-field-values-attachments/",queryParams:{field_values__issue__project:e},blockers:[],blocks:[]});return this.dispatch(cl(s)),s}}class eP extends R{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,created_by:(r=i.userReducer.currentUser)==null?void 0:r.id,submitted_at:new Date().toISOString()}),n=this.enqueueRequest({description:"Add issue type field values",method:h.POST,url:"/issue-type-field-values/",payload:v(c),blockers:[e.issue,e.fields_revision],blocks:[c.uuid]});return this.dispatch(fi(c)),n.then(o=>(this.dispatch(ct(o)),o)).catch(()=>{this.dispatch(Si(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=bi(e.uuid)(i);if(!c)throw new Error(`Expected IssueTypeFieldValues with uuid ${e.uuid} to exist`);const n={...c,...e};this.dispatch(ct(n));const r=this.enqueueRequest({description:"Update issue type field values",method:h.PATCH,url:`/issue-type-field-values/${e.uuid}/`,payload:e,blockers:[n.uuid,n.fields_revision,n.issue],blocks:[n.uuid]});return r.then(o=>{this.dispatch(ct(o))}).catch(()=>{this.dispatch(ct(c))}),[n,r]}async delete(e){const{store:s}=this.client,i=s.getState(),c=bi(e)(i);if(!c)throw new Error(`Expected submission with uuid ${e} to exist`);const n=ul(e)(i);this.dispatch(Si(e)),this.dispatch(Ut(n.map(r=>r.uuid)));try{await this.enqueueRequest({description:"Delete issue type field values",method:h.DELETE,url:`/issue-type-field-values/${e}/`,blockers:[e],blocks:[]})}catch(r){throw this.dispatch(fi(c)),this.dispatch(zt(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue type field values",method:h.GET,url:"/issue-type-field-values/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(Yo(s)),s}}class tP extends R{add(e){var r;const{store:s}=this.client,i=s.getState(),c=T({...e,submitted_at:new Date().toISOString(),created_by:(r=i.userReducer.currentUser)==null?void 0:r.id});this.dispatch(ml(c));const n=this.enqueueRequest({method:h.POST,url:"/issue-types/",payload:v(c),blockers:[],blocks:[c.uuid]});return n.then(o=>{this.dispatch(nt(o))}).catch(()=>{this.dispatch(Oi(c.uuid))}),[c,n]}update(e){const{store:s}=this.client,i=s.getState(),c=_i(e.uuid)(i);if(!c)throw new Error(`IssueType with uuid ${e.uuid} does not exist in the store.`);const n={...c,...e};this.dispatch(pl(n));const r=this.enqueueRequest({method:h.PATCH,url:`/issue-types/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return r.then(o=>{this.dispatch(nt(o))}).catch(()=>{this.dispatch(nt(c))}),[n,r]}delete(e){const{store:s}=this.client,i=s.getState(),c=_i(e)(i);if(!c)throw new Error(`IssueType with uuid ${e} does not exist in the store.`);const n=Ri(e)(i);this.dispatch(Oi(e)),this.dispatch(Ro(n.map(o=>o.uuid)));const r=this.enqueueRequest({method:h.DELETE,url:`/issue-types/${e}/`,blockers:[e],blocks:[]});return r.catch(()=>{this.dispatch(nt(c)),this.dispatch(_o(n))}),r}async refreshStore(e){const s=await this.enqueueRequest({method:h.GET,url:"/issue-types/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch(hl(s)),s}}class sP extends R{async refreshStore(e){const s=await this.enqueueRequest({description:"Get issue updates",method:h.GET,url:"/issue-updates/",queryParams:{issue__project:e},blockers:[],blocks:[]});return this.dispatch(gl(s)),s}}const aP=1800;function iP(t){if(!t.access)throw new Error("Missing access token");if(!t.refresh)throw new Error("Missing refresh token");return{accessToken:t.access,refreshToken:t.refresh}}class cP extends db{constructor(){super(...arguments);S(this,"_getRenewedTokens",async s=>{const i=this.enqueueRequest({description:"Get renewed tokens",method:h.POST,url:this.refreshTokensUrl,payload:{refresh:s},isAuthNeeded:!1,blockers:[],blocks:[],checkAuth:!1,immediate:!0});let c;try{c=await i}catch(n){console.error("Could not renew tokens; clearing auth",n),this.clearAuth();return}if(!c.access)throw new Error("Missing access token");return{accessToken:c.access,refreshToken:c.refresh??this.getRefreshToken()}})}clearAuth(){console.debug(this.constructor.name,"clearing auth;"),this.dispatch(bd(!1)),this.clearTokens(),this.dispatch(F()),this.dispatch(F())}async renewTokens(){const s=this.getRefreshToken();if(!s)throw new Error("No refresh token found");console.debug(this.constructor.name,"renewing tokens");try{const i=await this._getRenewedTokens(s);if(!i)return;console.log("Got renewed tokens"),this.setTokens(i)}catch(i){throw console.error("Could not renew tokens; clearing auth",i),this.clearAuth(),i}}tokenIsExpiringSoon(){const s=this.getAccessToken();if(!s)return!1;const i=Date.now()/1e3;let c;try{c=Am(s).exp??i}catch{c=i}return c-i<aP}getAuthHeader(){return`Bearer ${this.getAccessToken()}`}async prepareAuth(){if(this.tokenIsExpiringSoon()){console.debug(this.constructor.name,"preparing auth");try{await this.renewTokens()}catch(s){return s instanceof U&&this.clearAuth(),s instanceof Error?Promise.reject(s):Promise.reject(new Error((s??He).toString()))}}}async handleUnauthorized(s,i){const c=this.client.store.getState();if(s.url.endsWith("/token/refresh/"))throw c.authReducer.isLoggedIn&&console.warn("No signed-in user to sign out."),this.clearAuth(),new U({message:"You have been signed out due to inactivity.",response:i,discard:!0});if(c.authReducer.isLoggedIn)await this.renewTokens();else throw console.debug("Forbidden; user is not logged in."),new U({message:"Incorrect username or password.",response:i,discard:!0})}async initAuth(s){const i=Ge.v4();return console.debug(this.constructor.name,"Initiating auth"),this.enqueueRequest({uuid:i,description:"Get token pair",method:h.POST,url:this.initTokensUrl,payload:s,isAuthNeeded:!1,checkAuth:!1,immediate:!0,blockers:[],blocks:[]}).then(c=>{this.setTokens(iP(c))})}}class nP extends R{update(e){const{store:s}=this.client,i=qi(e.uuid)(s.getState()),c={...i,...e};this.dispatch(Ct(c));const n=this.enqueueRequest({description:"Edit organization access",method:h.PATCH,url:`/organization-accesses/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return n.then(r=>{this.dispatch(Ct(r))}).catch(r=>{throw this.dispatch(Ct(i)),r}),[c,n]}async remove(e){const{store:s}=this.client,i=s.getState(),c=qi(e)(i),n=ql(c.user)(i);this.dispatch(Dl(c.uuid)),this.dispatch(Ml(c.user));try{await this.enqueueRequest({description:"Remove organization access",method:h.DELETE,url:`/organization-accesses/${c.uuid}/`,blockers:[c.uuid],blocks:[]})}catch(r){throw this.dispatch(Ul(c)),this.dispatch(wl(n)),r}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get organization accesses",method:h.GET,url:"/organization-accesses/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch(zl(s)),s}}class rP extends R{async add(e){const s=await this.enqueueRequest({description:"Create organization",method:h.POST,url:"/organizations/",payload:e,blockers:[],blocks:[]});return this.dispatch(Gl(s)),s}async update(e){const s=await this.enqueueRequest({description:"Edit organization",method:h.PATCH,url:`/organizations/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return this.dispatch(Ll(s)),s}async invite(e,s){return this.enqueueRequest({description:"Invite user to organization",method:h.POST,url:`/organizations/${e}/invite/${s}/`,blockers:[],blocks:[]})}async refreshStore(){const e=await this.enqueueRequest({description:"Fetch organizations",method:h.GET,url:"/organizations/",blockers:[],blocks:[]});return this.dispatch($l(e)),e}}class dP extends R{add(e){var n;const{store:s}=this.client,i=T({...e,created_by:(n=s.getState().userReducer.currentUser)==null?void 0:n.id});this.dispatch(Di(i));const c=this.enqueueRequest({description:"Add project access",method:h.POST,url:"/project-accesses/",payload:v(i),blockers:[i.organization_access,i.project],blocks:[i.uuid]});return c.then(r=>{this.dispatch(rt(r))}).catch(r=>{throw this.dispatch(Ci(i.uuid)),r}),[i,c]}update(e){const{store:s}=this.client,i=Bi(e.uuid)(s.getState()),c={...i,...e};this.dispatch(rt(c));const n=this.enqueueRequest({description:"Edit project access",method:h.PATCH,url:`/project-accesses/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[]});return n.then(r=>{this.dispatch(rt(r))}).catch(r=>{throw this.dispatch(rt(i)),r}),[c,n]}async remove(e){const{store:s}=this.client,i=Bi(e)(s.getState());this.dispatch(Ci(e));try{await this.enqueueRequest({description:"Delete project access",method:h.DELETE,url:`/project-accesses/${e}/`,blockers:[e],blocks:[]})}catch(c){throw this.dispatch(Di(i)),c}}async refreshStore(e){const s=await this.enqueueRequest({description:"Get project accesses",method:h.GET,url:"/project-accesses/",queryParams:{project__organization_owner:e},blockers:[],blocks:[]});return this.dispatch(xl(s)),s}}class uP extends De{constructor(){super(...arguments);S(this,"name","Project Attachment");S(this,"url","/project-attachments");S(this,"addAttachments",nh);S(this,"updateAttachments",uh);S(this,"removeAttachments",Gi);S(this,"removeAttachment",oh);S(this,"setAttachment",rh);S(this,"selectAttachment",mh)}buildOfflineAttachment(s){return T({file:URL.createObjectURL(s.file),file_sha1:s.file_sha1,created_by:s.created_by,file_name:s.file.name,file_type:s.file.type,submitted_at:s.submitted_at,description:s.description,project:s.modelUuid})}buildAttachmentPayload(s){return{...s,project:s.modelUuid}}async bulkAdd(s){return this._bulkAdd(s.map(i=>({modelUuid:i.projectUuid,file:i.file})))}async delete(s){return this._delete(s)}async refreshStore(s){const i=await this.enqueueRequest({description:"Get project attachments",method:h.GET,url:`${this.url}/`,queryParams:{project__organization_owner:s},blockers:[],blocks:[]});return this.dispatch(ch(i)),i}}class oP extends R{async saveExisting(e){if(!e.uuid)throw new Error("You can only use this method to save existing project files. The one provided has no uuid.");const s={...e};delete s.file;const i=this.enqueueRequest({method:h.PATCH,url:`/project-files/${e.uuid}/`,payload:s,blockers:[e.uuid],blocks:[e.uuid]});return i.then(c=>{this.dispatch(Ni(c))}),i}saveActive(){const{store:e}=this.client,s=e.getState(),i=s.projectFileReducer.activeProjectFileId;if(!i)throw new Error("No active project file");const c=s.projectFileReducer.instances[i];if(!c)throw new Error("No active project file");if(!c.bounds&&!c.canvas_bounds)throw new Error("Project file must either have bounds or canvas_bounds set");let n;if(typeof c.file=="string"&&!c.file.startsWith("blob:")){const m={...c};delete m.file,n={method:h.PATCH,url:`/project-files/${i}/`,payload:m,blockers:[i],blocks:[i]}}else n=new Promise((m,u)=>{this.client.files.uploadFileToS3(c.file_sha1).then(([l])=>{m({method:h.POST,url:`/project-files${c.project}/`,payload:{...c,...l},blockers:[i],blocks:[i]})}).catch(u)});const o=Promise.resolve(n).then(m=>this.enqueueRequest(m));return o.then(m=>{this.dispatch(Ni(m))}),this.dispatch(Th),this.dispatch(Fh(null)),this.dispatch(Ph(!1)),[c,o]}delete(e){return this.dispatch(gh(e)),this.enqueueRequest({method:h.DELETE,url:`/project-files/${e}`,blockers:[e],blocks:[]})}async refreshStore(e){const s=await this.enqueueRequest({description:"Get project files",method:h.GET,url:"/project-files/",queryParams:{project:e},blockers:[],blocks:[]});return this.dispatch(fh(s)),s}}class lP extends R{async add(e){const s=await this.enqueueRequest({description:"Create project",method:h.POST,url:"/projects/",payload:v(e),blockers:[],blocks:[]});return this.dispatch(Wi(s)),s}async update(e){if(!e.bounds&&!e.canvas_bounds)throw new Error("Project must either have bounds or canvas_bounds set");return this.dispatch(wh(e)),await this.enqueueRequest({description:"Update project",method:h.PATCH,url:`/projects/${e.uuid}/`,payload:{name:e.name,bounds:e.bounds},blockers:[e.uuid],blocks:[e.uuid]})}async delete(e){const{store:s}=this.client,i=s.getState(),c=jh(e)(i);if(!c)throw new Error("Expected project to exist");const n=Oh(i).filter(m=>m.project===e);this.dispatch(bh(n.map(({uuid:m})=>m)));const r=ph(c.uuid)(i);this.dispatch(Gi(r.map(({uuid:m})=>m)));const o=ah(e)(i);this.dispatch(th(o.map(({uuid:m})=>m))),this.dispatch(Ki(c.uuid));try{await this.enqueueRequest({description:"Delete project",method:h.DELETE,url:`/projects/${e}/`,blockers:[e],blocks:[]}),this.dispatch(Ki(c.uuid))}catch(m){throw this.dispatch(Wi(c)),this.dispatch(eh(Object.values(o))),this.dispatch(Sh(n)),this.dispatch(dh(r)),m}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch projects",method:h.GET,url:"/projects/",queryParams:{organization_owner:e},blockers:[],blocks:[]});return this.dispatch(vh(s)),s}}class hP extends R{add(e){var n;const{store:s}=this.client,i=T({...e,created_by:(n=s.getState().userReducer.currentUser)==null?void 0:n.id});this.dispatch(Uh(i));const c=this.enqueueRequest({description:"Create team membership",method:h.POST,url:"/team-memberships/",payload:v(i),blockers:[e.team],blocks:[i.uuid]});return c.then(r=>{this.dispatch(Xi(r))}).catch(()=>{this.dispatch(Qi(i.uuid))}),[i,c]}async delete(e){const{store:s}=this.client,i=s.getState(),c=kh(e)(i);if(!c)throw new Error(`Expected team membership with uuid ${e} to exist`);this.dispatch(Qi(e));try{return await this.enqueueRequest({description:"Delete team membership",method:h.DELETE,url:`/team-memberships/${e}/`,blockers:[e],blocks:[e]})}catch(n){throw this.dispatch(Xi(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch team memberships",method:h.GET,url:"/team-memberships/",queryParams:{team__organization:e},blockers:[],blocks:[]});return this.dispatch(zh(s)),s}}class mP extends R{add(e){var n;const{store:s}=this.client,i=T({...e,submitted_at:new Date().toISOString(),created_by:(n=s.getState().userReducer.currentUser)==null?void 0:n.id});this.dispatch(Gh(i));const c=this.enqueueRequest({description:"Create team",method:h.POST,url:"/teams/",payload:v(i),blockers:[],blocks:[i.uuid]});return c.then(r=>{this.dispatch(dt(r))}).catch(()=>{this.dispatch(tc(i.uuid))}),[i,c]}update(e){const{store:s}=this.client,i=ac(e.uuid)(s.getState());if(!i)throw new Error(`Expected team with uuid ${e.uuid} to exist`);const c={...i,...e};this.dispatch(Lh(c));const n=this.enqueueRequest({description:"Update team",method:h.PATCH,url:`/teams/${e.uuid}/`,payload:v(e),blockers:[e.uuid],blocks:[e.uuid]});return n.then(r=>{this.dispatch(dt(r))}).catch(()=>{this.dispatch(dt(i))}),[c,n]}async delete(e){const{store:s}=this.client,i=s.getState(),c=ac(e)(i);if(!c)throw new Error(`Expected team with uuid ${e} to exist`);this.dispatch(tc(e));try{return await this.enqueueRequest({description:"Delete team",method:h.DELETE,url:`/teams/${e}/`,blockers:[e],blocks:[e]})}catch(n){throw this.dispatch(dt(c)),n}}async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch teams",method:h.GET,url:"/teams/",queryParams:{organization:e},blockers:[],blocks:[]});return this.dispatch($h(s)),s}}class pP extends R{async refreshStore(e){const s=await this.enqueueRequest({description:"Fetch organization users",method:h.GET,url:`/organizations/${e}/users/`,blockers:[],blocks:[]});return this.dispatch(vl(s)),s}}class AP{constructor(e){S(this,"store");this.store=e}async enqueueRequest(e,s,i){return this._enqueueRequest(e,s,i).then(c=>{if(c instanceof U)throw c;return c})}_enqueueRequest(e,s,i){const c=new fc,n={...e,BASE_URL:s,serviceName:i};if(e.immediate){const r={...n,uuid:e.uuid??Ge.v4()},o={payload:r,type:"",meta:{offline:{effect:{timestamp:new Date().toISOString(),request:r,BASE_URL:s,serviceName:i}}}};nc(o,this).then(m=>{c.resolve(m.body)}).catch(m=>{rc(m,o),m instanceof Error?c.reject(m):c.reject(new Error((m??He).toString()))})}else{const r=this.store.dispatch(Yl(n)),o=u=>{if(u)c.resolve(u.body);else{const l=new U({message:"Could not get a response from the server.",response:u,discard:!0});c.reject(l)}},m=u=>{u instanceof U?u.options.discard=!0:(console.error("Received an unexpected error while processing a request:",u,`
|
|
15
15
|
Converting error to APIError and discarding.`),u=new U({message:"An error occurred while processing the request.",innerError:u,discard:!0})),c.reject(u)};r.then(o,m)}return c}}class We{constructor(){S(this,"graph");S(this,"requestAttemptCounter");this.graph=new ym.DepGraph,this.requestAttemptCounter={}}static _fromOutbox(e){const s=new We;for(let i=0;i<e.length;i++){const c=e[i];if(!c){console.error("Outbox item was undefined");continue}s.sneakRequest(c);for(let n=0;n<i;n++){const r=e[n];if(!r){console.error("Previous outbox item was undefined");continue}r.payload.uuid!==c.payload.uuid&&r.payload.blocks.some(o=>c.payload.blockers.includes(o))&&We._addDependency(c.payload.uuid,r.payload.uuid,s.graph)}}return s}_addDependency(e,s){We._addDependency(e,s,this.graph)}static _addDependency(e,s,i){if(e===s)throw new Error(`Tried to add dependency from node to itself: ${e}`);if(!i.hasNode(e))throw new Error(`Tried to add dependency from non-existent node: ${e} (to node: ${s})`);if(!i.hasNode(s))throw new Error(`Tried to add dependency to non-existent node: ${s} (from node: ${e})`);i.addDependency(e,s)}addRequest(e){if(this.graph.addNode(e.payload.uuid,e),!(e.payload.blockers.length===0||this.graph.size()===1))for(const s of this.graph.overallOrder()){if(s===e.payload.uuid)continue;const i=this.graph.getNodeData(s);e.payload.blockers.some(c=>i.payload.blocks.includes(c))&&this._addDependency(e.payload.uuid,s)}}insertRequest(e){this.graph.addNode(e.payload.uuid,e);for(const s of this.graph.overallOrder()){if(s===e.payload.uuid)continue;this.graph.getNodeData(s).payload.blockers.some(c=>e.payload.blocks.includes(c))&&this._addDependency(s,e.payload.uuid)}}sneakRequest(e){this.graph.addNode(e.payload.uuid,e)}_getNextNode(){const e=this.graph.overallOrder(!0);let s=1/0,i;for(const c of e){const n=this.requestAttemptCounter[c]||0;n<s&&(s=n,i=c)}return i}peek(){const e=this._getNextNode();if(e)return this.graph.getNodeData(e)}remove(e){this.graph.removeNode(e),delete this.requestAttemptCounter[e]}pop(){const e=this.peek();return e&&this.graph.removeNode(e.payload.uuid),e}getQueue(){const e=this.graph.overallOrder().map(i=>this.graph.getNodeData(i)),s=this._getNextNode();if(s){const i=this.graph.getNodeData(s),c=e.findIndex(n=>n.payload.uuid===i.payload.uuid);c!==-1&&(e.splice(c,1),e.unshift(i))}return e}getReady(){let e=this.graph.overallOrder(!0).map(s=>this.graph.getNodeData(s));return e=e.sort((s,i)=>s.meta.offline.effect.timestamp.localeCompare(i.meta.offline.effect.timestamp)),e=e.sort((s,i)=>{const c=this.requestAttemptCounter[s.payload.uuid]||0,n=this.requestAttemptCounter[i.payload.uuid]||0;return c-n}),e}registerRetry(e){this.requestAttemptCounter[e]=(this.requestAttemptCounter[e]||0)+1}}const yP=(t,e)=>{const s=new e(t);return Gg(s),$g(t),s};var dm=(t=>(t[t.USER_REGISTRATION=0]="USER_REGISTRATION",t[t.APPLICATION_INVITE=2]="APPLICATION_INVITE",t[t.PROJECT_INVITE=4]="PROJECT_INVITE",t[t.ORGANIZATION_INVITE=6]="ORGANIZATION_INVITE",t[t.ADD_EMAIL_DOMAIN=8]="ADD_EMAIL_DOMAIN",t[t.RESET_PASSWORD=10]="RESET_PASSWORD",t))(dm||{});a.APIError=U,a.AgentService=ub,a.AssetAttachmentService=ob,a.AssetProcedureAttachmentService=lb,a.AssetProcedureFieldValuesAttachmentService=pb,a.AssetProcedureFieldValuesService=Ab,a.AssetProcedureFieldsAttachmentService=hb,a.AssetProcedureFieldsService=mb,a.AssetProcedureInstanceService=yb,a.AssetProcedureService=fb,a.AssetProcedureStepFieldValuesAttachmentService=bb,a.AssetProcedureStepFieldValuesService=Pb,a.AssetProcedureStepFieldsAttachmentService=Sb,a.AssetProcedureStepFieldsService=gb,a.AssetProcedureStepService=Fb,a.AssetService=Tb,a.AssetStageCompletionService=Ib,a.AssetStageService=Ob,a.AssetTypeAttachmentService=_b,a.AssetTypeFieldValuesAttachmentService=wb,a.AssetTypeFieldValuesService=Mb,a.AssetTypeFieldsAttachmentService=Rb,a.AssetTypeFieldsService=vb,a.AssetTypeService=Eb,a.AttachmentModel=Ac,a.BaseApiService=R,a.BaseSDK=AP,a.COMMON_AUTO_FIELDS=Fc,a.CategoryService=jb,a.DEFAULT_ISSUE_PRIORITY=Sm,a.DEFAULT_ISSUE_STATUS=fm,a.DeferredPromise=fc,a.DocumentAttachmentService=qb,a.DocumentService=Vb,a.EMPTY_ARRAY=hc,a.EMPTY_OBJECT=mc,a.EmailDomainsService=zb,a.EmailVerificationService=Ub,a.FileService=Cb,a.FormRevisionAttachmentService=kb,a.FormRevisionService=Bb,a.FormService=$b,a.FormSubmissionAttachmentService=Gb,a.FormSubmissionService=Lb,a.GeoImageService=Nb,a.HttpMethod=h,a.IssueAssociationService=Hb,a.IssueAttachmentService=Wb,a.IssueCommentAttachmentService=Kb,a.IssueCommentService=Yb,a.IssuePriority=Gt,a.IssueService=Jb,a.IssueStatus=Lt,a.IssueTypeAttachmentService=Zb,a.IssueTypeFieldValuesAttachmentService=xb,a.IssueTypeFieldValuesService=eP,a.IssueTypeFieldsAttachmentService=Xb,a.IssueTypeFieldsService=Qb,a.IssueTypeService=tP,a.IssueUpdateChange=E,a.IssueUpdateService=sP,a.JWTService=cP,a.OUTBOX_RETRY_DELAY=yc,a.OrganizationAccessLevel=pc,a.OrganizationAccessService=nP,a.OrganizationService=rP,a.OutboxCoordinator=We,a.ProjectAccessService=dP,a.ProjectAttachmentService=uP,a.ProjectFileService=oP,a.ProjectService=lP,a.RESET_ORGANIZATION_STATE=_,a.RESET_PROJECT_STATE=M,a.RESET_STATE=F,a.TeamMembershipService=hP,a.TeamService=mP,a.UNKNOWN_ERROR_MESSAGE=He,a.UserService=pP,a.VERSION_REDUCER_KEY=Ye,a.VerificationCodeType=dm,a._setLatestRetryTime=Zl,a.addAsset=ks,a.addAssetAttachment=Jm,a.addAssetAttachments=Qt,a.addAssetProcedure=Ss,a.addAssetProcedureAttachment=Qm,a.addAssetProcedureAttachments=Gc,a.addAssetProcedureFieldValues=rs,a.addAssetProcedureFieldValuesAttachment=fp,a.addAssetProcedureFieldValuesAttachments=ht,a.addAssetProcedureFieldValuesMany=Fn,a.addAssetProcedureFields=dn,a.addAssetProcedureFieldsAttachment=sp,a.addAssetProcedureFieldsAttachments=xc,a.addAssetProcedureFieldsMany=up,a.addAssetProcedureInstance=hs,a.addAssetProcedureInstances=wn,a.addAssetProcedureStep=zs,a.addAssetProcedureStepFieldValues=Es,a.addAssetProcedureStepFieldValuesAttachment=tA,a.addAssetProcedureStepFieldValuesAttachments=pt,a.addAssetProcedureStepFieldValuesMany=ar,a.addAssetProcedureStepFields=Is,a.addAssetProcedureStepFieldsAttachment=kp,a.addAssetProcedureStepFieldsAttachments=kn,a.addAssetProcedureStepFieldsMany=Wp,a.addAssetProcedureSteps=mA,a.addAssetProcedures=jp,a.addAssetStage=Qs,a.addAssetStageCompletion=Ws,a.addAssetStageCompletions=Ks,a.addAssetStages=RA,a.addAssetType=pa,a.addAssetTypeAttachment=qA,a.addAssetTypeAttachments=sa,a.addAssetTypeFieldValues=ua,a.addAssetTypeFieldValuesAttachment=XA,a.addAssetTypeFieldValuesAttachments=Tt,a.addAssetTypeFieldValuesMany=od,a.addAssetTypeFields=Zr,a.addAssetTypeFieldsAttachment=UA,a.addAssetTypeFieldsAttachments=Gr,a.addAssetTypeFieldsMany=LA,a.addAssetTypes=uy,a.addAssets=gt,a.addCategories=Sy,a.addCategory=ga,a.addConversation=Rc,a.addConversations=Gm,a.addDocumentAttachment=Oy,a.addDocumentAttachments=Md,a.addDocuments=$d,a.addEmailDomain=Wd,a.addEmailDomains=jy,a.addForm=qa,a.addFormRevision=Ma,a.addFormRevisionAttachment=By,a.addFormRevisionAttachments=iu,a.addFormRevisions=lu,a.addFormSubmission=Ca,a.addFormSubmissionAttachment=nf,a.addFormSubmissionAttachments=vt,a.addFormSubmissions=Et,a.addForms=Qy,a.addGeoImage=ku,a.addGeoImages=Bu,a.addIssue=ui,a.addIssueAssociation=Ka,a.addIssueAssociations=Ya,a.addIssueAttachment=gf,a.addIssueAttachments=xa,a.addIssueComment=ii,a.addIssueCommentAttachment=Ff,a.addIssueCommentAttachments=lo,a.addIssueComments=Rf,a.addIssueType=ml,a.addIssueTypeAttachment=Df,a.addIssueTypeAttachments=Mo,a.addIssueTypeFieldValues=fi,a.addIssueTypeFieldValuesAttachment=uS,a.addIssueTypeFieldValuesAttachments=zt,a.addIssueTypeFieldValuesMany=Yf,a.addIssueTypeFields=xo,a.addIssueTypeFieldsAttachment=$f,a.addIssueTypeFieldsAttachments=$o,a.addIssueTypeFieldsMany=eS,a.addIssueTypes=AS,a.addIssueUpdate=bl,a.addIssueUpdates=Pl,a.addIssues=_o,a.addOrganization=Gl,a.addOrganizationAccess=Ul,a.addOrganizationAccesses=US,a.addOrganizations=HS,a.addProject=Wi,a.addProjectAccess=Di,a.addProjectAccesses=eh,a.addProjectAttachment=cg,a.addProjectAttachments=nh,a.addProjectFile=ug,a.addProjectFiles=Sh,a.addProjects=fg,a.addTeam=Gh,a.addTeamMembership=Uh,a.addTeamMemberships=Og,a.addTeams=jg,a.addUser=wl,a.addUsers=wS,a.agentsReducer=Mc,a.agentsSlice=Yt,a.areArraysEqual=Im,a.assetAttachmentReducer=kc,a.assetAttachmentSlice=Zt,a.assetProcedureAttachmentReducer=Zc,a.assetProcedureAttachmentSlice=es,a.assetProcedureFieldValuesAttachmentReducer=gn,a.assetProcedureFieldValuesAttachmentSlice=is,a.assetProcedureFieldValuesReducer=_n,a.assetProcedureFieldValuesSlice=ns,a.assetProcedureFieldsAttachmentReducer=cn,a.assetProcedureFieldsAttachmentSlice=ts,a.assetProcedureFieldsReducer=hn,a.assetProcedureFieldsSlice=ss,a.assetProcedureInstanceReducer=jn,a.assetProcedureInstanceSlice=ls,a.assetProcedureReducer=Un,a.assetProcedureSlice=fs,a.assetProcedureStepFieldValuesAttachmentReducer=er,a.assetProcedureStepFieldValuesAttachmentSlice=vs,a.assetProcedureStepFieldValuesReducer=rr,a.assetProcedureStepFieldValuesSlice=Ms,a.assetProcedureStepFieldsAttachmentReducer=Nn,a.assetProcedureStepFieldsAttachmentSlice=Fs,a.assetProcedureStepFieldsReducer=Kn,a.assetProcedureStepFieldsSlice=Ts,a.assetProcedureStepReducer=lr,a.assetProcedureStepSlice=Vs,a.assetReducer=fr,a.assetSlice=Cs,a.assetStageCompletionReducer=Fr,a.assetStageCompletionSlice=Hs,a.assetStageReducer=vr,a.assetStageSlice=Xs,a.assetTypeAttachmentReducer=kr,a.assetTypeAttachmentSlice=ta,a.assetTypeFieldValuesAttachmentReducer=rd,a.assetTypeFieldValuesAttachmentSlice=na,a.assetTypeFieldValuesReducer=pd,a.assetTypeFieldValuesSlice=da,a.assetTypeFieldsAttachmentReducer=Kr,a.assetTypeFieldsAttachmentSlice=ia,a.assetTypeFieldsReducer=ed,a.assetTypeFieldsSlice=ca,a.assetTypeReducer=Sd,a.assetTypeSlice=ma,a.authReducer=Pd,a.authSlice=Ot,a.baseReducer=kg,a.baseReducers=ic,a.blobToBase64=qm,a.categoryReducer=Rd,a.categorySlice=Sa,a.clearTokens=Ay,a.constructUploadedFilePayloads=jm,a.coordinatesAreEqual=Fm,a.createModelAdapter=I,a.createMultiPointGeometry=Pm,a.createOfflineAction=Wl,a.createPayload=v,a.createPointGeometry=bm,a.createSelectionAdapter=gm,a.deleteAsset=Bs,a.deleteAssetAttachment=Vc,a.deleteAssetAttachments=xt,a.deleteAssetProcedure=gs,a.deleteAssetProcedureAttachment=Hc,a.deleteAssetProcedureAttachments=Wc,a.deleteAssetProcedureFieldValues=ds,a.deleteAssetProcedureFieldValuesAttachment=Pp,a.deleteAssetProcedureFieldValuesAttachments=mt,a.deleteAssetProcedureFieldValuesMany=In,a.deleteAssetProcedureFields=on,a.deleteAssetProcedureFieldsAttachment=np,a.deleteAssetProcedureFieldsAttachments=tn,a.deleteAssetProcedureFieldsMany=mp,a.deleteAssetProcedureInstance=ms,a.deleteAssetProcedureInstances=Mn,a.deleteAssetProcedureStep=Us,a.deleteAssetProcedureStepFieldValues=js,a.deleteAssetProcedureStepFieldValuesAttachment=cA,a.deleteAssetProcedureStepFieldValuesAttachments=At,a.deleteAssetProcedureStepFieldValuesMany=cr,a.deleteAssetProcedureStepFields=Os,a.deleteAssetProcedureStepFieldsAttachment=Lp,a.deleteAssetProcedureStepFieldsAttachments=$n,a.deleteAssetProcedureStepFieldsMany=Zp,a.deleteAssetProcedureSteps=AA,a.deleteAssetProcedures=Vp,a.deleteAssetStage=xs,a.deleteAssetStageCompletion=Ys,a.deleteAssetStageCompletions=Js,a.deleteAssetStages=wA,a.deleteAssetType=Aa,a.deleteAssetTypeAttachment=Vr,a.deleteAssetTypeAttachments=aa,a.deleteAssetTypeFieldValues=oa,a.deleteAssetTypeFieldValuesAttachment=ty,a.deleteAssetTypeFieldValuesAttachments=It,a.deleteAssetTypeFieldValuesMany=hd,a.deleteAssetTypeFields=Qr,a.deleteAssetTypeFieldsAttachment=BA,a.deleteAssetTypeFieldsAttachments=Nr,a.deleteAssetTypeFieldsMany=KA,a.deleteAssetTypes=ly,a.deleteAssets=$s,a.deleteCategories=Fy,a.deleteCategory=Od,a.deleteConversation=Hm,a.deleteConversations=Wm,a.deleteDocumentAttachment=qd,a.deleteDocumentAttachments=Vd,a.deleteEmailDomain=Kd,a.deleteEmailDomains=Dy,a.deleteForm=Va,a.deleteFormRevision=Ea,a.deleteFormRevisionAttachment=Ny,a.deleteFormRevisionAttachments=nu,a.deleteFormRevisions=mu,a.deleteFormSubmission=ka,a.deleteFormSubmissionAttachment=of,a.deleteFormSubmissionAttachments=wt,a.deleteFormSubmissions=jt,a.deleteForms=af,a.deleteGeoImage=Na,a.deleteGeoImages=Gu,a.deleteIssue=oi,a.deleteIssueAssociation=Ja,a.deleteIssueAssociations=Za,a.deleteIssueAttachment=ao,a.deleteIssueAttachments=ei,a.deleteIssueComment=ni,a.deleteIssueCommentAttachment=po,a.deleteIssueCommentAttachments=Ao,a.deleteIssueComments=Mf,a.deleteIssueType=SS,a.deleteIssueTypeAttachment=qo,a.deleteIssueTypeAttachments=Vo,a.deleteIssueTypeFieldValues=Si,a.deleteIssueTypeFieldValuesAttachment=mS,a.deleteIssueTypeFieldValuesAttachments=Ut,a.deleteIssueTypeFieldValuesMany=Qf,a.deleteIssueTypeFields=tl,a.deleteIssueTypeFieldsAttachment=Hf,a.deleteIssueTypeFieldsAttachments=Lo,a.deleteIssueTypeFieldsMany=iS,a.deleteIssueTypes=gS,a.deleteIssueUpdate=Fl,a.deleteIssueUpdates=Tl,a.deleteIssues=Ro,a.deleteOrganization=KS,a.deleteOrganizationAccess=Dl,a.deleteOrganizationAccesses=BS,a.deleteOrganizations=YS,a.deleteProject=Ki,a.deleteProjectAccess=Ci,a.deleteProjectAccesses=th,a.deleteProjectAttachment=oh,a.deleteProjectAttachments=Gi,a.deleteProjectFile=gh,a.deleteProjectFiles=bh,a.deleteProjects=gg,a.deleteTeam=tc,a.deleteTeamMembership=Qi,a.deleteTeamMemberships=wg,a.deleteTeams=zg,a.deleteUser=Ml,a.deleteUsers=jS,a.dequeue=im,a.discard=rc,a.documentAttachmentReducer=Cd,a.documentAttachmentSlice=Fa,a.documentSlice=Ta,a.documentsReducer=Ld,a.downloadFile=Vm,a.downloadInMemoryFile=Em,a.emailDomainsReducer=Zd,a.emailDomainsSlice=_a,a.emailRegex=$m,a.enqueue=am,a.enqueueRequest=Yl,a.fallbackToEmptyArray=g,a.fallbackToEmptyObject=lt,a.fileReducer=tu,a.fileSlice=Ra,a.fileToBlob=bc,a.formReducer=gu,a.formRevisionAttachmentReducer=du,a.formRevisionAttachmentSlice=va,a.formRevisionReducer=yu,a.formRevisionsSlice=wa,a.formSlice=ja,a.formSubmissionAttachmentReducer=vu,a.formSubmissionAttachmentSlice=za,a.formSubmissionReducer=zu,a.formSubmissionSlice=Da,a.geoImageReducer=Hu,a.geoImageSlice=La,a.getFileIdentifier=Mm,a.getFileS3Key=Kt,a.getLocalDateString=Sc,a.getLocalRelativeDateString=vm,a.getOutboxCoordinator=Ce,a.getRenamedFile=gc,a.hashFile=Le,a.initSDK=yP,a.initializeAssetAttachments=Xt,a.initializeAssetProcedureAttachments=$c,a.initializeAssetProcedureFieldValues=Pn,a.initializeAssetProcedureFieldValuesAttachments=pn,a.initializeAssetProcedureFields=rn,a.initializeAssetProcedureFieldsAttachments=Qc,a.initializeAssetProcedureInstances=vn,a.initializeAssetProcedureStepFieldValues=sr,a.initializeAssetProcedureStepFieldValuesAttachments=Jn,a.initializeAssetProcedureStepFields=Wn,a.initializeAssetProcedureStepFieldsAttachments=Cn,a.initializeAssetProcedureSteps=ur,a.initializeAssetProcedures=Vn,a.initializeAssetStageCompletions=gr,a.initializeAssetStages=_r,a.initializeAssetTypeAttachments=Er,a.initializeAssetTypeFieldValues=ud,a.initializeAssetTypeFieldValuesAttachments=sd,a.initializeAssetTypeFields=Jr,a.initializeAssetTypeFieldsAttachments=$r,a.initializeAssetTypes=yd,a.initializeAssets=pr,a.initializeCategories=Td,a.initializeConversations=_c,a.initializeDocumentAttachments=wd,a.initializeEmailDomains=Hd,a.initializeFormRevisionAttachments=au,a.initializeFormRevisions=ou,a.initializeFormSubmissionAttachments=Iu,a.initializeFormSubmissions=Mu,a.initializeForms=Su,a.initializeGeoImages=Du,a.initializeIssueAssociations=Ku,a.initializeIssueAttachments=Qa,a.initializeIssueCommentAttachments=si,a.initializeIssueComments=_f,a.initializeIssueTypeAttachments=pi,a.initializeIssueTypeFieldValues=Yo,a.initializeIssueTypeFieldValuesAttachments=cl,a.initializeIssueTypeFields=Qo,a.initializeIssueTypeFieldsAttachments=Bo,a.initializeIssueTypes=hl,a.initializeIssueUpdates=gl,a.initializeIssues=Oo,a.initializeOrganizationAccesses=zl,a.initializeOrganizations=$l,a.initializeProjectAccesses=xl,a.initializeProjectAttachments=ch,a.initializeProjectFiles=fh,a.initializeProjects=vh,a.initializeTeamMemberships=zh,a.initializeTeams=$h,a.initializeUsers=vl,a.isToday=Rm,a.issueAssociationReducer=xu,a.issueAssociationSlice=Wa,a.issueAttachmentReducer=uo,a.issueAttachmentSlice=Xa,a.issueCommentAttachmentReducer=go,a.issueCommentAttachmentSlice=ti,a.issueCommentReducer=To,a.issueCommentSlice=ai,a.issueReducer=vo,a.issueSlice=di,a.issueTypeAttachmentReducer=Co,a.issueTypeAttachmentSlice=mi,a.issueTypeFieldValuesAttachmentReducer=ol,a.issueTypeFieldValuesAttachmentSlice=Fi,a.issueTypeFieldValuesReducer=Zo,a.issueTypeFieldValuesSlice=yi,a.issueTypeFieldsAttachmentReducer=Wo,a.issueTypeFieldsAttachmentSlice=Ai,a.issueTypeFieldsReducer=al,a.issueTypeFieldsSlice=Pi,a.issueTypeReducer=fl,a.issueTypeSlice=Ii,a.issueUpdateReducer=_l,a.issueUpdateSlice=vi,a.logOnlyOnce=zm,a.markAsDeleted=Jl,a.markForDeletion=xS,a.memoize=Ht,a.offline=T,a.onlyUniqueHashes=Bm,a.onlyUniqueOfflineIds=Ic,a.organizationAccessReducer=Cl,a.organizationAccessSlice=Ei,a.organizationReducer=Hl,a.organizationSlice=Vi,a.outboxReducer=Xl,a.outboxSlice=zi,a.overmapEnhancer=Xg,a.overmapReducer=Bg,a.overmapReducers=Yh,a.performRequest=nc,a.projectAccessReducer=sh,a.projectAccessSlice=Ui,a.projectAttachmentReducer=Ah,a.projectAttachmentSlice=$i,a.projectFileReducer=_h,a.projectFileSlice=Li,a.projectReducer=Mh,a.projectSlice=Hi,a.rehydratedReducer=qh,a.rehydratedSlice=Ji,a.removeDocuments=Ia,a.removeIssueType=Oi,a.resetProjectFileObjectUrls=lg,a.restructureCreateSelectorWithArgs=f,a.saveActiveProjectFileBounds=Th,a.selectAccessToken=yy,a.selectAccessesByUserOfProject=ag,a.selectAccessibleProjects=bg,a.selectActiveOrganizationAccess=$S,a.selectActiveProjectFileId=mg,a.selectAllDocumentAttachments=Ud,a.selectAllProjectAttachments=hh,a.selectAssetAttachmentById=Dc,a.selectAssetAttachmentMapping=zc,a.selectAssetAttachments=Uc,a.selectAssetById=Ns,a.selectAssetProcedureAttachmentById=Jc,a.selectAssetProcedureAttachmentMapping=Kc,a.selectAssetProcedureAttachments=Yc,a.selectAssetProcedureById=Ps,a.selectAssetProcedureFieldValues=us,a.selectAssetProcedureFieldValuesAttachmentById=Fp,a.selectAssetProcedureFieldValuesAttachments=yn,a.selectAssetProcedureFieldValuesAttachmentsByIds=fn,a.selectAssetProcedureFieldValuesAttachmentsMapping=cs,a.selectAssetProcedureFieldValuesById=os,a.selectAssetProcedureFieldValuesMapping=On,a.selectAssetProcedureFieldValuesOfAsset=Op,a.selectAssetProcedureFields=as,a.selectAssetProcedureFieldsAttachmentById=dp,a.selectAssetProcedureFieldsAttachments=an,a.selectAssetProcedureFieldsAttachmentsMapping=sn,a.selectAssetProcedureFieldsById=yp,a.selectAssetProcedureFieldsMapping=ln,a.selectAssetProcedureFieldsOfAssetProcedure=pp,a.selectAssetProcedureInstanceById=ys,a.selectAssetProcedureInstances=As,a.selectAssetProcedureInstancesByIds=Ep,a.selectAssetProcedureInstancesMapping=ps,a.selectAssetProcedureInstancesOfAssetProcedure=En,a.selectAssetProcedureInstancesOfAssetType=Mp,a.selectAssetProcedureStepById=Ds,a.selectAssetProcedureStepFieldValues=yt,a.selectAssetProcedureStepFieldValuesAttachmentById=nA,a.selectAssetProcedureStepFieldValuesAttachments=Xn,a.selectAssetProcedureStepFieldValuesAttachmentsByIds=Qn,a.selectAssetProcedureStepFieldValuesAttachmentsMapping=ws,a.selectAssetProcedureStepFieldValuesById=qs,a.selectAssetProcedureStepFieldValuesMapping=nr,a.selectAssetProcedureStepFieldValuesOfAsset=uA,a.selectAssetProcedureStepFieldValuesOfAssetProcedureInstance=oA,a.selectAssetProcedureStepFieldValuesOfAssetProcedureStep=lA,a.selectAssetProcedureStepFields=Rs,a.selectAssetProcedureStepFieldsAttachmentById=Hp,a.selectAssetProcedureStepFieldsAttachments=Ln,a.selectAssetProcedureStepFieldsAttachmentsMapping=Gn,a.selectAssetProcedureStepFieldsById=eA,a.selectAssetProcedureStepFieldsMapping=_s,a.selectAssetProcedureStepFieldsOfAssetProcedureStep=Xp,a.selectAssetProcedureStepMapping=St,a.selectAssetProcedureSteps=hr,a.selectAssetProcedureStepsByIds=SA,a.selectAssetProcedureStepsMappingOfAssetProcedure=yA,a.selectAssetProcedureStepsOfAssetProcedure=fA,a.selectAssetProcedures=zn,a.selectAssetProceduresByIds=Dp,a.selectAssetProceduresMapping=bs,a.selectAssetProceduresOfOrganization=Cp,a.selectAssetStageById=ea,a.selectAssetStageCompletionById=Tr,a.selectAssetStageCompletionMapping=Zs,a.selectAssetStageCompletions=OA,a.selectAssetStageCompletionsByIds=Ir,a.selectAssetStages=wr,a.selectAssetStagesByIds=jA,a.selectAssetStagesMappingOfAssetProcedure=MA,a.selectAssetStagesOfAssetProcedure=EA,a.selectAssetTypeAttachmentById=Dr,a.selectAssetTypeAttachmentMapping=zr,a.selectAssetTypeAttachments=Ur,a.selectAssetTypeById=fa,a.selectAssetTypeFieldValues=la,a.selectAssetTypeFieldValuesAttachmentById=sy,a.selectAssetTypeFieldValuesAttachments=id,a.selectAssetTypeFieldValuesAttachmentsByIds=cd,a.selectAssetTypeFieldValuesAttachmentsMapping=ra,a.selectAssetTypeFieldValuesById=ha,a.selectAssetTypeFieldValuesMapping=md,a.selectAssetTypeFieldValuesOfAsset=cy,a.selectAssetTypeFields=Ft,a.selectAssetTypeFieldsAttachmentById=GA,a.selectAssetTypeFieldsAttachments=Wr,a.selectAssetTypeFieldsAttachmentsMapping=Hr,a.selectAssetTypeFieldsById=ZA,a.selectAssetTypeFieldsMapping=xr,a.selectAssetTypeFieldsOfAssetType=YA,a.selectAssetTypeValuesOfAssetType=ny,a.selectAssetTypes=fd,a.selectAssetTypesByIds=hy,a.selectAssetTypesMapping=ya,a.selectAssetTypesOfOrganization=my,a.selectAssets=Ar,a.selectAssetsByIds=yr,a.selectAssetsMapping=Gs,a.selectAssetsOfAssetType=Ls,a.selectAttachmentsOfAsset=Cc,a.selectAttachmentsOfAssetProcedure=tp,a.selectAttachmentsOfAssetProcedureFieldValues=Sn,a.selectAttachmentsOfAssetProcedureFields=rp,a.selectAttachmentsOfAssetProcedureStepFieldValues=xn,a.selectAttachmentsOfAssetProcedureStepFields=Np,a.selectAttachmentsOfAssetType=Cr,a.selectAttachmentsOfAssetTypeFieldValues=nd,a.selectAttachmentsOfAssetTypeFields=$A,a.selectAttachmentsOfDocument=vy,a.selectAttachmentsOfFormRevision=Hy,a.selectAttachmentsOfFormSubmission=Ru,a.selectAttachmentsOfIssue=no,a.selectAttachmentsOfIssueComment=Of,a.selectAttachmentsOfIssueType=Bf,a.selectAttachmentsOfIssueTypeFieldValues=ul,a.selectAttachmentsOfIssueTypeFields=Wf,a.selectAttachmentsOfProject=ph,a.selectCategories=_d,a.selectCategoriesByIds=Ty,a.selectCategoriesOfProject=Iy,a.selectCategoryById=Pa,a.selectCategoryMapping=ba,a.selectCommentsOfIssue=Ef,a.selectConversation=Ym,a.selectConversationMapping=Jt,a.selectConversations=Km,a.selectCurrentUser=jl,a.selectDeletedRequests=XS,a.selectDocumentAttachmentById=Dd,a.selectDocumentAttachmentMapping=zd,a.selectDocumentById=Gd,a.selectDocuments=Oa,a.selectDocumentsByIds=wy,a.selectDocumentsMapping=_t,a.selectEmailDomains=Jd,a.selectEmailDomainsAsMapping=Yd,a.selectEmailDomainsOfOrganization=Cy,a.selectFieldValuesOfAssetProcedureInstance=_p,a.selectFormById=Fu,a.selectFormMapping=bu,a.selectFormRevisionAttachmentsMapping=ru,a.selectFormRevisionById=Zy,a.selectFormRevisionMapping=Rt,a.selectFormRevisions=pu,a.selectFormRevisionsOfForm=Au,a.selectFormSubmissionAttachemntsByIds=_u,a.selectFormSubmissionAttachmentsMapping=Ua,a.selectFormSubmissionById=Ga,a.selectFormSubmissions=$a,a.selectFormSubmissionsMapping=Ba,a.selectFormSubmissionsOfAsset=Vu,a.selectFormSubmissionsOfForm=ju,a.selectFormSubmissionsOfIssue=qu,a.selectForms=Pu,a.selectFormsOfOrganization=cf,a.selectGeoImageById=Ha,a.selectGeoImageMapping=Lu,a.selectGeoImages=Nu,a.selectGeoImagesOfProject=pf,a.selectIsImportingProjectFile=pg,a.selectIsLoggedIn=fy,a.selectIssueAssociationById=Ju,a.selectIssueAssociationMapping=it,a.selectIssueAssociations=Sf,a.selectIssueAssociationsOfAsset=Qu,a.selectIssueAssociationsOfIssue=Xu,a.selectIssueAssociationsToIssue=Zu,a.selectIssueAttachmentById=ro,a.selectIssueAttachmentMapping=io,a.selectIssueAttachments=co,a.selectIssueById=hi,a.selectIssueCommentAttachmentById=So,a.selectIssueCommentAttachmentMapping=yo,a.selectIssueCommentAttachments=fo,a.selectIssueCommentById=ri,a.selectIssueCommentMapping=Fo,a.selectIssueMapping=li,a.selectIssueTypeAttachmentById=Do,a.selectIssueTypeAttachmentMapping=zo,a.selectIssueTypeAttachments=Uo,a.selectIssueTypeById=_i,a.selectIssueTypeFieldValues=gi,a.selectIssueTypeFieldValuesAttachmentById=pS,a.selectIssueTypeFieldValuesAttachments=rl,a.selectIssueTypeFieldValuesAttachmentsByIds=dl,a.selectIssueTypeFieldValuesAttachmentsMapping=Ti,a.selectIssueTypeFieldValuesById=bi,a.selectIssueTypeFieldValuesMapping=Jo,a.selectIssueTypeFieldValuesOfIssue=xf,a.selectIssueTypeFields=Vt,a.selectIssueTypeFieldsAttachmentById=Kf,a.selectIssueTypeFieldsAttachments=Ho,a.selectIssueTypeFieldsAttachmentsMapping=No,a.selectIssueTypeFieldsById=dS,a.selectIssueTypeFieldsMapping=sl,a.selectIssueTypeFieldsOfIssueType=cS,a.selectIssueTypeMapping=Al,a.selectIssueTypeValuesOfIssueType=rS,a.selectIssueTypes=yl,a.selectIssueTypesByIds=bS,a.selectIssueTypesOfOrganization=PS,a.selectIssueUpdateMapping=Il,a.selectIssueUpdatesOfIssue=Ol,a.selectIssues=zf,a.selectIssuesByIds=Uf,a.selectIssuesOfIssueType=Ri,a.selectIssuesOfIssueTypeCount=FS,a.selectLatestAssetProcedureFieldsOfAssetProcedure=Ap,a.selectLatestAssetProcedureStepFieldsOfAssetProcedureStep=Qp,a.selectLatestAssetTypeFieldsOfAssetType=JA,a.selectLatestFieldsByAssetProcedureStep=xp,a.selectLatestFormRevisionOfForm=Xy,a.selectLatestIssueTypeFieldsOfIssueType=nS,a.selectLatestRetryTime=QS,a.selectMembershipsByUserOfTeam=Mg,a.selectNumberOfAssetsOfAssetType=FA,a.selectOrganizationAccessById=qi,a.selectOrganizationAccessMapping=ji,a.selectOrganizationAccessUserMapping=kl,a.selectOrganizationById=ZS,a.selectOrganizationDocuments=Ey,a.selectOrganizations=JS,a.selectOrganizationsMapping=Nl,a.selectProjectAccessById=Bi,a.selectProjectAccessMapping=ki,a.selectProjectAccesses=kt,a.selectProjectAccessesOfProject=ah,a.selectProjectAttachmentById=mh,a.selectProjectAttachmentMapping=lh,a.selectProjectById=jh,a.selectProjectDocuments=My,a.selectProjectFileById=hg,a.selectProjectFileMapping=Ih,a.selectProjectFiles=Oh,a.selectProjectMapping=Eh,a.selectProjects=Yi,a.selectProjectsOfOrganization=Pg,a.selectRehydrated=Ig,a.selectStageMapping=Pt,a.selectTeamById=ac,a.selectTeamMembershipById=kh,a.selectTeamMemberships=xi,a.selectTeamMembershipsMapping=Ch,a.selectTeams=Nh,a.selectTeamsByIds=Ug,a.selectTeamsMapping=sc,a.selectTeamsOfOrganization=Dg,a.selectUploadUrl=eu,a.selectUserById=ql,a.selectUsers=Mi,a.selectUsersByIds=zS,a.selectUsersMapping=Dt,a.selectUsersOfOrganization=GS,a.selectUsersOfProject=ig,a.selectUsersOfTeam=Eg,a.setActiveProjectFileId=Fh,a.setAsset=bA,a.setAssetAttachment=jc,a.setAssetAttachments=Zm,a.setAssetProcedure=zp,a.setAssetProcedureAttachment=Lc,a.setAssetProcedureAttachments=xm,a.setAssetProcedureFieldValues=Tp,a.setAssetProcedureFieldValuesAttachment=Sp,a.setAssetProcedureFieldValuesAttachments=gp,a.setAssetProcedureFieldValuesMany=Ip,a.setAssetProcedureFields=op,a.setAssetProcedureFieldsAttachment=ap,a.setAssetProcedureFieldsAttachments=ip,a.setAssetProcedureFieldsMany=lp,a.setAssetProcedureInstance=vp,a.setAssetProcedureInstances=wp,a.setAssetProcedureStep=or,a.setAssetProcedureStepFieldValues=rA,a.setAssetProcedureStepFieldValuesAttachment=sA,a.setAssetProcedureStepFieldValuesAttachments=aA,a.setAssetProcedureStepFieldValuesMany=dA,a.setAssetProcedureStepFields=Kp,a.setAssetProcedureStepFieldsAttachment=Bp,a.setAssetProcedureStepFieldsAttachments=$p,a.setAssetProcedureStepFieldsMany=Yp,a.setAssetProcedureSteps=hA,a.setAssetProcedures=Up,a.setAssetStage=Rr,a.setAssetStageCompletion=TA,a.setAssetStageCompletions=IA,a.setAssetStages=_A,a.setAssetType=ry,a.setAssetTypeAttachment=jr,a.setAssetTypeAttachments=VA,a.setAssetTypeFieldValues=ay,a.setAssetTypeFieldValuesAttachment=QA,a.setAssetTypeFieldValuesAttachments=xA,a.setAssetTypeFieldValuesMany=iy,a.setAssetTypeFields=NA,a.setAssetTypeFieldsAttachment=DA,a.setAssetTypeFieldsAttachments=CA,a.setAssetTypeFieldsMany=HA,a.setAssetTypes=dy,a.setAssets=PA,a.setCategories=by,a.setCategory=gy,a.setConversation=vc,a.setConversations=Lm,a.setCurrentUser=qS,a.setDocumentAttachment=Ed,a.setDocumentAttachments=_y,a.setDocuments=Bd,a.setEmailDomain=qy,a.setEmailDomains=Vy,a.setForm=xy,a.setFormRevision=hu,a.setFormRevisionAttachment=$y,a.setFormRevisionAttachments=Gy,a.setFormRevisions=Ky,a.setFormSubmission=Mt,a.setFormSubmissionAttachment=rf,a.setFormSubmissionAttachments=df,a.setFormSubmissions=lf,a.setForms=ef,a.setGeoImage=at,a.setGeoImages=Cu,a.setIsImportingProjectFile=Ph,a.setIssue=jf,a.setIssueAssociation=yf,a.setIssueAssociations=Af,a.setIssueAttachment=to,a.setIssueAttachments=bf,a.setIssueComment=ci,a.setIssueCommentAttachment=ho,a.setIssueCommentAttachments=Tf,a.setIssueComments=Po,a.setIssueType=nt,a.setIssueTypeAttachment=Eo,a.setIssueTypeAttachments=Cf,a.setIssueTypeFieldValues=Jf,a.setIssueTypeFieldValuesAttachment=oS,a.setIssueTypeFieldValuesAttachments=lS,a.setIssueTypeFieldValuesMany=Zf,a.setIssueTypeFields=tS,a.setIssueTypeFieldsAttachment=Gf,a.setIssueTypeFieldsAttachments=Lf,a.setIssueTypeFieldsMany=sS,a.setIssueTypes=yS,a.setIssueUpdate=TS,a.setIssueUpdates=IS,a.setIssues=qf,a.setLoggedIn=bd,a.setOrganization=NS,a.setOrganizationAccess=DS,a.setOrganizationAccesses=CS,a.setOrganizations=LS,a.setProfilePicture=VS,a.setProject=yg,a.setProjectAccess=eg,a.setProjectAccesses=tg,a.setProjectAttachment=rh,a.setProjectAttachments=dh,a.setProjectFile=rg,a.setProjectFiles=dg,a.setProjects=Ag,a.setRehydrated=Tg,a.setTeam=dt,a.setTeamMembership=Xi,a.setTeamMemberships=_g,a.setTeams=qg,a.setTokens=py,a.setUploadUrl=xd,a.setUser=vS,a.setUsers=RS,a.shallowEqual=Tm,a.slugify=Cm,a.spacesToDashesLower=Dm,a.teamMembershipReducer=Dh,a.teamMembershipSlice=Zi,a.teamReducer=Hh,a.teamSlice=ec,a.toFileNameSafeString=Um,a.toOfflineIdRecord=Tc,a.truncate=km,a.updateAsset=et,a.updateAssetAttachment=Xm,a.updateAssetAttachments=qc,a.updateAssetProcedure=Xe,a.updateAssetProcedureAttachment=ep,a.updateAssetProcedureAttachments=Nc,a.updateAssetProcedureFieldValues=Je,a.updateAssetProcedureFieldValuesAttachment=bp,a.updateAssetProcedureFieldValuesAttachments=An,a.updateAssetProcedureFieldValuesMany=Tn,a.updateAssetProcedureFields=un,a.updateAssetProcedureFieldsAttachment=cp,a.updateAssetProcedureFieldsAttachments=en,a.updateAssetProcedureFieldsMany=hp,a.updateAssetProcedureInstance=Ze,a.updateAssetProcedureInstances=Rp,a.updateAssetProcedureStep=ft,a.updateAssetProcedureStepFieldValues=xe,a.updateAssetProcedureStepFieldValuesAttachment=iA,a.updateAssetProcedureStepFieldValuesAttachments=Zn,a.updateAssetProcedureStepFieldValuesMany=ir,a.updateAssetProcedureStepFields=Qe,a.updateAssetProcedureStepFieldsAttachment=Gp,a.updateAssetProcedureStepFieldsAttachments=Bn,a.updateAssetProcedureStepFieldsMany=Jp,a.updateAssetProcedureSteps=pA,a.updateAssetProcedures=qp,a.updateAssetStage=bt,a.updateAssetStageCompletion=br,a.updateAssetStageCompletions=Pr,a.updateAssetStages=vA,a.updateAssetType=st,a.updateAssetTypeAttachment=zA,a.updateAssetTypeAttachments=qr,a.updateAssetTypeFieldValues=tt,a.updateAssetTypeFieldValuesAttachment=ey,a.updateAssetTypeFieldValuesAttachments=ad,a.updateAssetTypeFieldValuesMany=ld,a.updateAssetTypeFields=Xr,a.updateAssetTypeFieldsAttachment=kA,a.updateAssetTypeFieldsAttachments=Lr,a.updateAssetTypeFieldsMany=WA,a.updateAssetTypes=oy,a.updateAssets=gA,a.updateCategories=Py,a.updateCategory=Id,a.updateConversation=wc,a.updateConversations=Nm,a.updateDocumentAttachment=Ry,a.updateDocumentAttachments=jd,a.updateDocuments=Ne,a.updateEmailDomain=zy,a.updateEmailDomains=Uy,a.updateForm=tf,a.updateFormRevision=Yy,a.updateFormRevisionAttachment=Ly,a.updateFormRevisionAttachments=cu,a.updateFormRevisions=Jy,a.updateFormSubmission=Eu,a.updateFormSubmissionAttachment=uf,a.updateFormSubmissionAttachments=Ou,a.updateFormSubmissions=hf,a.updateForms=sf,a.updateGeoImage=$u,a.updateGeoImages=mf,a.updateIssue=qt,a.updateIssueAssociation=Yu,a.updateIssueAssociations=ff,a.updateIssueAttachment=Pf,a.updateIssueAttachments=so,a.updateIssueComment=vf,a.updateIssueCommentAttachment=If,a.updateIssueCommentAttachments=mo,a.updateIssueComments=wf,a.updateIssueType=pl,a.updateIssueTypeAttachment=kf,a.updateIssueTypeAttachments=jo,a.updateIssueTypeFieldValues=ct,a.updateIssueTypeFieldValuesAttachment=hS,a.updateIssueTypeFieldValuesAttachments=nl,a.updateIssueTypeFieldValuesMany=Xf,a.updateIssueTypeFields=el,a.updateIssueTypeFieldsAttachment=Nf,a.updateIssueTypeFieldsAttachments=Go,a.updateIssueTypeFieldsMany=aS,a.updateIssueTypes=fS,a.updateIssueUpdate=OS,a.updateIssueUpdates=_S,a.updateIssues=Vf,a.updateOrganization=Ll,a.updateOrganizationAccess=Ct,a.updateOrganizationAccesses=kS,a.updateOrganizations=WS,a.updateProject=wh,a.updateProjectAccess=rt,a.updateProjectAccesses=sg,a.updateProjectAttachment=ng,a.updateProjectAttachments=uh,a.updateProjectFile=Ni,a.updateProjectFiles=og,a.updateProjects=Sg,a.updateTeam=Lh,a.updateTeamMembership=Rg,a.updateTeamMemberships=vg,a.updateTeams=Vg,a.updateUser=ES,a.updateUsers=MS,a.userReducer=El,a.userSlice=wi,a.versioningReducer=Kh,a.versioningSlice=Wh,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -3,7 +3,7 @@ import { Organization, Project, ProjectAttachment, Stored } from '../../typings'
|
|
|
3
3
|
import { BaseSDK } from '../base';
|
|
4
4
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
5
|
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
6
|
-
export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK,
|
|
6
|
+
export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, ProjectAttachment> {
|
|
7
7
|
name: string;
|
|
8
8
|
url: string;
|
|
9
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/addProjectAttachments">;
|
|
@@ -11,7 +11,7 @@ export declare abstract class ProjectAttachmentService<TState extends OvermapRoo
|
|
|
11
11
|
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "projectAttachments/deleteProjectAttachments">;
|
|
12
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "projectAttachments/deleteProjectAttachment">;
|
|
13
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>, "projectAttachments/setProjectAttachment">;
|
|
14
|
-
selectAttachment: import('../..').OvermapSelectorWithArgs<string, ProjectAttachment | undefined>;
|
|
14
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<ProjectAttachment> | undefined>;
|
|
15
15
|
protected buildOfflineAttachment(data: BuildOfflineAttachmentData): import('../..').UUID<{
|
|
16
16
|
file: string;
|
|
17
17
|
file_sha1: string;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Organization, OrganizationAccess,
|
|
1
|
+
import { Organization, OrganizationAccess, User } from '../../typings';
|
|
2
2
|
import { ModelState } from '../adapters';
|
|
3
3
|
import { OvermapRootState, OvermapSelector, OvermapSelectorWithArgs } from '../typings';
|
|
4
|
-
export type OrganizationAccessState = ModelState<OrganizationAccess["uuid"],
|
|
4
|
+
export type OrganizationAccessState = ModelState<OrganizationAccess["uuid"], OrganizationAccess>;
|
|
5
5
|
export declare const organizationAccessSlice: import('@reduxjs/toolkit').Slice<OrganizationAccessState, {
|
|
6
|
-
initializeOrganizationAccesses: (state: ModelState<string,
|
|
7
|
-
payload:
|
|
6
|
+
initializeOrganizationAccesses: (state: ModelState<string, OrganizationAccess>, action: {
|
|
7
|
+
payload: OrganizationAccess[];
|
|
8
8
|
type: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
addOrganizationAccess: (state: ModelState<string,
|
|
11
|
-
payload:
|
|
10
|
+
addOrganizationAccess: (state: ModelState<string, OrganizationAccess>, action: {
|
|
11
|
+
payload: OrganizationAccess;
|
|
12
12
|
type: string;
|
|
13
13
|
}) => void;
|
|
14
|
-
addOrganizationAccesses: (state: ModelState<string,
|
|
15
|
-
payload:
|
|
14
|
+
addOrganizationAccesses: (state: ModelState<string, OrganizationAccess>, action: {
|
|
15
|
+
payload: OrganizationAccess[];
|
|
16
16
|
type: string;
|
|
17
17
|
}) => void;
|
|
18
|
-
setOrganizationAccess: (state: ModelState<string,
|
|
19
|
-
payload:
|
|
18
|
+
setOrganizationAccess: (state: ModelState<string, OrganizationAccess>, action: {
|
|
19
|
+
payload: OrganizationAccess;
|
|
20
20
|
type: string;
|
|
21
21
|
}) => void;
|
|
22
|
-
setOrganizationAccesses: (state: ModelState<string,
|
|
23
|
-
payload:
|
|
22
|
+
setOrganizationAccesses: (state: ModelState<string, OrganizationAccess>, action: {
|
|
23
|
+
payload: OrganizationAccess[];
|
|
24
24
|
type: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
updateOrganizationAccess: (state: ModelState<string,
|
|
27
|
-
payload:
|
|
26
|
+
updateOrganizationAccess: (state: ModelState<string, OrganizationAccess>, action: {
|
|
27
|
+
payload: OrganizationAccess;
|
|
28
28
|
type: string;
|
|
29
29
|
}) => void;
|
|
30
|
-
updateOrganizationAccesses: (state: ModelState<string,
|
|
31
|
-
payload:
|
|
30
|
+
updateOrganizationAccesses: (state: ModelState<string, OrganizationAccess>, action: {
|
|
31
|
+
payload: OrganizationAccess[];
|
|
32
32
|
type: string;
|
|
33
33
|
}) => void;
|
|
34
|
-
deleteOrganizationAccess: (state: ModelState<string,
|
|
34
|
+
deleteOrganizationAccess: (state: ModelState<string, OrganizationAccess>, action: {
|
|
35
35
|
payload: string;
|
|
36
36
|
type: string;
|
|
37
37
|
}) => void;
|
|
38
|
-
deleteOrganizationAccesses: (state: ModelState<string,
|
|
38
|
+
deleteOrganizationAccesses: (state: ModelState<string, OrganizationAccess>, action: {
|
|
39
39
|
payload: string[];
|
|
40
40
|
type: string;
|
|
41
41
|
}) => void;
|
|
42
42
|
}, "organizationAccess", "organizationAccess", import('@reduxjs/toolkit').SliceSelectors<OrganizationAccessState>>;
|
|
43
|
-
export declare const initializeOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<
|
|
43
|
+
export declare const initializeOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess[], "organizationAccess/initializeOrganizationAccesses">, addOrganizationAccess: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess, "organizationAccess/addOrganizationAccess">, addOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess[], "organizationAccess/addOrganizationAccesses">, setOrganizationAccess: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess, "organizationAccess/setOrganizationAccess">, setOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess[], "organizationAccess/setOrganizationAccesses">, updateOrganizationAccess: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess, "organizationAccess/updateOrganizationAccess">, updateOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<OrganizationAccess[], "organizationAccess/updateOrganizationAccesses">, deleteOrganizationAccess: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "organizationAccess/deleteOrganizationAccess">, deleteOrganizationAccesses: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "organizationAccess/deleteOrganizationAccesses">;
|
|
44
44
|
export declare const organizationAccessReducer: import('redux').Reducer<OrganizationAccessState>;
|
|
45
|
-
export declare const selectOrganizationAccessMapping: (state: OvermapRootState) => Record<string,
|
|
45
|
+
export declare const selectOrganizationAccessMapping: (state: OvermapRootState) => Record<string, OrganizationAccess>;
|
|
46
46
|
export declare const selectOrganizationAccessById: OvermapSelectorWithArgs<OrganizationAccess["uuid"], OrganizationAccess | undefined>;
|
|
47
47
|
export declare const selectActiveOrganizationAccess: OvermapSelector<OrganizationAccess | null>;
|
|
48
48
|
export declare const selectOrganizationAccessUserMapping: OvermapSelector<Record<User["id"], OrganizationAccess>>;
|
|
@@ -45,6 +45,6 @@ export declare const projectAccessReducer: import('redux').Reducer<ProjectAccess
|
|
|
45
45
|
export declare const selectProjectAccessMapping: (state: OvermapRootState) => Record<string, Stored<ProjectAccess>>;
|
|
46
46
|
export declare const selectProjectAccesses: OvermapSelector<Stored<ProjectAccess>[]>;
|
|
47
47
|
export declare const selectProjectAccessById: OvermapSelectorWithArgs<ProjectAccess["uuid"], Stored<ProjectAccess> | undefined>;
|
|
48
|
-
export declare const selectProjectAccessesOfProject: OvermapSelectorWithArgs<ProjectAccess["uuid"], ProjectAccess[]>;
|
|
48
|
+
export declare const selectProjectAccessesOfProject: OvermapSelectorWithArgs<ProjectAccess["uuid"], Stored<ProjectAccess>[]>;
|
|
49
49
|
export declare const selectAccessesByUserOfProject: OvermapSelectorWithArgs<Project["uuid"], Record<User["id"], Stored<ProjectAccess>>>;
|
|
50
50
|
export declare const selectUsersOfProject: OvermapSelectorWithArgs<Project["uuid"], User[]>;
|
|
@@ -43,6 +43,6 @@ export declare const projectAttachmentSlice: import('@reduxjs/toolkit').Slice<Pr
|
|
|
43
43
|
export declare const initializeProjectAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/initializeProjectAttachments">, addProjectAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>, "projectAttachments/addProjectAttachment">, addProjectAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/addProjectAttachments">, setProjectAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>, "projectAttachments/setProjectAttachment">, setProjectAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/setProjectAttachments">, updateProjectAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>, "projectAttachments/updateProjectAttachment">, updateProjectAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/updateProjectAttachments">, deleteProjectAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "projectAttachments/deleteProjectAttachment">, deleteProjectAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "projectAttachments/deleteProjectAttachments">;
|
|
44
44
|
export declare const selectProjectAttachmentMapping: (state: OvermapRootState) => Record<string, Stored<ProjectAttachment>>;
|
|
45
45
|
export declare const selectAllProjectAttachments: OvermapSelector<Stored<ProjectAttachment>[]>;
|
|
46
|
-
export declare const selectProjectAttachmentById: OvermapSelectorWithArgs<ProjectAttachment["uuid"], ProjectAttachment | undefined>;
|
|
46
|
+
export declare const selectProjectAttachmentById: OvermapSelectorWithArgs<ProjectAttachment["uuid"], Stored<ProjectAttachment> | undefined>;
|
|
47
47
|
export declare const selectAttachmentsOfProject: (args: string) => (state: OvermapRootState) => Stored<ProjectAttachment>[];
|
|
48
48
|
export declare const projectAttachmentReducer: import('redux').Reducer<ProjectAttachmentState>;
|
|
@@ -139,7 +139,7 @@ export declare const selectProjectFiles: ((state: {
|
|
|
139
139
|
argsMemoize: typeof import('reselect').weakMapMemoize;
|
|
140
140
|
memoize: typeof import('reselect').weakMapMemoize;
|
|
141
141
|
};
|
|
142
|
-
export declare const selectProjectFileById: OvermapSelectorWithArgs<ProjectFile["uuid"], ProjectFile | undefined>;
|
|
142
|
+
export declare const selectProjectFileById: OvermapSelectorWithArgs<ProjectFile["uuid"], Stored<ProjectFile> | undefined>;
|
|
143
143
|
export declare const selectActiveProjectFileId: OvermapSelector<ProjectFile["uuid"] | null>;
|
|
144
144
|
export declare const selectIsImportingProjectFile: OvermapSelector<boolean>;
|
|
145
145
|
export declare const projectFileReducer: import('redux').Reducer<ProjectFileState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileModel, FileWithNameModel } from '../files';
|
|
2
|
-
import { CreatedByModel, SubmittedAtModel, UUIDModel } from './base';
|
|
3
|
-
export interface Attachment extends UUIDModel, SubmittedAtModel, FileWithNameModel, CreatedByModel {
|
|
2
|
+
import { CreatedByModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
|
+
export interface Attachment extends UUIDModel, TimestampedModel, SubmittedAtModel, FileWithNameModel, CreatedByModel {
|
|
4
4
|
description?: string;
|
|
5
5
|
file_type: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreatedByModel, IndexedModel, Payload, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
2
2
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesAttachmentModel, FieldValuesModel } from './fields';
|
|
3
|
-
export interface Form extends UUIDModel, SubmittedAtModel, CreatedByModel {
|
|
3
|
+
export interface Form extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel {
|
|
4
4
|
organization: string;
|
|
5
5
|
}
|
|
6
6
|
export interface FormRevision extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileWithNameModel } from '../files';
|
|
2
|
-
import { CanvasMarkableModel, CreatedByModel, IndexedModel, MarkableModel, Payload, SubmittedAtModel, UUIDModel } from './base';
|
|
2
|
+
import { CanvasMarkableModel, CreatedByModel, IndexedModel, MarkableModel, Payload, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
3
|
import { Project } from './projects';
|
|
4
|
-
export interface GeoImage extends UUIDModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel, IndexedModel {
|
|
4
|
+
export interface GeoImage extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel, IndexedModel {
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
project: Project["uuid"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ColorModel, CreatedByModel, IconModel, SubmittedAtModel, UUIDModel } from './base';
|
|
1
|
+
import { ColorModel, CreatedByModel, IconModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
2
2
|
import { Organization } from './organizations';
|
|
3
|
-
export interface IssueType extends UUIDModel, SubmittedAtModel, IconModel, ColorModel, CreatedByModel {
|
|
3
|
+
export interface IssueType extends UUIDModel, SubmittedAtModel, TimestampedModel, IconModel, ColorModel, CreatedByModel {
|
|
4
4
|
name?: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
organization: Organization["uuid"];
|
|
@@ -3,7 +3,7 @@ import { CSSColor } from '../colors';
|
|
|
3
3
|
import { CanvasMarkableModel, CreatedByModel, IndexedModel, MarkableModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
4
4
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
|
|
5
5
|
import { User } from './users';
|
|
6
|
-
export interface Issue extends UUIDModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
6
|
+
export interface Issue extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
7
7
|
title?: string | null;
|
|
8
8
|
description?: string | null;
|
|
9
9
|
priority: IssuePriority;
|
|
@@ -35,12 +35,11 @@ export interface IssueUpdateChangeTypes {
|
|
|
35
35
|
} | null;
|
|
36
36
|
due_date: string;
|
|
37
37
|
}
|
|
38
|
-
export interface IssueUpdate extends UUIDModel, CreatedByModel {
|
|
39
|
-
submitted_at: string;
|
|
38
|
+
export interface IssueUpdate extends UUIDModel, CreatedByModel, SubmittedAtModel, TimestampedModel {
|
|
40
39
|
issue: UUIDModel["uuid"];
|
|
41
40
|
changes: Partial<Record<IssueUpdateChange, IssueUpdateChangeTypes[IssueUpdateChange]>>;
|
|
42
41
|
}
|
|
43
|
-
export interface IssueAssociation extends UUIDModel, SubmittedAtModel, CreatedByModel {
|
|
42
|
+
export interface IssueAssociation extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel {
|
|
44
43
|
associated_issue: string;
|
|
45
44
|
issue?: string;
|
|
46
45
|
asset?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OrganizationAccessLevel } from '../../enums';
|
|
2
|
-
import { UUIDModel } from './base';
|
|
2
|
+
import { TimestampedModel, UUIDModel } from './base';
|
|
3
3
|
import { User } from './users';
|
|
4
|
-
export interface Organization extends UUIDModel {
|
|
4
|
+
export interface Organization extends UUIDModel, TimestampedModel {
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
7
|
-
export interface OrganizationAccess extends UUIDModel {
|
|
7
|
+
export interface OrganizationAccess extends UUIDModel, TimestampedModel {
|
|
8
8
|
user: User["id"];
|
|
9
9
|
organization: string;
|
|
10
10
|
access_level: OrganizationAccessLevel;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { FileWithNameModel } from '../files';
|
|
2
|
-
import { BoundableModel, CanvasBoundableModel, OwnedByOrganization, SubmittedAtModel, UUIDModel } from './base';
|
|
2
|
+
import { BoundableModel, CanvasBoundableModel, CreatedByModel, OwnedByOrganization, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
3
|
import { OrganizationAccess } from './organizations';
|
|
4
4
|
import { User } from './users';
|
|
5
|
-
export interface Project extends UUIDModel, BoundableModel, CanvasBoundableModel, OwnedByOrganization {
|
|
5
|
+
export interface Project extends UUIDModel, TimestampedModel, BoundableModel, CanvasBoundableModel, OwnedByOrganization, CreatedByModel {
|
|
6
6
|
name: string;
|
|
7
7
|
}
|
|
8
|
-
export interface ProjectFile extends UUIDModel, SubmittedAtModel, FileWithNameModel, BoundableModel, CanvasBoundableModel {
|
|
8
|
+
export interface ProjectFile extends UUIDModel, SubmittedAtModel, TimestampedModel, FileWithNameModel, BoundableModel, CanvasBoundableModel, CreatedByModel {
|
|
9
9
|
z_index: number;
|
|
10
10
|
project: Project["uuid"];
|
|
11
11
|
}
|
|
12
|
-
export interface ProjectAccess extends UUIDModel {
|
|
12
|
+
export interface ProjectAccess extends UUIDModel, CreatedByModel, TimestampedModel {
|
|
13
13
|
user: User["id"];
|
|
14
14
|
project: Project["uuid"];
|
|
15
15
|
organization_access: OrganizationAccess["uuid"];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ColorModel, IconModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
1
|
+
import { ColorModel, CreatedByModel, IconModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
2
2
|
import { Organization } from './organizations';
|
|
3
3
|
import { User } from './users';
|
|
4
|
-
export interface Team extends UUIDModel, SubmittedAtModel, IconModel, ColorModel {
|
|
4
|
+
export interface Team extends UUIDModel, TimestampedModel, SubmittedAtModel, IconModel, ColorModel, CreatedByModel {
|
|
5
5
|
name: string;
|
|
6
6
|
parent: Team["uuid"] | null;
|
|
7
7
|
organization: Organization["uuid"];
|
|
8
8
|
}
|
|
9
|
-
export interface TeamMembership extends UUIDModel, TimestampedModel {
|
|
9
|
+
export interface TeamMembership extends UUIDModel, TimestampedModel, CreatedByModel {
|
|
10
10
|
team: Team["uuid"];
|
|
11
11
|
user: User["id"];
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core functionality for Overmap",
|
|
4
4
|
"author": "Wôrdn Inc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.78-view-sets.
|
|
6
|
+
"version": "1.0.78-view-sets-cleanup.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|