@overmap-ai/core 1.0.78-workflows-2.3 → 1.0.78-workflows-2.4
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
CHANGED
|
@@ -10247,7 +10247,8 @@ class nR extends E {
|
|
|
10247
10247
|
method: u.POST,
|
|
10248
10248
|
url: `${this.url}/bulk/`,
|
|
10249
10249
|
payload: {
|
|
10250
|
-
workflow_step_assignees: d.map((y) => F(y))
|
|
10250
|
+
workflow_step_assignees: d.map((y) => F(y)),
|
|
10251
|
+
submitted_at: o
|
|
10251
10252
|
},
|
|
10252
10253
|
blockers: d.flatMap((y) => [y.workflow, y.workflow_step]),
|
|
10253
10254
|
blocks: d.map((y) => y.uuid)
|
|
@@ -10993,7 +10994,8 @@ class pR extends E {
|
|
|
10993
10994
|
method: u.POST,
|
|
10994
10995
|
url: `${this.url}/bulk/`,
|
|
10995
10996
|
payload: {
|
|
10996
|
-
workflow_step_reviewers: d.map((y) => F(y))
|
|
10997
|
+
workflow_step_reviewers: d.map((y) => F(y)),
|
|
10998
|
+
submitted_at: o
|
|
10997
10999
|
},
|
|
10998
11000
|
blockers: d.flatMap((y) => [y.workflow, y.workflow_step]),
|
|
10999
11001
|
blocks: d.map((y) => y.uuid)
|
|
@@ -10,5 +10,5 @@ Action:`,s);const y=St();if(!y)throw new Error("Outbox coordinator not set");y.r
|
|
|
10
10
|
REST API, you will be requesting localhost:80 (where this app runs), resulting in a transformed blob
|
|
11
11
|
(with an uuid attached) being returned. Alternatively, you may be running with
|
|
12
12
|
import.meta.env.PROD, which will result in some file requests being treated as
|
|
13
|
-
external URLs and therefore not prepended with VITE_API_URL.`;throw new Error(p)}return await this.addCache(l),l}processPresignedUrl(e,n){if("warning"in n){if(n.warning==="already_uploaded")return Promise.resolve(void 0);throw console.error(n.warning),new Error(n.warning)}return this.enqueueRequest({url:n.url,description:"Upload file to S3",method:h.POST,isExternalUrl:!0,isAuthNeeded:!1,attachmentHash:e,blockers:[`s3-${n.fields.key}`],blocks:[e],s3url:n})}processPresignedUrls(e){const n={};for(const[a,c]of Object.entries(e))n[a]=this.processPresignedUrl(a,c);return n}async getFilePayload(e){const a={sha1:await Wt(e),file_type:e.type,extension:Na(e),size:e.size};return await this.client.files.addCache(e),a}}class YR extends M{constructor(){super(...arguments);m(this,"name","Form Identifier");m(this,"url","/form-identifiers");m(this,"actions",{addOne:Fp,addMany:gp,setOne:Pp,setMany:_p,updateOne:bp,updateMany:Rp,deleteOne:Mp,deleteMany:kp,initialize:Op});m(this,"selectors",{selectById:vp,selectByIds:Vp})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.form],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected form identifier with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected form identifier with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form__organization:e}},n);return this.dispatch(a(c)),c}}class ZR extends M{constructor(){super(...arguments);m(this,"name","Form Identifier Value");m(this,"url","/form-identifier-values");m(this,"actions",{addOne:qp,addMany:Dp,setOne:jp,setMany:$p,updateOne:Cp,updateMany:Up,deleteOne:Lp,deleteMany:Np,initialize:Wp});m(this,"selectors",{selectById:Hp,selectByIds:Kp})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.form_submission,e.form_identifier],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected form identifier value with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{form_submission__form_revision__form__organization:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class JR extends q{constructor(){super(...arguments);m(this,"name","Form Revision Attachment");m(this,"url","/form-revision-attachments");m(this,"actions",{addOne:Qp,addMany:Xp,setOne:xp,setMany:em,updateOne:tm,updateMany:sm,deleteOne:im,deleteMany:nm,initialize:Jp});m(this,"selectors",{selectById:cm,selectByIds:rm})}getId(e){return e.uuid}getBlockers(e){return[e.form_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form_revision__form__organization:e}},n);return this.dispatch(a(c)),c}}class QR extends M{constructor(){super(...arguments);m(this,"name","Form Revision");m(this,"url","/form-revisions");m(this,"actions",{addOne:Vi,addMany:Bi,setOne:om,setMany:hm,updateOne:pm,updateMany:mm,deleteOne:zi,deleteMany:Wi,initialize:um});m(this,"selectors",{selectById:ym,selectByIds:fm})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u});this.dispatch(a(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.form],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form__organization:e}},n);return this.dispatch(a(c)),c}}class XR extends M{constructor(){super(...arguments);m(this,"name","Form");m(this,"url","/forms");m(this,"actions",{addOne:Im,addMany:Om,setOne:Fm,setMany:gm,updateOne:Pm,updateMany:_m,deleteOne:bm,deleteMany:Rm,initialize:wm});m(this,"selectors",{selectById:Em,selectByIds:vm})}add(e,n){var f;const{store:a}=this.client,{addOne:c,deleteOne:r}=this.actions,d=new Date().toISOString(),l=((f=a.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=O({...e,submitted_at:d,created_by:l}),p=O({...n,form:u.uuid,submitted_at:d,created_by:l});this.dispatch(c(u)),this.dispatch(Vi(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:{...R(u),initial_revision:{uuid:p.uuid,submitted_at:p.submitted_at,title:p.title,description:p.description,fields:p.fields}},blockers:[],blocks:[u.uuid,p.uuid]});return y.catch(w=>{throw this.dispatch(r(u.uuid)),this.dispatch(zi(p.uuid)),w}),[u,p,y]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error("Expected form to exist");const u=sy(e)(d),p=Sm(e)(d);this.dispatch(a(e)),this.dispatch(Yi(V(u))),this.dispatch(Wi(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(y){throw this.dispatch(c(l)),this.dispatch(Bi(p)),this.dispatch(Ki(u)),y}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class xR extends q{constructor(){super(...arguments);m(this,"name","Form Submission Attachment");m(this,"url","/form-submission-attachments");m(this,"actions",{addOne:zm,addMany:Ci,setOne:Wm,setMany:qm,updateOne:Dm,updateMany:jm,deleteOne:$m,deleteMany:Ui,initialize:Bm});m(this,"selectors",{selectById:Cm,selectByIds:Um})}getId(e){return e.uuid}getBlockers(e){return[e.form_submission]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,r=n.getState(),d=Gi(e)(r);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{form_submission__form_revision__form__organization:e}},n)).flat();return this.dispatch(a(r)),r}}class eM extends M{constructor(){super(...arguments);m(this,"name","Form Submission");m(this,"url","/form-submissions");m(this,"actions",{addOne:Zm,addMany:Ki,setOne:Km,setMany:Ym,updateOne:Jm,updateMany:Qm,deleteOne:Xm,deleteMany:Yi,initialize:Hm});m(this,"selectors",{selectById:ey,selectByIds:ty})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u}),y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.form_revision],blocks:[p.uuid]});return this.dispatch(a(p)),y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected submission with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${l.uuid}/`,payload:e,blockers:[l.uuid],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected submission with uuid ${e} to exist`);const u=Lm(e)(d);this.dispatch(a(e)),this.dispatch(Ui(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(Ci(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{limit:this.pageSize,paginate:!0,form_revision__form_organization:e}},n)).flat();return this.dispatch(a(r)),r}}class tM extends q{constructor(){super(...arguments);m(this,"name","Geo Image");m(this,"url","/geo-images");m(this,"actions",{addOne:dy,addMany:ly,setOne:cy,setMany:ry,updateOne:uy,updateMany:oy,deleteOne:hy,deleteMany:py,initialize:ay});m(this,"selectors",{selectById:yy,selectByIds:fy})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,title:e.title,description:e.description,geo_marker:e.geo_marker,canvas_marker:e.canvas_marker,direction:e.direction,original_date:e.original_date,project:e.project}}buildBulkPayload(e){return{uuid:e.uuid,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,title:e.title,description:e.description,geo_marker:e.geo_marker,canvas_marker:e.canvas_marker,direction:e.direction,original_date:e.original_date,project:e.project}}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Geo image with uuid ${e.uuid} does not exist in the store`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project:e}},n);return this.dispatch(a(c)),c}}class sM extends M{constructor(){super(...arguments);m(this,"name","Issue Association");m(this,"url","/issue-associations");m(this,"actions",{addOne:gy,addMany:pt,setOne:Iy,setMany:wy,updateOne:Oy,updateMany:Fy,deleteOne:Py,deleteMany:mt,initialize:Ty});m(this,"selectors",{selectById:by,selectByIds:Ry})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=new Date().toISOString(),l=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,u=O({...e,submitted_at:d,created_by:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.associated_issue,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Issue association with uuid ${e} not found in store.`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{associated_issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class iM extends q{constructor(){super(...arguments);m(this,"name","Issue Attachment");m(this,"url","/issue-attachments");m(this,"actions",{addOne:qy,addMany:en,setOne:Dy,setMany:jy,updateOne:$y,updateMany:Cy,deleteOne:Uy,deleteMany:tn,initialize:Wy});m(this,"selectors",{selectById:Gy,selectByIds:Hy})}getId(e){return e.uuid}getBlockers(e){return[e.issue]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue:e.issue}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue:e.issue}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class nM extends q{constructor(){super(...arguments);m(this,"name","Issue Comment Attachment");m(this,"url","/issue-comment-attachments");m(this,"actions",{addOne:Jy,addMany:Qy,setOne:Xy,setMany:xy,updateOne:ef,updateMany:tf,deleteOne:sf,deleteMany:nf,initialize:Zy});m(this,"selectors",{selectById:cf,selectByIds:rf})}getId(e){return e.uuid}getBlockers(e){return[e.issue_comment]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_comment:e.issue_comment}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_comment:e.issue_comment}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue_comment__issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class aM extends M{constructor(){super(...arguments);m(this,"name","Issue Comment");m(this,"url","/issue-comments");m(this,"actions",{addOne:of,addMany:hf,setOne:pf,setMany:mf,updateOne:yf,updateMany:ff,deleteOne:Sf,deleteMany:Af,initialize:uf});m(this,"selectors",{selectById:Tf,selectByIds:wf})}add(e){const{store:n}=this.client,{addOne:a,updateOne:c,deleteOne:r}=this.actions,d=O({...e,author:n.getState().userReducer.currentUser.id,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[e.issue],blocks:[d.uuid]});return l.then(u=>{this.dispatch(c(u))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Comment with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Comment with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{setMany:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class cM extends M{constructor(){super(...arguments);m(this,"name","Issue");m(this,"url","/issues");m(this,"actions",{addOne:gf,addMany:ln,setOne:Pf,setMany:_f,updateOne:bf,updateMany:Rf,deleteOne:Mf,deleteMany:un,initialize:Ff});m(this,"selectors",{selectById:Ef,selectByIds:vf})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=new Date().toISOString(),u=((f=d.userReducer.currentUser)==null?void 0:f.id)??null,p=O({...e,submitted_at:l,created_by:u});this.dispatch(a(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[p.project,p.issue_type,p.status],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(w=>{throw this.dispatch(r(p.uuid)),w}),[p,y]}update(e){var y;const{updateOne:n}=this.actions,{selectById:a}=this.selectors,c=this.client.store.getState(),r=a(e.uuid)(c);if(!r)throw new Error(`Attempting to update an issue with uuid ${e.uuid} that doesn't exist in the store`);const d={...r,...e};this.dispatch(n(d));const l={};for(const f of[$.TITLE,$.DESCRIPTION,$.STATUS,$.PRIORITY,$.ASSIGNED_TO,$.DUE_DATE])if(f in e&&e[f]!==r[f])switch(f){case $.PRIORITY:l[f]=e[f];break;case $.DUE_DATE:l[f]=e[f];break;case $.DESCRIPTION:l[f]=e[f];break;case $.TITLE:l[f]=e[f];break;case $.STATUS:{const w=e[f],_=Rn(w)(c);if(!_)throw new Error(`Trying to update issue type status with ${w} which does not exist in store`);l[f]={name:_.name,color:_.color,uuid:_.uuid};break}case $.ASSIGNED_TO:{const w=e[f];if(w===null)l[f]=null;else{const _=ts(w)(c);if(!_)throw new Error(`Trying to update assigned to with ${w} which does not exist in store.`);l[f]={full_name:_.username,id:_.id}}break}}const u=O({created_by:((y=c.userReducer.currentUser)==null?void 0:y.id)??null,submitted_at:new Date().toISOString(),issue:r.uuid,changes:l});this.dispatch(kn(u));const p=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return p.then(f=>{this.dispatch(n(f))}).catch(()=>{this.dispatch(n(r)),this.dispatch(vn(u.uuid))}),[d,p]}bulkUpdate(e,n){const{store:a}=this.client,{updateMany:c}=this.actions,{selectByIds:r}=this.selectors,d=V(e).toSorted(qt);if(d.length!==e.length)throw new Error("payloads contains duplicate uuids.");const l=r(d)(a.getState()).toSorted(fs);if(d.length!=l.length)throw new Error(`Attempting to bulk update ${d.length-l.length} issues that dont exist in the store`);const u=[];for(let w=0;w<d.length;w++)u.push({...l[w],...e[w]});this.dispatch(c(u));const p=ht(e,Math.min(n??e.length,ut)),y=[];let f=null;for(const w of p){const _=ot.v4(),E=V(w),P=w.map(({status:b})=>b).filter(Boolean),k=this.enqueueRequest({description:T(h.PATCH,this.name,!0),method:h.PATCH,url:`${this.url}/bulk/`,payload:{payloads:w},blockers:(f?[f]:[]).concat(E).concat(P),blocks:[_].concat(E)});y.push(k),f=_}return Promise.all(y).then(w=>{this.dispatch(c(w.flat()))}).catch(()=>{this.dispatch(c(l))}),[u,y]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`No issue with uuid ${e} found in the store`);const u=My(e)(d),p=vy(e)(d),y=Ny(e)(d),f=aT(e)(d);this.dispatch(a(e)),this.dispatch(tn(V(y))),this.dispatch(Vn(V(f))),this.dispatch(mt(V(u))),this.dispatch(mt(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(w){throw this.dispatch(c(l)),this.dispatch(en(y)),this.dispatch(En(f)),this.dispatch(pt(u)),this.dispatch(pt(p)),w}}async bulkDelete(e){const{store:n}=this.client,{addMany:a,deleteMany:c}=this.actions,{selectByIds:r}=this.selectors,d=n.getState(),l=r(e)(d),u=ky(e)(d),p=Ey(e)(d);this.dispatch(c(e)),this.dispatch(mt(V(u))),this.dispatch(mt(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(y){throw this.dispatch(a(l)),this.dispatch(pt(u)),this.dispatch(pt(p)),y}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class rM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Attachment");m(this,"url","/issue-type-attachments");m(this,"actions",{addOne:qf,addMany:Df,setOne:jf,setMany:$f,updateOne:Cf,updateMany:Uf,deleteOne:Lf,deleteMany:Nf,initialize:Wf});m(this,"selectors",{selectById:Hf,selectByIds:Kf})}getId(e){return e.uuid}getBlockers(e){return[e.issue_type]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_type:e.issue_type}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_type:e.issue_type}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class dM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Fields Attachment");m(this,"url","/issue-type-fields-attachments");m(this,"actions",{addOne:Qf,addMany:Xf,setOne:xf,setMany:eS,updateOne:tS,updateMany:sS,deleteOne:iS,deleteMany:nS,initialize:Jf});m(this,"selectors",{selectById:cS,selectByIds:rS})}getId(e){return e.uuid}getBlockers(e){return[e.fields_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{fields_revision__issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class lM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Fields");m(this,"url","/issue-type-fields");m(this,"actions",{addOne:PS,addMany:_S,setOne:bS,setMany:RS,updateOne:MS,updateMany:kS,deleteOne:ES,deleteMany:vS,initialize:gS});m(this,"selectors",{selectById:BS,selectByIds:zS})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(f=>{throw this.dispatch(r(u.uuid)),f}),[u,p]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class uM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Field Values Attachment");m(this,"url","/issue-type-field-values-attachments");m(this,"actions",{addOne:jS,addMany:An,setOne:$S,setMany:CS,updateOne:US,updateMany:LS,deleteOne:NS,deleteMany:Tn,initialize:DS});m(this,"selectors",{selectById:HS,selectByIds:KS})}getId(e){return e.uuid}getBlockers(e){return[e.field_values]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=n.getState(),l=r(e)(d);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class oM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Field Values");m(this,"url","/issue-type-field-values");m(this,"actions",{addOne:oS,addMany:hS,setOne:pS,setMany:mS,updateOne:yS,updateMany:fS,deleteOne:SS,deleteMany:AS,initialize:uS});m(this,"selectors",{selectById:wS,selectByIds:IS})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u}),y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.issue,e.fields_revision],blocks:[p.uuid]});return this.dispatch(a(p)),y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected IssueTypeFieldValues with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[l.uuid,l.fields_revision,l.issue],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected submission with uuid ${e} to exist`);const u=YS(e)(d);this.dispatch(a(e)),this.dispatch(Tn(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(An(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class hM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Identifier");m(this,"url","/issue-type-identifiers");m(this,"actions",{addOne:XS,addMany:xS,setOne:eA,setMany:tA,updateOne:sA,updateMany:iA,deleteOne:nA,deleteMany:aA,initialize:QS});m(this,"selectors",{selectById:rA,selectByIds:dA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected issue type identifier with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected issue type identifier with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class pM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Identifier Value");m(this,"url","/issue-type-identifier-values");m(this,"actions",{addOne:hA,addMany:pA,setOne:mA,setMany:yA,updateOne:fA,updateMany:SA,deleteOne:AA,deleteMany:TA,initialize:oA});m(this,"selectors",{selectById:IA,selectByIds:OA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.issue,e.issue_type_identifier],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected issue type identifier value with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class mM extends M{constructor(){super(...arguments);m(this,"name","Issue Type");m(this,"url","/issue-types");m(this,"actions",{addOne:_A,addMany:bA,setOne:RA,setMany:MA,updateOne:kA,updateMany:EA,deleteOne:vA,deleteMany:VA,initialize:PA});m(this,"selectors",{selectById:zA,selectByIds:WA})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,submitted_at:u,created_by:l});this.dispatch(a(p));const y=this.enqueueRequest({method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`IssueType with uuid ${e.uuid} does not exist in the store.`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`IssueType with uuid ${e} does not exist in the store.`);const u=Vf(e)(d);this.dispatch(a(e)),this.dispatch(un(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(ln(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class yM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Status");m(this,"url","/issue-type-statuses");m(this,"actions",{addOne:$A,addMany:CA,setOne:UA,setMany:LA,updateOne:NA,updateMany:GA,deleteOne:HA,deleteMany:KA,initialize:jA});m(this,"selectors",{selectById:Rn,selectByIds:ZA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{setOne:n}=this.actions,{selectById:a}=this.selectors,c=this.client.store.getState(),r=a(e.uuid)(c);if(!r)throw new Error(`Expected an existing issue type status with uuid ${e.uuid}`);const d={...r,...e};this.dispatch(n(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(n(u))}).catch(()=>{this.dispatch(n(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`No issue type status with uuid ${e} found in the store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class fM extends M{constructor(){super(...arguments);m(this,"name","Issue Update");m(this,"url","/issue-updates");m(this,"actions",{addOne:kn,addMany:En,setOne:xA,setMany:eT,updateOne:tT,updateMany:sT,deleteOne:vn,deleteMany:Vn,initialize:XA});m(this,"selectors",{selectById:iT,selectByIds:nT})}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}const SM=1800;function AM(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 TM extends fR{constructor(){super(...arguments);m(this,"_getRenewedTokens",async e=>{const n=this.performRequest({method:h.POST,url:this.refreshTokensUrl,payload:{refresh:e},isAuthNeeded:!1,checkAuth:!1});let a;try{a=await n}catch(c){console.error("Could not renew tokens; clearing auth",c),this.clearAuth();return}if(!a.access)throw new Error("Missing access token");return{accessToken:a.access,refreshToken:a.refresh??this.getRefreshToken()}})}clearAuth(){console.debug(this.constructor.name,"clearing auth;"),this.dispatch(Rh(!1)),this.clearTokens(),this.dispatch(I()),this.dispatch(I())}async renewTokens(){const e=this.getRefreshToken();if(!e)throw new Error("No refresh token found");console.debug(this.constructor.name,"renewing tokens");try{const n=await this._getRenewedTokens(e);if(!n)return;console.debug("Got renewed tokens"),this.setTokens(n)}catch(n){throw console.error("Could not renew tokens; clearing auth",n),this.clearAuth(),n}}tokenIsExpiringSoon(){const e=this.getAccessToken();if(!e)return!1;const n=Date.now()/1e3;let a;try{a=bP(e).exp??n}catch{a=n}return a-n<SM}getAuthHeader(){return`Bearer ${this.getAccessToken()}`}async prepareAuth(){if(this.tokenIsExpiringSoon()){console.debug(this.constructor.name,"preparing auth");try{await this.renewTokens()}catch(e){return e instanceof C&&this.clearAuth(),e instanceof Error?Promise.reject(e):Promise.reject(new Error((e??Tt).toString()))}}}async handleUnauthorized(e,n){const a=this.client.store.getState();if(e.url.endsWith("/token/refresh/"))throw a.authReducer.isLoggedIn&&console.warn("No signed-in user to sign out."),this.clearAuth(),new C({message:"You have been signed out due to inactivity.",response:n,discard:!0});if(a.authReducer.isLoggedIn)await this.renewTokens();else throw console.debug("Forbidden; user is not logged in."),new C({message:"Incorrect username or password.",response:n,discard:!0})}async initAuth(e){const n=ot.v4();return console.debug(this.constructor.name,"Initiating auth"),this.performRequest({uuid:n,method:h.POST,url:this.initTokensUrl,payload:e,isAuthNeeded:!1,checkAuth:!1}).then(a=>{this.setTokens(AM(a))})}}class wM extends wt{constructor(){super(...arguments);m(this,"name","Organization Access");m(this,"url","/organization-accesses");m(this,"actions",{addOne:wT,addMany:IT,setOne:OT,setMany:FT,updateOne:gT,updateMany:PT,deleteOne:_T,deleteMany:bT,initialize:TT});m(this,"selectors",{selectById:MT,selectByIds:kT})}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState()),d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(u=>{throw this.dispatch(a(r)),u}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d),u=ts(l.user)(d);this.dispatch(a(l.uuid)),this.dispatch(Dn(l.user));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${l.uuid}/`,blockers:[l.uuid],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(qn(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class IM extends wt{constructor(){super(...arguments);m(this,"name","Organization");m(this,"url","/organizations");m(this,"actions",{addOne:qT,addMany:WT,setOne:zT,setMany:BT,updateOne:jT,updateMany:DT,deleteOne:$T,deleteMany:CT,initialize:VT});m(this,"selectors",{selectById:NT,selectByIds:GT})}async add(e){const{addOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:e,blockers:[],blocks:[]});return this.dispatch(n(a)),a}async update(e){const{setOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return this.dispatch(n(a)),a}async invite(e,n){return this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/${e}/invite/${n}/`,blockers:[],blocks:[]})}async refreshStore(e){const{initialize:n}=this.actions,a=await this.list({},e);return this.dispatch(n(a)),a}}class OM extends M{constructor(){super(...arguments);m(this,"name","Project Access");m(this,"url","/project-accesses");m(this,"actions",{addOne:tw,addMany:sw,setOne:iw,setMany:nw,updateOne:aw,updateMany:cw,deleteOne:rw,deleteMany:dw,initialize:ew});m(this,"selectors",{selectById:uw,selectByIds:ow})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.organization_access,d.project],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(p=>{throw this.dispatch(r(d.uuid)),p}),[d,l]}bulkAdd(e){var p;const{store:n}=this.client,{addMany:a,deleteMany:c,updateMany:r}=this.actions,d=((p=n.getState().userReducer.currentUser)==null?void 0:p.id)??null,l=e.map(y=>O({...y,created_by:d}));this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{project_accesses:l.map(y=>R(y))},blockers:l.flatMap(y=>[y.project,y.organization_access]),blocks:l.map(y=>y.uuid)});return u.then(y=>{this.dispatch(r(y))}).catch(y=>{throw this.dispatch(c(l.map(f=>f.uuid))),y}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState()),d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[]});return l.then(u=>{this.dispatch(a(u))}).catch(u=>{throw this.dispatch(a(r)),u}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project__organization:e}},n);return this.dispatch(a(c)),c}}class FM extends q{constructor(){super(...arguments);m(this,"name","Project Attachment");m(this,"url","/project-attachments");m(this,"actions",{addOne:mw,addMany:yw,setOne:fw,setMany:Sw,updateOne:Aw,updateMany:Tw,deleteOne:ww,deleteMany:Iw,initialize:pw});m(this,"selectors",{selectById:Fw,selectByIds:gw})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,project:e.project}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,project:e.project}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project__organization:e}},n);return this.dispatch(a(c)),c}}class gM extends q{constructor(){super(...arguments);m(this,"name","Project File");m(this,"url","/project-files");m(this,"actions",{addOne:kw,addMany:Ew,setOne:Rw,setMany:Mw,updateOne:vw,updateMany:Vw,deleteOne:Bw,deleteMany:zw,initialize:bw});m(this,"selectors",{selectById:Dw,selectByIds:jw})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,project:e.project,z_index:e.z_index,canvas_bounds:e.canvas_bounds,bounds:e.bounds}}buildBulkPayload(e){return{uuid:e.uuid,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,project:e.project,z_index:e.z_index,canvas_bounds:e.canvas_bounds,bounds:e.bounds}}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`${this.name} with uuid ${e.uuid} does not exist in the store`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class PM extends wt{constructor(){super(...arguments);m(this,"name","Project");m(this,"url","/projects");m(this,"actions",{addOne:Hw,addMany:Gw,setOne:Nw,setMany:Lw,updateOne:Yw,updateMany:Kw,deleteOne:Zw,deleteMany:Jw,initialize:Uw});m(this,"selectors",{selectById:xw,selectByIds:eI})}async add(e){const{addOne:n}=this.actions,a=await this.performRequest({method:h.POST,url:`${this.url}/`,payload:R(e)});return this.dispatch(n(a)),a}async update(e){const{updateOne:n}=this.actions,a=await this.performRequest({method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:R(e)});return this.dispatch(n(a)),a}async delete(e){const{deleteOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]});return this.dispatch(n(e)),a}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class _M extends M{constructor(){super(...arguments);m(this,"name","Team Membership");m(this,"url","/team-memberships");m(this,"actions",{addOne:nI,addMany:aI,setOne:cI,setMany:rI,updateOne:dI,updateMany:lI,deleteOne:uI,deleteMany:oI,initialize:iI});m(this,"selectors",{selectById:mI,selectByIds:yI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[e.team],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var p;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((p=n.getState().userReducer.currentUser)==null?void 0:p.id)??null,l=e.map(y=>O({...y,created_by:d}));this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{team_memberships:l.map(y=>R(y))},blockers:l.map(y=>y.team),blocks:l.map(y=>y.uuid)});return u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.map(y=>y.uuid)))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected team membership with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[e]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{team__organization:e}},n);return this.dispatch(a(c)),c}}class bM extends M{constructor(){super(...arguments);m(this,"name","Team");m(this,"url","/teams");m(this,"actions",{addOne:AI,addMany:TI,setOne:wI,setMany:II,updateOne:OI,updateMany:FI,deleteOne:gI,deleteMany:PI,initialize:SI});m(this,"selectors",{selectById:bI,selectByIds:RI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,submitted_at:new Date().toISOString(),created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected team with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:R(e),blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected team with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[e]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class RM extends wt{constructor(){super(...arguments);m(this,"name","User");m(this,"url","/user");m(this,"actions",{addOne:qn,addMany:oT,setOne:uT,setMany:lT,updateOne:pT,updateMany:hT,deleteOne:Dn,deleteMany:mT,initialize:dT});m(this,"selectors",{selectById:ts,selectByIds:ST})}async list(e,n){const{organizationUuid:a,...c}=e,r=a?`/organizations/${a}${this.url}s/`:`/${this.url}`;return this.performRequest({method:h.GET,url:r,...c},n)}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({organizationUuid:e},n);return this.dispatch(a(c)),c}}class MM extends M{constructor(){super(...arguments);m(this,"name","Workflow");m(this,"url","/workflows");m(this,"actions",{addOne:BI,addMany:zI,setOne:WI,setMany:qI,updateOne:DI,updateMany:jI,deleteOne:$I,deleteMany:CI,initialize:VI});m(this,"selectors",{selectById:LI,selectByIds:NI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_type,d.project],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid,d.workflow_type,d.project],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class kM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Assignee");m(this,"url","/workflow-step-assignees");m(this,"actions",{addOne:YI,addMany:ZI,setOne:JI,setMany:QI,updateOne:XI,updateMany:xI,deleteOne:eO,deleteMany:tO,initialize:KI});m(this,"selectors",{selectById:iO,selectByIds:nO})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var y;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=e.map(f=>O({...f,created_by:d,submitted_at:l}));this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{workflow_step_assignees:u.map(f=>R(f))},blockers:u.flatMap(f=>[f.workflow,f.workflow_step]),blocks:u.map(f=>f.uuid)});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(V(u)))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step assignee with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class EM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Comment");m(this,"url","/workflow-step-comments");m(this,"actions",{addOne:dO,addMany:lO,setOne:uO,setMany:oO,updateOne:hO,updateMany:pO,deleteOne:mO,deleteMany:yO,initialize:rO});m(this,"selectors",{selectById:SO,selectByIds:AO})}add(e){var u;const{store:n}=this.client,{addOne:a,updateOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Workflow step comment with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step comment with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class vM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Event");m(this,"url","/workflow-step-events");m(this,"actions",{addOne:OO,addMany:FO,setOne:gO,setMany:PO,updateOne:_O,updateMany:bO,deleteOne:RO,deleteMany:MO,initialize:IO});m(this,"selectors",{selectById:EO,selectByIds:vO})}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class VM extends q{constructor(){super(...arguments);m(this,"name","Workflow Step Fields Attachment");m(this,"url","/workflow-step-fields-attachments");m(this,"actions",{addOne:WO,addMany:na,setOne:qO,setMany:DO,updateOne:jO,updateMany:$O,deleteOne:CO,deleteMany:aa,initialize:zO});m(this,"selectors",{selectById:NO,selectByIds:GO})}getId(e){return e.uuid}getBlockers(e){return[e.fields_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var a;const{store:n}=this.client;return O({...e,created_by:((a=n.getState().userReducer.currentUser)==null?void 0:a.id)??null,submitted_at:new Date().toISOString()})}buildPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{fields_revision__workflow_step__workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class BM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Fields");m(this,"url","/workflow-step-fields");m(this,"actions",{addOne:ZO,addMany:JO,setOne:QO,setMany:XO,updateOne:xO,updateMany:eF,deleteOne:tF,deleteMany:sF,initialize:YO});m(this,"selectors",{selectById:nF,selectByIds:aF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected workflow step fields with uuid ${e} to exist`);const u=LO(e)(d);this.dispatch(a(e)),this.dispatch(aa(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(na(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{workflow_step__workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class zM extends q{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Attachment");m(this,"url","/workflow-step-field-values-attachments");m(this,"actions",{addOne:lF,addMany:la,setOne:uF,setMany:oF,updateOne:hF,updateMany:pF,deleteOne:mF,deleteMany:ua,initialize:dF});m(this,"selectors",{selectById:fF,selectByIds:SF})}getId(e){return e.uuid}getBlockers(e){return[e.field_values]}getBlocks(e){return[e.uuid]}buildModel(e){var a;const{store:n}=this.client;return O({...e,created_by:((a=n.getState().userReducer.currentUser)==null?void 0:a.id)??null,submitted_at:new Date().toISOString()})}buildPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class WM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Review Request");m(this,"url","/workflow-step-field-values-review-requests");m(this,"actions",{addOne:OF,addMany:pa,setOne:FF,setMany:gF,updateOne:PF,updateMany:_F,deleteOne:bF,deleteMany:ma,initialize:IF});m(this,"selectors",{selectById:MF,selectByIds:kF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.field_values],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step field values review request with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class qM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Review");m(this,"url","/workflow-step-field-values-reviews");m(this,"actions",{addOne:zF,addMany:fa,setOne:WF,setMany:qF,updateOne:DF,updateMany:jF,deleteOne:$F,deleteMany:Sa,initialize:BF});m(this,"selectors",{selectById:UF,selectByIds:LF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.field_values],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Workflow step field values review with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step field values review with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class DM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values");m(this,"url","/workflow-step-field-values");m(this,"actions",{addOne:YF,addMany:ZF,setOne:JF,setMany:QF,updateOne:XF,updateMany:xF,deleteOne:eg,deleteMany:tg,initialize:KF});m(this,"selectors",{selectById:ig,selectByIds:ng})}add(e){var p;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=O({...e,created_by:((p=d.userReducer.currentUser)==null?void 0:p.id)??null,submitted_at:new Date().toISOString()}),u=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(l),blockers:[e.workflow,e.workflow_step,e.fields_revision],blocks:[l.uuid]});return this.dispatch(a(l)),u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.uuid))}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected WorkflowStepFieldValues with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[l.uuid,l.workflow,l.workflow_step,l.fields_revision],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected WorkflowStepFieldValues with uuid ${e} to exist`);const u=AF(e)(d),p=NF(e)(d),y=EF(e)(d);this.dispatch(a(e)),this.dispatch(ua(V(u))),this.dispatch(Sa(V(p))),this.dispatch(ma(V(y)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(f){throw this.dispatch(c(l)),this.dispatch(la(u)),this.dispatch(fa(p)),this.dispatch(pa(y)),f}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class jM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Reviewer");m(this,"url","/workflow-step-reviewers");m(this,"actions",{addOne:dg,addMany:lg,setOne:ug,setMany:og,updateOne:hg,updateMany:pg,deleteOne:mg,deleteMany:yg,initialize:rg});m(this,"selectors",{selectById:Sg,selectByIds:Ag})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var y;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=e.map(f=>O({...f,created_by:d,submitted_at:l}));this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{workflow_step_reviewers:u.map(f=>R(f))},blockers:u.flatMap(f=>[f.workflow,f.workflow_step]),blocks:u.map(f=>f.uuid)});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.map(f=>f.uuid)))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step reviewer with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class $M extends M{constructor(){super(...arguments);m(this,"name","Workflow Step");m(this,"url","/workflow-steps");m(this,"actions",{addOne:Og,addMany:Fg,setOne:gg,setMany:Pg,updateOne:_g,updateMany:bg,deleteOne:Rg,deleteMany:Mg,initialize:Ig});m(this,"selectors",{selectById:Eg,selectByIds:vg})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_type],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow step with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid,d.workflow_type],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class CM extends M{constructor(){super(...arguments);m(this,"name","Workflow Type");m(this,"url","/workflow-types");m(this,"actions",{addOne:Wg,addMany:qg,setOne:Dg,setMany:jg,updateOne:$g,updateMany:Cg,deleteOne:Ug,deleteMany:Lg,initialize:zg});m(this,"selectors",{selectById:Gg,selectByIds:Hg})}add(e){var p;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=O({...e,created_by:((p=d.userReducer.currentUser)==null?void 0:p.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(l),blockers:[],blocks:[l.uuid]});return u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.uuid))}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow type with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow type with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}async function ba(t,s,e,n,a){const c=n instanceof ft;c&&s.checkAuth!==!1&&await n.auth.prepareAuth();const r={queryParams:"",isAuthNeeded:!0},{s3url:d,payload:l,headers:u,method:p,queryParams:y,attachmentHash:f,isExternalUrl:w,isAuthNeeded:_,isResponseBlob:E}={...r,...s};let P=s.url;const k=f?await e.files.fetchCache(f):void 0;if(f&&!k)throw new Error(`Cannot upload file ${f} because it's not cached.`);!w&&!P.startsWith("http")&&(!P.startsWith("/")&&!P.startsWith("blob:")&&(P="/"+P),P=t+P);const b=v=>{if(f){if(!d)throw new Error(`No S3 URL for file ${f}`);if("warning"in d)throw new Error(`S3 URL warning for file ${f}`);if(!k)throw new Error(`No file for file ${f}`);const L=d.fields["x-amz-checksum-sha1"];if(!L)throw new Error(`No checksum for file ${f}`);return v.set("x-amz-checksum-sha1",L).field({...l,...d.fields}).attach("file",k)}return v.send(l)},j={[h.GET]:()=>E?At.get(P.toString()).responseType("blob"):At.get(P.toString()),[h.POST]:()=>{const v=At.post(P.toString());return b(v)},[h.PATCH]:()=>{const v=At.patch(P.toString());return b(v)},[h.PUT]:()=>{const v=At.put(P.toString());return b(v)},[h.DELETE]:()=>{const v=At.delete(P.toString());return b(v)}}[p];let z=j();const D=()=>{console.debug("aborting request:",s.url),z.abort()};if(a==null||a.addEventListener("abort",D),_&&c){const v=n.auth.getAuthHeader();z=z.set("Authorization",v)}u&&(z=z.set(u));try{return await z.query(y)}catch(v){const L=dP(v),us=L==null?void 0:L.status;if(c&&us===401)return await n.auth.handleUnauthorized(z,L),z.query(y);throw new C({response:L,innerError:v,discard:Pa.includes(us)})}finally{a==null||a.removeEventListener("abort",D)}}class UM{constructor(s){m(this,"store");this.store=s}_performRequest(s,e,n,a){const c=new hs,r={...e,uuid:e.uuid??ot.v4()};return ba(s,r,this,n,a).then(d=>{c.resolve(d.body)}).catch(d=>{d instanceof Error?c.reject(d):c.reject(new Error((d??Tt).toString()))}),c}async performRequest(s,e,n,a){return this._performRequest(s,e,n,a).then(c=>{if(c instanceof C)throw c;return c})}async enqueueRequest(s,e,n){return this._enqueueRequest(s,e,n).then(a=>{if(a instanceof C)throw a;return a})}_enqueueRequest(s,e,n){const a=new hs,c={...s,BASE_URL:e,serviceName:n},r=this.store.dispatch(ZT(c)),d=u=>{if(u)a.resolve(u.body);else{const p=new C({message:"Could not get a response from the server.",response:u,discard:!0});a.reject(p)}},l=u=>{u instanceof C?u.options.discard=!0:(console.error("Received an unexpected error while processing a request:",u,`
|
|
13
|
+
external URLs and therefore not prepended with VITE_API_URL.`;throw new Error(p)}return await this.addCache(l),l}processPresignedUrl(e,n){if("warning"in n){if(n.warning==="already_uploaded")return Promise.resolve(void 0);throw console.error(n.warning),new Error(n.warning)}return this.enqueueRequest({url:n.url,description:"Upload file to S3",method:h.POST,isExternalUrl:!0,isAuthNeeded:!1,attachmentHash:e,blockers:[`s3-${n.fields.key}`],blocks:[e],s3url:n})}processPresignedUrls(e){const n={};for(const[a,c]of Object.entries(e))n[a]=this.processPresignedUrl(a,c);return n}async getFilePayload(e){const a={sha1:await Wt(e),file_type:e.type,extension:Na(e),size:e.size};return await this.client.files.addCache(e),a}}class YR extends M{constructor(){super(...arguments);m(this,"name","Form Identifier");m(this,"url","/form-identifiers");m(this,"actions",{addOne:Fp,addMany:gp,setOne:Pp,setMany:_p,updateOne:bp,updateMany:Rp,deleteOne:Mp,deleteMany:kp,initialize:Op});m(this,"selectors",{selectById:vp,selectByIds:Vp})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.form],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected form identifier with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected form identifier with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form__organization:e}},n);return this.dispatch(a(c)),c}}class ZR extends M{constructor(){super(...arguments);m(this,"name","Form Identifier Value");m(this,"url","/form-identifier-values");m(this,"actions",{addOne:qp,addMany:Dp,setOne:jp,setMany:$p,updateOne:Cp,updateMany:Up,deleteOne:Lp,deleteMany:Np,initialize:Wp});m(this,"selectors",{selectById:Hp,selectByIds:Kp})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.form_submission,e.form_identifier],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected form identifier value with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{form_submission__form_revision__form__organization:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class JR extends q{constructor(){super(...arguments);m(this,"name","Form Revision Attachment");m(this,"url","/form-revision-attachments");m(this,"actions",{addOne:Qp,addMany:Xp,setOne:xp,setMany:em,updateOne:tm,updateMany:sm,deleteOne:im,deleteMany:nm,initialize:Jp});m(this,"selectors",{selectById:cm,selectByIds:rm})}getId(e){return e.uuid}getBlockers(e){return[e.form_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,form_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form_revision__form__organization:e}},n);return this.dispatch(a(c)),c}}class QR extends M{constructor(){super(...arguments);m(this,"name","Form Revision");m(this,"url","/form-revisions");m(this,"actions",{addOne:Vi,addMany:Bi,setOne:om,setMany:hm,updateOne:pm,updateMany:mm,deleteOne:zi,deleteMany:Wi,initialize:um});m(this,"selectors",{selectById:ym,selectByIds:fm})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u});this.dispatch(a(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.form],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{form__organization:e}},n);return this.dispatch(a(c)),c}}class XR extends M{constructor(){super(...arguments);m(this,"name","Form");m(this,"url","/forms");m(this,"actions",{addOne:Im,addMany:Om,setOne:Fm,setMany:gm,updateOne:Pm,updateMany:_m,deleteOne:bm,deleteMany:Rm,initialize:wm});m(this,"selectors",{selectById:Em,selectByIds:vm})}add(e,n){var f;const{store:a}=this.client,{addOne:c,deleteOne:r}=this.actions,d=new Date().toISOString(),l=((f=a.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=O({...e,submitted_at:d,created_by:l}),p=O({...n,form:u.uuid,submitted_at:d,created_by:l});this.dispatch(c(u)),this.dispatch(Vi(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:{...R(u),initial_revision:{uuid:p.uuid,submitted_at:p.submitted_at,title:p.title,description:p.description,fields:p.fields}},blockers:[],blocks:[u.uuid,p.uuid]});return y.catch(w=>{throw this.dispatch(r(u.uuid)),this.dispatch(zi(p.uuid)),w}),[u,p,y]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error("Expected form to exist");const u=sy(e)(d),p=Sm(e)(d);this.dispatch(a(e)),this.dispatch(Yi(V(u))),this.dispatch(Wi(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(y){throw this.dispatch(c(l)),this.dispatch(Bi(p)),this.dispatch(Ki(u)),y}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class xR extends q{constructor(){super(...arguments);m(this,"name","Form Submission Attachment");m(this,"url","/form-submission-attachments");m(this,"actions",{addOne:zm,addMany:Ci,setOne:Wm,setMany:qm,updateOne:Dm,updateMany:jm,deleteOne:$m,deleteMany:Ui,initialize:Bm});m(this,"selectors",{selectById:Cm,selectByIds:Um})}getId(e){return e.uuid}getBlockers(e){return[e.form_submission]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,form_submission:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,r=n.getState(),d=Gi(e)(r);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{form_submission__form_revision__form__organization:e}},n)).flat();return this.dispatch(a(r)),r}}class eM extends M{constructor(){super(...arguments);m(this,"name","Form Submission");m(this,"url","/form-submissions");m(this,"actions",{addOne:Zm,addMany:Ki,setOne:Km,setMany:Ym,updateOne:Jm,updateMany:Qm,deleteOne:Xm,deleteMany:Yi,initialize:Hm});m(this,"selectors",{selectById:ey,selectByIds:ty})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u}),y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.form_revision],blocks:[p.uuid]});return this.dispatch(a(p)),y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected submission with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${l.uuid}/`,payload:e,blockers:[l.uuid],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected submission with uuid ${e} to exist`);const u=Lm(e)(d);this.dispatch(a(e)),this.dispatch(Ui(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(Ci(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{limit:this.pageSize,paginate:!0,form_revision__form_organization:e}},n)).flat();return this.dispatch(a(r)),r}}class tM extends q{constructor(){super(...arguments);m(this,"name","Geo Image");m(this,"url","/geo-images");m(this,"actions",{addOne:dy,addMany:ly,setOne:cy,setMany:ry,updateOne:uy,updateMany:oy,deleteOne:hy,deleteMany:py,initialize:ay});m(this,"selectors",{selectById:yy,selectByIds:fy})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,title:e.title,description:e.description,geo_marker:e.geo_marker,canvas_marker:e.canvas_marker,direction:e.direction,original_date:e.original_date,project:e.project}}buildBulkPayload(e){return{uuid:e.uuid,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,title:e.title,description:e.description,geo_marker:e.geo_marker,canvas_marker:e.canvas_marker,direction:e.direction,original_date:e.original_date,project:e.project}}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Geo image with uuid ${e.uuid} does not exist in the store`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project:e}},n);return this.dispatch(a(c)),c}}class sM extends M{constructor(){super(...arguments);m(this,"name","Issue Association");m(this,"url","/issue-associations");m(this,"actions",{addOne:gy,addMany:pt,setOne:Iy,setMany:wy,updateOne:Oy,updateMany:Fy,deleteOne:Py,deleteMany:mt,initialize:Ty});m(this,"selectors",{selectById:by,selectByIds:Ry})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=new Date().toISOString(),l=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,u=O({...e,submitted_at:d,created_by:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.associated_issue,...e.issue?[e.issue]:[],...e.asset?[e.asset]:[]],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Issue association with uuid ${e} not found in store.`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{associated_issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class iM extends q{constructor(){super(...arguments);m(this,"name","Issue Attachment");m(this,"url","/issue-attachments");m(this,"actions",{addOne:qy,addMany:en,setOne:Dy,setMany:jy,updateOne:$y,updateMany:Cy,deleteOne:Uy,deleteMany:tn,initialize:Wy});m(this,"selectors",{selectById:Gy,selectByIds:Hy})}getId(e){return e.uuid}getBlockers(e){return[e.issue]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue:e.issue}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue:e.issue}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class nM extends q{constructor(){super(...arguments);m(this,"name","Issue Comment Attachment");m(this,"url","/issue-comment-attachments");m(this,"actions",{addOne:Jy,addMany:Qy,setOne:Xy,setMany:xy,updateOne:ef,updateMany:tf,deleteOne:sf,deleteMany:nf,initialize:Zy});m(this,"selectors",{selectById:cf,selectByIds:rf})}getId(e){return e.uuid}getBlockers(e){return[e.issue_comment]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_comment:e.issue_comment}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_comment:e.issue_comment}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue_comment__issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class aM extends M{constructor(){super(...arguments);m(this,"name","Issue Comment");m(this,"url","/issue-comments");m(this,"actions",{addOne:of,addMany:hf,setOne:pf,setMany:mf,updateOne:yf,updateMany:ff,deleteOne:Sf,deleteMany:Af,initialize:uf});m(this,"selectors",{selectById:Tf,selectByIds:wf})}add(e){const{store:n}=this.client,{addOne:a,updateOne:c,deleteOne:r}=this.actions,d=O({...e,author:n.getState().userReducer.currentUser.id,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[e.issue],blocks:[d.uuid]});return l.then(u=>{this.dispatch(c(u))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Comment with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Comment with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{setMany:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}class cM extends M{constructor(){super(...arguments);m(this,"name","Issue");m(this,"url","/issues");m(this,"actions",{addOne:gf,addMany:ln,setOne:Pf,setMany:_f,updateOne:bf,updateMany:Rf,deleteOne:Mf,deleteMany:un,initialize:Ff});m(this,"selectors",{selectById:Ef,selectByIds:vf})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=new Date().toISOString(),u=((f=d.userReducer.currentUser)==null?void 0:f.id)??null,p=O({...e,submitted_at:l,created_by:u});this.dispatch(a(p));const y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[p.project,p.issue_type,p.status],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(w=>{throw this.dispatch(r(p.uuid)),w}),[p,y]}update(e){var y;const{updateOne:n}=this.actions,{selectById:a}=this.selectors,c=this.client.store.getState(),r=a(e.uuid)(c);if(!r)throw new Error(`Attempting to update an issue with uuid ${e.uuid} that doesn't exist in the store`);const d={...r,...e};this.dispatch(n(d));const l={};for(const f of[$.TITLE,$.DESCRIPTION,$.STATUS,$.PRIORITY,$.ASSIGNED_TO,$.DUE_DATE])if(f in e&&e[f]!==r[f])switch(f){case $.PRIORITY:l[f]=e[f];break;case $.DUE_DATE:l[f]=e[f];break;case $.DESCRIPTION:l[f]=e[f];break;case $.TITLE:l[f]=e[f];break;case $.STATUS:{const w=e[f],_=Rn(w)(c);if(!_)throw new Error(`Trying to update issue type status with ${w} which does not exist in store`);l[f]={name:_.name,color:_.color,uuid:_.uuid};break}case $.ASSIGNED_TO:{const w=e[f];if(w===null)l[f]=null;else{const _=ts(w)(c);if(!_)throw new Error(`Trying to update assigned to with ${w} which does not exist in store.`);l[f]={full_name:_.username,id:_.id}}break}}const u=O({created_by:((y=c.userReducer.currentUser)==null?void 0:y.id)??null,submitted_at:new Date().toISOString(),issue:r.uuid,changes:l});this.dispatch(kn(u));const p=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return p.then(f=>{this.dispatch(n(f))}).catch(()=>{this.dispatch(n(r)),this.dispatch(vn(u.uuid))}),[d,p]}bulkUpdate(e,n){const{store:a}=this.client,{updateMany:c}=this.actions,{selectByIds:r}=this.selectors,d=V(e).toSorted(qt);if(d.length!==e.length)throw new Error("payloads contains duplicate uuids.");const l=r(d)(a.getState()).toSorted(fs);if(d.length!=l.length)throw new Error(`Attempting to bulk update ${d.length-l.length} issues that dont exist in the store`);const u=[];for(let w=0;w<d.length;w++)u.push({...l[w],...e[w]});this.dispatch(c(u));const p=ht(e,Math.min(n??e.length,ut)),y=[];let f=null;for(const w of p){const _=ot.v4(),E=V(w),P=w.map(({status:b})=>b).filter(Boolean),k=this.enqueueRequest({description:T(h.PATCH,this.name,!0),method:h.PATCH,url:`${this.url}/bulk/`,payload:{payloads:w},blockers:(f?[f]:[]).concat(E).concat(P),blocks:[_].concat(E)});y.push(k),f=_}return Promise.all(y).then(w=>{this.dispatch(c(w.flat()))}).catch(()=>{this.dispatch(c(l))}),[u,y]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`No issue with uuid ${e} found in the store`);const u=My(e)(d),p=vy(e)(d),y=Ny(e)(d),f=aT(e)(d);this.dispatch(a(e)),this.dispatch(tn(V(y))),this.dispatch(Vn(V(f))),this.dispatch(mt(V(u))),this.dispatch(mt(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(w){throw this.dispatch(c(l)),this.dispatch(en(y)),this.dispatch(En(f)),this.dispatch(pt(u)),this.dispatch(pt(p)),w}}async bulkDelete(e){const{store:n}=this.client,{addMany:a,deleteMany:c}=this.actions,{selectByIds:r}=this.selectors,d=n.getState(),l=r(e)(d),u=ky(e)(d),p=Ey(e)(d);this.dispatch(c(e)),this.dispatch(mt(V(u))),this.dispatch(mt(V(p)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(y){throw this.dispatch(a(l)),this.dispatch(pt(u)),this.dispatch(pt(p)),y}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class rM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Attachment");m(this,"url","/issue-type-attachments");m(this,"actions",{addOne:qf,addMany:Df,setOne:jf,setMany:$f,updateOne:Cf,updateMany:Uf,deleteOne:Lf,deleteMany:Nf,initialize:Wf});m(this,"selectors",{selectById:Hf,selectByIds:Kf})}getId(e){return e.uuid}getBlockers(e){return[e.issue_type]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_type:e.issue_type}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,issue_type:e.issue_type}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class dM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Fields Attachment");m(this,"url","/issue-type-fields-attachments");m(this,"actions",{addOne:Qf,addMany:Xf,setOne:xf,setMany:eS,updateOne:tS,updateMany:sS,deleteOne:iS,deleteMany:nS,initialize:Jf});m(this,"selectors",{selectById:cS,selectByIds:rS})}getId(e){return e.uuid}getBlockers(e){return[e.fields_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{fields_revision__issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class lM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Fields");m(this,"url","/issue-type-fields");m(this,"actions",{addOne:PS,addMany:_S,setOne:bS,setMany:RS,updateOne:MS,updateMany:kS,deleteOne:ES,deleteMany:vS,initialize:gS});m(this,"selectors",{selectById:BS,selectByIds:zS})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(f=>{throw this.dispatch(r(u.uuid)),f}),[u,p]}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class uM extends q{constructor(){super(...arguments);m(this,"name","Issue Type Field Values Attachment");m(this,"url","/issue-type-field-values-attachments");m(this,"actions",{addOne:jS,addMany:An,setOne:$S,setMany:CS,updateOne:US,updateMany:LS,deleteOne:NS,deleteMany:Tn,initialize:DS});m(this,"selectors",{selectById:HS,selectByIds:KS})}getId(e){return e.uuid}getBlockers(e){return[e.field_values]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=n.getState(),l=r(e)(d);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class oM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Field Values");m(this,"url","/issue-type-field-values");m(this,"actions",{addOne:oS,addMany:hS,setOne:pS,setMany:mS,updateOne:yS,updateMany:fS,deleteOne:SS,deleteMany:AS,initialize:uS});m(this,"selectors",{selectById:wS,selectByIds:IS})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,created_by:l,submitted_at:u}),y=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[e.issue,e.fields_revision],blocks:[p.uuid]});return this.dispatch(a(p)),y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected IssueTypeFieldValues with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[l.uuid,l.fields_revision,l.issue],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected submission with uuid ${e} to exist`);const u=YS(e)(d);this.dispatch(a(e)),this.dispatch(Tn(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(An(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class hM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Identifier");m(this,"url","/issue-type-identifiers");m(this,"actions",{addOne:XS,addMany:xS,setOne:eA,setMany:tA,updateOne:sA,updateMany:iA,deleteOne:nA,deleteMany:aA,initialize:QS});m(this,"selectors",{selectById:rA,selectByIds:dA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[u.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected issue type identifier with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected issue type identifier with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class pM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Identifier Value");m(this,"url","/issue-type-identifier-values");m(this,"actions",{addOne:hA,addMany:pA,setOne:mA,setMany:yA,updateOne:fA,updateMany:SA,deleteOne:AA,deleteMany:TA,initialize:oA});m(this,"selectors",{selectById:IA,selectByIds:OA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.issue,e.issue_type_identifier],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected issue type identifier value with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class mM extends M{constructor(){super(...arguments);m(this,"name","Issue Type");m(this,"url","/issue-types");m(this,"actions",{addOne:_A,addMany:bA,setOne:RA,setMany:MA,updateOne:kA,updateMany:EA,deleteOne:vA,deleteMany:VA,initialize:PA});m(this,"selectors",{selectById:zA,selectByIds:WA})}add(e){var f;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,l=((f=n.getState().userReducer.currentUser)==null?void 0:f.id)??null,u=new Date().toISOString(),p=O({...e,submitted_at:u,created_by:l});this.dispatch(a(p));const y=this.enqueueRequest({method:h.POST,url:`${this.url}/`,payload:R(p),blockers:[],blocks:[p.uuid]});return y.then(w=>{this.dispatch(c(w))}).catch(()=>{this.dispatch(r(p.uuid))}),[p,y]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`IssueType with uuid ${e.uuid} does not exist in the store.`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`IssueType with uuid ${e} does not exist in the store.`);const u=Vf(e)(d);this.dispatch(a(e)),this.dispatch(un(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(ln(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class yM extends M{constructor(){super(...arguments);m(this,"name","Issue Type Status");m(this,"url","/issue-type-statuses");m(this,"actions",{addOne:$A,addMany:CA,setOne:UA,setMany:LA,updateOne:NA,updateMany:GA,deleteOne:HA,deleteMany:KA,initialize:jA});m(this,"selectors",{selectById:Rn,selectByIds:ZA})}add(e){var y;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=O({...e,created_by:d,submitted_at:l});this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(u),blockers:[e.issue_type],blocks:[u.uuid]});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.uuid))}),[u,p]}update(e){const{setOne:n}=this.actions,{selectById:a}=this.selectors,c=this.client.store.getState(),r=a(e.uuid)(c);if(!r)throw new Error(`Expected an existing issue type status with uuid ${e.uuid}`);const d={...r,...e};this.dispatch(n(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(n(u))}).catch(()=>{this.dispatch(n(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`No issue type status with uuid ${e} found in the store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{issue_type__organization:e}},n);return this.dispatch(a(c)),c}}class fM extends M{constructor(){super(...arguments);m(this,"name","Issue Update");m(this,"url","/issue-updates");m(this,"actions",{addOne:kn,addMany:En,setOne:xA,setMany:eT,updateOne:tT,updateMany:sT,deleteOne:vn,deleteMany:Vn,initialize:XA});m(this,"selectors",{selectById:iT,selectByIds:nT})}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{issue__project:e}},n)).flat();return this.dispatch(a(r)),r}}const SM=1800;function AM(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 TM extends fR{constructor(){super(...arguments);m(this,"_getRenewedTokens",async e=>{const n=this.performRequest({method:h.POST,url:this.refreshTokensUrl,payload:{refresh:e},isAuthNeeded:!1,checkAuth:!1});let a;try{a=await n}catch(c){console.error("Could not renew tokens; clearing auth",c),this.clearAuth();return}if(!a.access)throw new Error("Missing access token");return{accessToken:a.access,refreshToken:a.refresh??this.getRefreshToken()}})}clearAuth(){console.debug(this.constructor.name,"clearing auth;"),this.dispatch(Rh(!1)),this.clearTokens(),this.dispatch(I()),this.dispatch(I())}async renewTokens(){const e=this.getRefreshToken();if(!e)throw new Error("No refresh token found");console.debug(this.constructor.name,"renewing tokens");try{const n=await this._getRenewedTokens(e);if(!n)return;console.debug("Got renewed tokens"),this.setTokens(n)}catch(n){throw console.error("Could not renew tokens; clearing auth",n),this.clearAuth(),n}}tokenIsExpiringSoon(){const e=this.getAccessToken();if(!e)return!1;const n=Date.now()/1e3;let a;try{a=bP(e).exp??n}catch{a=n}return a-n<SM}getAuthHeader(){return`Bearer ${this.getAccessToken()}`}async prepareAuth(){if(this.tokenIsExpiringSoon()){console.debug(this.constructor.name,"preparing auth");try{await this.renewTokens()}catch(e){return e instanceof C&&this.clearAuth(),e instanceof Error?Promise.reject(e):Promise.reject(new Error((e??Tt).toString()))}}}async handleUnauthorized(e,n){const a=this.client.store.getState();if(e.url.endsWith("/token/refresh/"))throw a.authReducer.isLoggedIn&&console.warn("No signed-in user to sign out."),this.clearAuth(),new C({message:"You have been signed out due to inactivity.",response:n,discard:!0});if(a.authReducer.isLoggedIn)await this.renewTokens();else throw console.debug("Forbidden; user is not logged in."),new C({message:"Incorrect username or password.",response:n,discard:!0})}async initAuth(e){const n=ot.v4();return console.debug(this.constructor.name,"Initiating auth"),this.performRequest({uuid:n,method:h.POST,url:this.initTokensUrl,payload:e,isAuthNeeded:!1,checkAuth:!1}).then(a=>{this.setTokens(AM(a))})}}class wM extends wt{constructor(){super(...arguments);m(this,"name","Organization Access");m(this,"url","/organization-accesses");m(this,"actions",{addOne:wT,addMany:IT,setOne:OT,setMany:FT,updateOne:gT,updateMany:PT,deleteOne:_T,deleteMany:bT,initialize:TT});m(this,"selectors",{selectById:MT,selectByIds:kT})}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState()),d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(u=>{throw this.dispatch(a(r)),u}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d),u=ts(l.user)(d);this.dispatch(a(l.uuid)),this.dispatch(Dn(l.user));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${l.uuid}/`,blockers:[l.uuid],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(qn(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class IM extends wt{constructor(){super(...arguments);m(this,"name","Organization");m(this,"url","/organizations");m(this,"actions",{addOne:qT,addMany:WT,setOne:zT,setMany:BT,updateOne:jT,updateMany:DT,deleteOne:$T,deleteMany:CT,initialize:VT});m(this,"selectors",{selectById:NT,selectByIds:GT})}async add(e){const{addOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:e,blockers:[],blocks:[]});return this.dispatch(n(a)),a}async update(e){const{setOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return this.dispatch(n(a)),a}async invite(e,n){return this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/${e}/invite/${n}/`,blockers:[],blocks:[]})}async refreshStore(e){const{initialize:n}=this.actions,a=await this.list({},e);return this.dispatch(n(a)),a}}class OM extends M{constructor(){super(...arguments);m(this,"name","Project Access");m(this,"url","/project-accesses");m(this,"actions",{addOne:tw,addMany:sw,setOne:iw,setMany:nw,updateOne:aw,updateMany:cw,deleteOne:rw,deleteMany:dw,initialize:ew});m(this,"selectors",{selectById:uw,selectByIds:ow})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.organization_access,d.project],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(p=>{throw this.dispatch(r(d.uuid)),p}),[d,l]}bulkAdd(e){var p;const{store:n}=this.client,{addMany:a,deleteMany:c,updateMany:r}=this.actions,d=((p=n.getState().userReducer.currentUser)==null?void 0:p.id)??null,l=e.map(y=>O({...y,created_by:d}));this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{project_accesses:l.map(y=>R(y))},blockers:l.flatMap(y=>[y.project,y.organization_access]),blocks:l.map(y=>y.uuid)});return u.then(y=>{this.dispatch(r(y))}).catch(y=>{throw this.dispatch(c(l.map(f=>f.uuid))),y}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState()),d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[]});return l.then(u=>{this.dispatch(a(u))}).catch(u=>{throw this.dispatch(a(r)),u}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project__organization:e}},n);return this.dispatch(a(c)),c}}class FM extends q{constructor(){super(...arguments);m(this,"name","Project Attachment");m(this,"url","/project-attachments");m(this,"actions",{addOne:mw,addMany:yw,setOne:fw,setMany:Sw,updateOne:Aw,updateMany:Tw,deleteOne:ww,deleteMany:Iw,initialize:pw});m(this,"selectors",{selectById:Fw,selectByIds:gw})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,project:e.project}}buildBulkPayload(e){return{uuid:e.uuid,file_name:e.file_name,file_sha1:e.file_sha1,file_extension:e.file_extension,project:e.project}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{project__organization:e}},n);return this.dispatch(a(c)),c}}class gM extends q{constructor(){super(...arguments);m(this,"name","Project File");m(this,"url","/project-files");m(this,"actions",{addOne:kw,addMany:Ew,setOne:Rw,setMany:Mw,updateOne:vw,updateMany:Vw,deleteOne:Bw,deleteMany:zw,initialize:bw});m(this,"selectors",{selectById:Dw,selectByIds:jw})}getId(e){return e.uuid}getBlockers(e){return[e.project]}getBlocks(e){return[e.uuid]}buildModel(e){var r;const{store:n}=this.client,a=((r=n.getState().userReducer.currentUser)==null?void 0:r.id)??null,c=new Date().toISOString();return O({...e,created_by:a,submitted_at:c})}buildPayload(e){return{uuid:e.uuid,submitted_at:e.submitted_at,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,project:e.project,z_index:e.z_index,canvas_bounds:e.canvas_bounds,bounds:e.bounds}}buildBulkPayload(e){return{uuid:e.uuid,file_sha1:e.file_sha1,file_name:e.file_name,file_extension:e.file_extension,project:e.project,z_index:e.z_index,canvas_bounds:e.canvas_bounds,bounds:e.bounds}}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`${this.name} with uuid ${e.uuid} does not exist in the store`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blocks:[e.uuid],blockers:[e.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class PM extends wt{constructor(){super(...arguments);m(this,"name","Project");m(this,"url","/projects");m(this,"actions",{addOne:Hw,addMany:Gw,setOne:Nw,setMany:Lw,updateOne:Yw,updateMany:Kw,deleteOne:Zw,deleteMany:Jw,initialize:Uw});m(this,"selectors",{selectById:xw,selectByIds:eI})}async add(e){const{addOne:n}=this.actions,a=await this.performRequest({method:h.POST,url:`${this.url}/`,payload:R(e)});return this.dispatch(n(a)),a}async update(e){const{updateOne:n}=this.actions,a=await this.performRequest({method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:R(e)});return this.dispatch(n(a)),a}async delete(e){const{deleteOne:n}=this.actions,a=await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]});return this.dispatch(n(e)),a}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class _M extends M{constructor(){super(...arguments);m(this,"name","Team Membership");m(this,"url","/team-memberships");m(this,"actions",{addOne:nI,addMany:aI,setOne:cI,setMany:rI,updateOne:dI,updateMany:lI,deleteOne:uI,deleteMany:oI,initialize:iI});m(this,"selectors",{selectById:mI,selectByIds:yI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[e.team],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var p;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((p=n.getState().userReducer.currentUser)==null?void 0:p.id)??null,l=e.map(y=>O({...y,created_by:d}));this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{team_memberships:l.map(y=>R(y))},blockers:l.map(y=>y.team),blocks:l.map(y=>y.uuid)});return u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.map(y=>y.uuid)))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected team membership with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[e]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{team__organization:e}},n);return this.dispatch(a(c)),c}}class bM extends M{constructor(){super(...arguments);m(this,"name","Team");m(this,"url","/teams");m(this,"actions",{addOne:AI,addMany:TI,setOne:wI,setMany:II,updateOne:OI,updateMany:FI,deleteOne:gI,deleteMany:PI,initialize:SI});m(this,"selectors",{selectById:bI,selectByIds:RI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,submitted_at:new Date().toISOString(),created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected team with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:R(e),blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,setOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected team with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[e]})}catch(u){throw this.dispatch(c(l)),u}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}class RM extends wt{constructor(){super(...arguments);m(this,"name","User");m(this,"url","/user");m(this,"actions",{addOne:qn,addMany:oT,setOne:uT,setMany:lT,updateOne:pT,updateMany:hT,deleteOne:Dn,deleteMany:mT,initialize:dT});m(this,"selectors",{selectById:ts,selectByIds:ST})}async list(e,n){const{organizationUuid:a,...c}=e,r=a?`/organizations/${a}${this.url}s/`:`/${this.url}`;return this.performRequest({method:h.GET,url:r,...c},n)}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({organizationUuid:e},n);return this.dispatch(a(c)),c}}class MM extends M{constructor(){super(...arguments);m(this,"name","Workflow");m(this,"url","/workflows");m(this,"actions",{addOne:BI,addMany:zI,setOne:WI,setMany:qI,updateOne:DI,updateMany:jI,deleteOne:$I,deleteMany:CI,initialize:VI});m(this,"selectors",{selectById:LI,selectByIds:NI})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_type,d.project],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid,d.workflow_type,d.project],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{project:e}},n)).flat();return this.dispatch(a(r)),r}}class kM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Assignee");m(this,"url","/workflow-step-assignees");m(this,"actions",{addOne:YI,addMany:ZI,setOne:JI,setMany:QI,updateOne:XI,updateMany:xI,deleteOne:eO,deleteMany:tO,initialize:KI});m(this,"selectors",{selectById:iO,selectByIds:nO})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var y;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=e.map(f=>O({...f,created_by:d,submitted_at:l}));this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{workflow_step_assignees:u.map(f=>R(f)),submitted_at:l},blockers:u.flatMap(f=>[f.workflow,f.workflow_step]),blocks:u.map(f=>f.uuid)});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(V(u)))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step assignee with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class EM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Comment");m(this,"url","/workflow-step-comments");m(this,"actions",{addOne:dO,addMany:lO,setOne:uO,setMany:oO,updateOne:hO,updateMany:pO,deleteOne:mO,deleteMany:yO,initialize:rO});m(this,"selectors",{selectById:SO,selectByIds:AO})}add(e){var u;const{store:n}=this.client,{addOne:a,updateOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{updateOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Workflow step comment with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step comment with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class vM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Event");m(this,"url","/workflow-step-events");m(this,"actions",{addOne:OO,addMany:FO,setOne:gO,setMany:PO,updateOne:_O,updateMany:bO,deleteOne:RO,deleteMany:MO,initialize:IO});m(this,"selectors",{selectById:EO,selectByIds:vO})}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class VM extends q{constructor(){super(...arguments);m(this,"name","Workflow Step Fields Attachment");m(this,"url","/workflow-step-fields-attachments");m(this,"actions",{addOne:WO,addMany:na,setOne:qO,setMany:DO,updateOne:jO,updateMany:$O,deleteOne:CO,deleteMany:aa,initialize:zO});m(this,"selectors",{selectById:NO,selectByIds:GO})}getId(e){return e.uuid}getBlockers(e){return[e.fields_revision]}getBlocks(e){return[e.uuid]}buildModel(e){var a;const{store:n}=this.client;return O({...e,created_by:((a=n.getState().userReducer.currentUser)==null?void 0:a.id)??null,submitted_at:new Date().toISOString()})}buildPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,fields_revision:c,file_sha1:r,file_name:d,file_extension:l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{fields_revision__workflow_step__workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class BM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Fields");m(this,"url","/workflow-step-fields");m(this,"actions",{addOne:ZO,addMany:JO,setOne:QO,setMany:XO,updateOne:xO,updateMany:eF,deleteOne:tF,deleteMany:sF,initialize:YO});m(this,"selectors",{selectById:nF,selectByIds:aF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected workflow step fields with uuid ${e} to exist`);const u=LO(e)(d);this.dispatch(a(e)),this.dispatch(aa(V(u)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(p){throw this.dispatch(c(l)),this.dispatch(na(u)),p}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{workflow_step__workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class zM extends q{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Attachment");m(this,"url","/workflow-step-field-values-attachments");m(this,"actions",{addOne:lF,addMany:la,setOne:uF,setMany:oF,updateOne:hF,updateMany:pF,deleteOne:mF,deleteMany:ua,initialize:dF});m(this,"selectors",{selectById:fF,selectByIds:SF})}getId(e){return e.uuid}getBlockers(e){return[e.field_values]}getBlocks(e){return[e.uuid]}buildModel(e){var a;const{store:n}=this.client;return O({...e,created_by:((a=n.getState().userReducer.currentUser)==null?void 0:a.id)??null,submitted_at:new Date().toISOString()})}buildPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,submitted_at:e.submitted_at,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}buildBulkPayload(e){const{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}=e;return{uuid:n,field_identifier:a,field_values:c,file_sha1:r,file_name:d,file_extension:l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e,latest:!0}},n)).flat();return this.dispatch(a(r)),r}}class WM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Review Request");m(this,"url","/workflow-step-field-values-review-requests");m(this,"actions",{addOne:OF,addMany:pa,setOne:FF,setMany:gF,updateOne:PF,updateMany:_F,deleteOne:bF,deleteMany:ma,initialize:IF});m(this,"selectors",{selectById:MF,selectByIds:kF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.field_values],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step field values review request with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class qM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values Review");m(this,"url","/workflow-step-field-values-reviews");m(this,"actions",{addOne:zF,addMany:fa,setOne:WF,setMany:qF,updateOne:DF,updateMany:jF,deleteOne:$F,deleteMany:Sa,initialize:BF});m(this,"selectors",{selectById:UF,selectByIds:LF})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.field_values],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Workflow step field values review with uuid ${e.uuid} not found in store`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[e.uuid],blocks:[e.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Workflow step field values review with uuid ${e} not found in store`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{field_values__workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class DM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Field Values");m(this,"url","/workflow-step-field-values");m(this,"actions",{addOne:YF,addMany:ZF,setOne:JF,setMany:QF,updateOne:XF,updateMany:xF,deleteOne:eg,deleteMany:tg,initialize:KF});m(this,"selectors",{selectById:ig,selectByIds:ng})}add(e){var p;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=O({...e,created_by:((p=d.userReducer.currentUser)==null?void 0:p.id)??null,submitted_at:new Date().toISOString()}),u=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(l),blockers:[e.workflow,e.workflow_step,e.fields_revision],blocks:[l.uuid]});return this.dispatch(a(l)),u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.uuid))}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=n.getState(),d=c(e.uuid)(r);if(!d)throw new Error(`Expected WorkflowStepFieldValues with uuid ${e.uuid} to exist`);const l={...d,...e};this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[l.uuid,l.workflow,l.workflow_step,l.fields_revision],blocks:[l.uuid]});return u.then(p=>{this.dispatch(a(p))}).catch(()=>{this.dispatch(a(d))}),[l,u]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=n.getState(),l=r(e)(d);if(!l)throw new Error(`Expected WorkflowStepFieldValues with uuid ${e} to exist`);const u=AF(e)(d),p=NF(e)(d),y=EF(e)(d);this.dispatch(a(e)),this.dispatch(ua(V(u))),this.dispatch(Sa(V(p))),this.dispatch(ma(V(y)));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(f){throw this.dispatch(c(l)),this.dispatch(la(u)),this.dispatch(fa(p)),this.dispatch(pa(y)),f}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class jM extends M{constructor(){super(...arguments);m(this,"name","Workflow Step Reviewer");m(this,"url","/workflow-step-reviewers");m(this,"actions",{addOne:dg,addMany:lg,setOne:ug,setMany:og,updateOne:hg,updateMany:pg,deleteOne:mg,deleteMany:yg,initialize:rg});m(this,"selectors",{selectById:Sg,selectByIds:Ag})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow,d.workflow_step],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}bulkAdd(e){var y;const{store:n}=this.client,{addMany:a,setMany:c,deleteMany:r}=this.actions,d=((y=n.getState().userReducer.currentUser)==null?void 0:y.id)??null,l=new Date().toISOString(),u=e.map(f=>O({...f,created_by:d,submitted_at:l}));this.dispatch(a(u));const p=this.enqueueRequest({description:T(h.POST,this.name,!0),method:h.POST,url:`${this.url}/bulk/`,payload:{workflow_step_reviewers:u.map(f=>R(f)),submitted_at:l},blockers:u.flatMap(f=>[f.workflow,f.workflow_step]),blocks:u.map(f=>f.uuid)});return p.then(f=>{this.dispatch(c(f))}).catch(()=>{this.dispatch(r(u.map(f=>f.uuid)))}),[u,p]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step reviewer with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async bulkDelete(e){const{store:n}=this.client,{deleteMany:a,addMany:c}=this.actions,{selectByIds:r}=this.selectors,d=r(e)(n.getState());this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!0),method:h.DELETE,url:`${this.url}/bulk/`,payload:{uuids:e},blockers:e,blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,r=(await this.listPaginated({queryParams:{workflow__project:e}},n)).flat();return this.dispatch(a(r)),r}}class $M extends M{constructor(){super(...arguments);m(this,"name","Workflow Step");m(this,"url","/workflow-steps");m(this,"actions",{addOne:Og,addMany:Fg,setOne:gg,setMany:Pg,updateOne:_g,updateMany:bg,deleteOne:Rg,deleteMany:Mg,initialize:Ig});m(this,"selectors",{selectById:Eg,selectByIds:vg})}add(e){var u;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=O({...e,created_by:((u=n.getState().userReducer.currentUser)==null?void 0:u.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(d),blockers:[d.workflow_type],blocks:[d.uuid]});return l.then(p=>{this.dispatch(c(p))}).catch(()=>{this.dispatch(r(d.uuid))}),[d,l]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow step with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid,d.workflow_type],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow step with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{workflow_type__organization:e}},n);return this.dispatch(a(c)),c}}class CM extends M{constructor(){super(...arguments);m(this,"name","Workflow Type");m(this,"url","/workflow-types");m(this,"actions",{addOne:Wg,addMany:qg,setOne:Dg,setMany:jg,updateOne:$g,updateMany:Cg,deleteOne:Ug,deleteMany:Lg,initialize:zg});m(this,"selectors",{selectById:Gg,selectByIds:Hg})}add(e){var p;const{store:n}=this.client,{addOne:a,setOne:c,deleteOne:r}=this.actions,d=n.getState(),l=O({...e,created_by:((p=d.userReducer.currentUser)==null?void 0:p.id)??null,submitted_at:new Date().toISOString()});this.dispatch(a(l));const u=this.enqueueRequest({description:T(h.POST,this.name,!1),method:h.POST,url:`${this.url}/`,payload:R(l),blockers:[],blocks:[l.uuid]});return u.then(y=>{this.dispatch(c(y))}).catch(()=>{this.dispatch(r(l.uuid))}),[l,u]}update(e){const{store:n}=this.client,{setOne:a}=this.actions,{selectById:c}=this.selectors,r=c(e.uuid)(n.getState());if(!r)throw new Error(`Expected workflow type with uuid ${e.uuid} to exist`);const d={...r,...e};this.dispatch(a(d));const l=this.enqueueRequest({description:T(h.PATCH,this.name,!1),method:h.PATCH,url:`${this.url}/${e.uuid}/`,payload:e,blockers:[r.uuid],blocks:[r.uuid]});return l.then(u=>{this.dispatch(a(u))}).catch(()=>{this.dispatch(a(r))}),[d,l]}async delete(e){const{store:n}=this.client,{deleteOne:a,addOne:c}=this.actions,{selectById:r}=this.selectors,d=r(e)(n.getState());if(!d)throw new Error(`Expected workflow type with uuid ${e} to exist`);this.dispatch(a(e));try{return await this.enqueueRequest({description:T(h.DELETE,this.name,!1),method:h.DELETE,url:`${this.url}/${e}/`,blockers:[e],blocks:[]})}catch(l){throw this.dispatch(c(d)),l}}async refreshStore(e,n){const{initialize:a}=this.actions,c=await this.list({queryParams:{organization:e}},n);return this.dispatch(a(c)),c}}async function ba(t,s,e,n,a){const c=n instanceof ft;c&&s.checkAuth!==!1&&await n.auth.prepareAuth();const r={queryParams:"",isAuthNeeded:!0},{s3url:d,payload:l,headers:u,method:p,queryParams:y,attachmentHash:f,isExternalUrl:w,isAuthNeeded:_,isResponseBlob:E}={...r,...s};let P=s.url;const k=f?await e.files.fetchCache(f):void 0;if(f&&!k)throw new Error(`Cannot upload file ${f} because it's not cached.`);!w&&!P.startsWith("http")&&(!P.startsWith("/")&&!P.startsWith("blob:")&&(P="/"+P),P=t+P);const b=v=>{if(f){if(!d)throw new Error(`No S3 URL for file ${f}`);if("warning"in d)throw new Error(`S3 URL warning for file ${f}`);if(!k)throw new Error(`No file for file ${f}`);const L=d.fields["x-amz-checksum-sha1"];if(!L)throw new Error(`No checksum for file ${f}`);return v.set("x-amz-checksum-sha1",L).field({...l,...d.fields}).attach("file",k)}return v.send(l)},j={[h.GET]:()=>E?At.get(P.toString()).responseType("blob"):At.get(P.toString()),[h.POST]:()=>{const v=At.post(P.toString());return b(v)},[h.PATCH]:()=>{const v=At.patch(P.toString());return b(v)},[h.PUT]:()=>{const v=At.put(P.toString());return b(v)},[h.DELETE]:()=>{const v=At.delete(P.toString());return b(v)}}[p];let z=j();const D=()=>{console.debug("aborting request:",s.url),z.abort()};if(a==null||a.addEventListener("abort",D),_&&c){const v=n.auth.getAuthHeader();z=z.set("Authorization",v)}u&&(z=z.set(u));try{return await z.query(y)}catch(v){const L=dP(v),us=L==null?void 0:L.status;if(c&&us===401)return await n.auth.handleUnauthorized(z,L),z.query(y);throw new C({response:L,innerError:v,discard:Pa.includes(us)})}finally{a==null||a.removeEventListener("abort",D)}}class UM{constructor(s){m(this,"store");this.store=s}_performRequest(s,e,n,a){const c=new hs,r={...e,uuid:e.uuid??ot.v4()};return ba(s,r,this,n,a).then(d=>{c.resolve(d.body)}).catch(d=>{d instanceof Error?c.reject(d):c.reject(new Error((d??Tt).toString()))}),c}async performRequest(s,e,n,a){return this._performRequest(s,e,n,a).then(c=>{if(c instanceof C)throw c;return c})}async enqueueRequest(s,e,n){return this._enqueueRequest(s,e,n).then(a=>{if(a instanceof C)throw a;return a})}_enqueueRequest(s,e,n){const a=new hs,c={...s,BASE_URL:e,serviceName:n},r=this.store.dispatch(ZT(c)),d=u=>{if(u)a.resolve(u.body);else{const p=new C({message:"Could not get a response from the server.",response:u,discard:!0});a.reject(p)}},l=u=>{u instanceof C?u.options.discard=!0:(console.error("Received an unexpected error while processing a request:",u,`
|
|
14
14
|
Converting error to APIError and discarding.`),u=new C({message:"An error occurred while processing the request.",innerError:u,discard:!0})),a.reject(u)};return r.then(d,l),a}async performPagination(s,e,n,a,c){const r={...e,queryParams:{...e.queryParams,paginate:!0,limit:n}},{method:d}=r,l=[];let u=await this.performRequest(s,r,a,c);for(l.push(u.results);u.next;)u=await this.performRequest(s,{url:u.next,method:d},a,c),l.push(u.results);return l}}class It{constructor(){m(this,"graph");m(this,"requestAttemptCounter");this.graph=new RP.DepGraph,this.requestAttemptCounter={}}static _fromOutbox(s){const e=new It;for(let n=0;n<s.length;n++){const a=s[n];if(!a){console.error("Outbox item was undefined");continue}e.sneakRequest(a);for(let c=0;c<n;c++){const r=s[c];if(!r){console.error("Previous outbox item was undefined");continue}r.payload.uuid!==a.payload.uuid&&r.payload.blocks.some(d=>a.payload.blockers.includes(d))&&It._addDependency(a.payload.uuid,r.payload.uuid,e.graph)}}return e}_addDependency(s,e){It._addDependency(s,e,this.graph)}static _addDependency(s,e,n){if(s===e)throw new Error(`Tried to add dependency from node to itself: ${s}`);if(!n.hasNode(s))throw new Error(`Tried to add dependency from non-existent node: ${s} (to node: ${e})`);if(!n.hasNode(e))throw new Error(`Tried to add dependency to non-existent node: ${e} (from node: ${s})`);n.addDependency(s,e)}addRequest(s){if(this.graph.addNode(s.payload.uuid,s),!(s.payload.blockers.length===0||this.graph.size()===1))for(const e of this.graph.overallOrder()){if(e===s.payload.uuid)continue;const n=this.graph.getNodeData(e),a=new Set(n.payload.blocks);s.payload.blockers.some(c=>a.has(c))&&this._addDependency(s.payload.uuid,e)}}insertRequest(s){this.graph.addNode(s.payload.uuid,s);for(const e of this.graph.overallOrder()){if(e===s.payload.uuid)continue;const n=this.graph.getNodeData(e),a=new Set(s.payload.blocks);n.payload.blockers.some(c=>a.has(c))&&this._addDependency(e,s.payload.uuid)}}sneakRequest(s){this.graph.addNode(s.payload.uuid,s)}_getNextNode(){const s=this.graph.overallOrder(!0);let e=1/0,n;for(const a of s){const c=this.requestAttemptCounter[a]||0;c<e&&(e=c,n=a)}return n}peek(){const s=this._getNextNode();if(s)return this.graph.getNodeData(s)}remove(s){this.graph.removeNode(s),delete this.requestAttemptCounter[s]}pop(){const s=this.peek();return s&&this.graph.removeNode(s.payload.uuid),s}getQueue(){const s=this.graph.overallOrder().map(n=>this.graph.getNodeData(n)),e=this._getNextNode();if(e){const n=this.graph.getNodeData(e),a=s.findIndex(c=>c.payload.uuid===n.payload.uuid);a!==-1&&(s.splice(a,1),s.unshift(n))}return s}getReady(){let s=this.graph.overallOrder(!0).map(e=>this.graph.getNodeData(e));return s=s.sort((e,n)=>e.meta.offline.effect.timestamp.localeCompare(n.meta.offline.effect.timestamp)),s=s.sort((e,n)=>{const a=this.requestAttemptCounter[e.payload.uuid]||0,c=this.requestAttemptCounter[n.payload.uuid]||0;return a-c}),s}registerRetry(s){this.requestAttemptCounter[s]=(this.requestAttemptCounter[s]||0)+1}}let lP;function uP(t){lP=t}function Ot(){return lP}let oP;function hP(t){oP=t}function pP(){return oP}let Ra=null;function St(){const t=Ot();if(!t)return console.warn("Client store not set; cannot get outbox coordinator yet."),null;if(Ra)return Ra;const s=t.getState().offline.outbox,e=It._fromOutbox(s);return Ra=e,e}const LM=(t,s)=>{const e=new s(t);return hP(e),uP(t),e};class NM{constructor(s){m(this,"_all");m(this,"_previous");this._all=[s],this._previous=s,this.then=this.then.bind(this),this.compile=this.compile.bind(this)}then(s){return this._previous&&(this._previous.next=s),this._all.push(s),this._previous=s,{then:this.then,compile:this.compile}}compile(){return this._all}}class Ma{constructor(){m(this,"next");this.next=null}then(s){return new NM(this).then(s)}async run(s){if(this.next)return this.next.run(s);{if(console.debug("Middleware finished. Performing request:",s.payload.url),!Ot())throw new Error("Client store not set");const n=pP();if(!n)throw new Error("Client SDK not set");return aP(s,n)}}}class mP extends Ma{async run(s){return super.run(s)}}class yP extends Ma{async run(s){return super.run(s)}}const fP=new mP().then(new yP).compile();function SP(t){var s;return(s=fP[0])==null?void 0:s.run(t)}var AP=(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))(AP||{});i.ALL_MIDDLEWARE=fP,i.APIError=C,i.AgentService=SR,i.AssetAttachmentService=AR,i.AssetProcedureService=gR,i.AssetProcedureStepFieldValuesAttachmentService=RR,i.AssetProcedureStepFieldValuesService=MR,i.AssetProcedureStepFieldsAttachmentService=_R,i.AssetProcedureStepFieldsService=bR,i.AssetProcedureStepService=kR,i.AssetProcedureTypeAttachmentService=TR,i.AssetProcedureTypeFieldValuesAttachmentService=OR,i.AssetProcedureTypeFieldValuesService=FR,i.AssetProcedureTypeFieldsAttachmentService=wR,i.AssetProcedureTypeFieldsService=IR,i.AssetProcedureTypeService=PR,i.AssetService=ER,i.AssetStageCompletionService=vR,i.AssetStageService=VR,i.AssetStatusType=Wa,i.AssetTypeAttachmentService=BR,i.AssetTypeFieldValuesAttachmentService=qR,i.AssetTypeFieldValuesService=DR,i.AssetTypeFieldsAttachmentService=zR,i.AssetTypeFieldsService=WR,i.AssetTypeIdentifierService=jR,i.AssetTypeIdentifierValueService=$R,i.AssetTypeService=CR,i.AssetTypeStatusService=UR,i.AttachmentModel=qa,i.BaseApiService=ft,i.BaseModelApiService=wt,i.BaseOfflineFileModelApiService=q,i.BaseOfflineModelApiService=M,i.BaseSDK=UM,i.COMMON_AUTO_FIELDS=Za,i.DEFAULT_ISSUE_PRIORITY=MP,i.DEFAULT_PAGE_SIZE=Zg,i.DISCARD_HTTP_STATUSES=Pa,i.DeferredPromise=hs,i.DocumentAttachmentService=LR,i.DocumentService=NR,i.EMPTY_ARRAY=Va,i.EMPTY_OBJECT=Ba,i.EmailDomainsService=GR,i.EmailVerificationService=HR,i.FILE_MODEL_DEFAULT_PAGE_SIZE=Jg,i.FileService=KR,i.FormIdentifierService=YR,i.FormIdentifierValueService=ZR,i.FormRevisionAttachmentService=JR,i.FormRevisionService=QR,i.FormService=XR,i.FormSubmissionAttachmentService=xR,i.FormSubmissionService=eM,i.GeoImageService=tM,i.HttpMethod=h,i.IssueAssociationService=sM,i.IssueAttachmentService=iM,i.IssueCommentAttachmentService=nM,i.IssueCommentService=aM,i.IssuePriority=os,i.IssueService=cM,i.IssueStatusType=Da,i.IssueTypeAttachmentService=rM,i.IssueTypeFieldValuesAttachmentService=uM,i.IssueTypeFieldValuesService=oM,i.IssueTypeFieldsAttachmentService=dM,i.IssueTypeFieldsService=lM,i.IssueTypeIdentifierService=hM,i.IssueTypeIdentifierValueService=pM,i.IssueTypeService=mM,i.IssueTypeStatusService=yM,i.IssueUpdateChange=$,i.IssueUpdateService=fM,i.JWTService=TM,i.MAX_SERVICE_BATCH_SIZE=ut,i.OUTBOX_RETRY_DELAY=Ua,i.OfflineAnalyticsMiddleware=mP,i.OfflineMiddleware=Ma,i.OrganizationAccessLevel=za,i.OrganizationAccessService=wM,i.OrganizationService=IM,i.OutboxCoordinator=It,i.ProjectAccessService=OM,i.ProjectAttachmentService=FM,i.ProjectFileService=gM,i.ProjectService=PM,i.RESET_ORGANIZATION_STATE=g,i.RESET_PROJECT_STATE=B,i.RESET_STATE=I,i.RateLimitingMiddleware=yP,i.SelectorBuilder=XP,i.TeamMembershipService=_M,i.TeamService=bM,i.UNKNOWN_ERROR_MESSAGE=Tt,i.UserService=RM,i.VERSION_REDUCER_KEY=gt,i.VerificationCodeType=AP,i.WorkflowService=MM,i.WorkflowStatus=$a,i.WorkflowStepAssigneeService=kM,i.WorkflowStepCommentService=EM,i.WorkflowStepEventService=vM,i.WorkflowStepEventType=ja,i.WorkflowStepFieldValuesAttachmentService=zM,i.WorkflowStepFieldValuesReviewRequestService=WM,i.WorkflowStepFieldValuesReviewService=qM,i.WorkflowStepFieldValuesReviewType=Ca,i.WorkflowStepFieldValuesService=DM,i.WorkflowStepFieldsAttachmentService=VM,i.WorkflowStepFieldsService=BM,i.WorkflowStepReviewerService=jM,i.WorkflowStepService=$M,i.WorkflowTypeService=CM,i._setLatestRetryTime=QT,i.addAsset=Pl,i.addAssetAttachment=uc,i.addAssetAttachments=ws,i.addAssetProcedure=Dr,i.addAssetProcedureStep=pl,i.addAssetProcedureStepFieldValues=Qd,i.addAssetProcedureStepFieldValuesAttachment=Dd,i.addAssetProcedureStepFieldValuesAttachments=Ls,i.addAssetProcedureStepFieldValuesMany=Xd,i.addAssetProcedureStepFields=Pd,i.addAssetProcedureStepFieldsAttachment=od,i.addAssetProcedureStepFieldsAttachments=hd,i.addAssetProcedureStepFieldsMany=_d,i.addAssetProcedureSteps=ml,i.addAssetProcedureType=Qr,i.addAssetProcedureTypeAttachment=Fc,i.addAssetProcedureTypeAttachments=gc,i.addAssetProcedureTypeFieldValues=gr,i.addAssetProcedureTypeFieldValuesAttachment=or,i.addAssetProcedureTypeFieldValuesAttachments=Ms,i.addAssetProcedureTypeFieldValuesMany=Pr,i.addAssetProcedureTypeFields=Qc,i.addAssetProcedureTypeFieldsAttachment=qc,i.addAssetProcedureTypeFieldsAttachments=Dc,i.addAssetProcedureTypeFieldsMany=Xc,i.addAssetProcedureTypes=Xr,i.addAssetProcedures=Bs,i.addAssetStage=tu,i.addAssetStageCompletion=Dl,i.addAssetStageCompletions=jl,i.addAssetStages=su,i.addAssetType=ih,i.addAssetTypeAttachment=hu,i.addAssetTypeAttachments=ii,i.addAssetTypeFieldValues=po,i.addAssetTypeFieldValuesAttachment=xu,i.addAssetTypeFieldValuesAttachments=ui,i.addAssetTypeFieldValuesMany=mo,i.addAssetTypeFields=ju,i.addAssetTypeFieldsAttachment=Pu,i.addAssetTypeFieldsAttachments=_u,i.addAssetTypeFieldsMany=$u,i.addAssetTypeIdentifier=bo,i.addAssetTypeIdentifierValue=Co,i.addAssetTypeIdentifierValues=Uo,i.addAssetTypeIdentifiers=Ro,i.addAssetTypeStatus=yh,i.addAssetTypeStatuses=fh,i.addAssetTypes=nh,i.addAssets=Js,i.addConversation=nc,i.addConversations=xP,i.addDocument=Hh,i.addDocumentAttachment=vh,i.addDocumentAttachments=Vh,i.addDocuments=Kh,i.addEmailDomain=cp,i.addEmailDomains=rp,i.addForm=Im,i.addFormIdentifier=Fp,i.addFormIdentifierValue=qp,i.addFormIdentifierValues=Dp,i.addFormIdentifiers=gp,i.addFormRevision=Vi,i.addFormRevisionAttachment=Qp,i.addFormRevisionAttachments=Xp,i.addFormRevisions=Bi,i.addFormSubmission=Zm,i.addFormSubmissionAttachment=zm,i.addFormSubmissionAttachments=Ci,i.addFormSubmissions=Ki,i.addForms=Om,i.addGeoImage=dy,i.addGeoImages=ly,i.addIssue=gf,i.addIssueAssociation=gy,i.addIssueAssociations=pt,i.addIssueAttachment=qy,i.addIssueAttachments=en,i.addIssueComment=of,i.addIssueCommentAttachment=Jy,i.addIssueCommentAttachments=Qy,i.addIssueComments=hf,i.addIssueType=_A,i.addIssueTypeAttachment=qf,i.addIssueTypeAttachments=Df,i.addIssueTypeFieldValues=oS,i.addIssueTypeFieldValuesAttachment=jS,i.addIssueTypeFieldValuesAttachments=An,i.addIssueTypeFieldValuesMany=hS,i.addIssueTypeFields=PS,i.addIssueTypeFieldsAttachment=Qf,i.addIssueTypeFieldsAttachments=Xf,i.addIssueTypeFieldsMany=_S,i.addIssueTypeIdentifier=XS,i.addIssueTypeIdentifierValue=hA,i.addIssueTypeIdentifierValues=pA,i.addIssueTypeIdentifiers=xS,i.addIssueTypeStatus=$A,i.addIssueTypeStatuses=CA,i.addIssueTypes=bA,i.addIssueUpdate=kn,i.addIssueUpdates=En,i.addIssues=ln,i.addOrganization=qT,i.addOrganizationAccess=wT,i.addOrganizationAccesses=IT,i.addOrganizations=WT,i.addProject=Hw,i.addProjectAccess=tw,i.addProjectAccesses=sw,i.addProjectAttachment=mw,i.addProjectAttachments=yw,i.addProjectFile=kw,i.addProjectFiles=Ew,i.addProjects=Gw,i.addTeam=AI,i.addTeamMembership=nI,i.addTeamMemberships=aI,i.addTeams=TI,i.addUser=qn,i.addUsers=oT,i.addWorkflow=BI,i.addWorkflowStep=Og,i.addWorkflowStepAssignee=YI,i.addWorkflowStepAssignees=ZI,i.addWorkflowStepComment=dO,i.addWorkflowStepComments=lO,i.addWorkflowStepEvent=OO,i.addWorkflowStepEvents=FO,i.addWorkflowStepFieldValues=YF,i.addWorkflowStepFieldValuesAttachment=lF,i.addWorkflowStepFieldValuesAttachments=la,i.addWorkflowStepFieldValuesMany=ZF,i.addWorkflowStepFieldValuesReview=zF,i.addWorkflowStepFieldValuesReviewRequest=OF,i.addWorkflowStepFieldValuesReviewRequests=pa,i.addWorkflowStepFieldValuesReviews=fa,i.addWorkflowStepFields=ZO,i.addWorkflowStepFieldsAttachment=WO,i.addWorkflowStepFieldsAttachments=na,i.addWorkflowStepFieldsMany=JO,i.addWorkflowStepReviewer=dg,i.addWorkflowStepReviewers=lg,i.addWorkflowSteps=Fg,i.addWorkflowType=Wg,i.addWorkflowTypes=qg,i.addWorkflows=zI,i.agentsReducer=rc,i.agentsSlice=Ss,i.areArraysEqual=VP,i.assetAttachmentReducer=wc,i.assetAttachmentSlice=Ts,i.assetProcedureReducer=Nr,i.assetProcedureSlice=Vs,i.assetProcedureStepFieldValuesAttachmentReducer=Yd,i.assetProcedureStepFieldValuesAttachmentSlice=Us,i.assetProcedureStepFieldValuesReducer=dl,i.assetProcedureStepFieldValuesSlice=Hs,i.assetProcedureStepFieldsAttachmentReducer=Od,i.assetProcedureStepFieldsAttachmentSlice=Ds,i.assetProcedureStepFieldsReducer=zd,i.assetProcedureStepFieldsSlice=$s,i.assetProcedureStepReducer=Tl,i.assetProcedureStepSlice=Ks,i.assetProcedureTypeAttachmentReducer=Ec,i.assetProcedureTypeAttachmentSlice=Fs,i.assetProcedureTypeFieldValuesAttachmentReducer=Sr,i.assetProcedureTypeFieldValuesAttachmentSlice=Rs,i.assetProcedureTypeFieldValuesReducer=vr,i.assetProcedureTypeFieldValuesSlice=vs,i.assetProcedureTypeFieldsAttachmentReducer=Gc,i.assetProcedureTypeFieldsAttachmentSlice=Ps,i.assetProcedureTypeFieldsReducer=ar,i.assetProcedureTypeFieldsSlice=bs,i.assetProcedureTypeReducer=ad,i.assetProcedureTypeSlice=Ws,i.assetReducer=zl,i.assetSlice=Zs,i.assetStageCompletionReducer=Hl,i.assetStageCompletionSlice=Xs,i.assetStageReducer=ru,i.assetStageSlice=xs,i.assetTypeAttachmentReducer=Ou,i.assetTypeAttachmentSlice=si,i.assetTypeFieldValuesAttachmentReducer=uo,i.assetTypeFieldValuesAttachmentSlice=li,i.assetTypeFieldValuesReducer=go,i.assetTypeFieldValuesSlice=pi,i.assetTypeFieldsAttachmentReducer=Wu,i.assetTypeFieldsAttachmentSlice=ci,i.assetTypeFieldsReducer=Ju,i.assetTypeFieldsSlice=di,i.assetTypeIdentifierReducer=Do,i.assetTypeIdentifierSlice=mi,i.assetTypeIdentifierValueReducer=Xo,i.assetTypeIdentifierValueSlice=fi,i.assetTypeReducer=hh,i.assetTypeSlice=Si,i.assetTypeStatusReducer=_h,i.assetTypeStatusSlice=Ti,i.assetTypeStatusSortFn=Xa,i.authReducer=Mh,i.authSlice=Ht,i.baseReducer=sR,i.baseReducers=ga,i.clearTokens=q_,i.createModelAdapter=F,i.createOfflineAction=KT,i.createPayload=R,i.createSelectionAdapter=kP,i.deleteAsset=Rl,i.deleteAssetAttachment=yc,i.deleteAssetAttachments=Is,i.deleteAssetProcedure=Cr,i.deleteAssetProcedureStep=Sl,i.deleteAssetProcedureStepFieldValues=il,i.deleteAssetProcedureStepFieldValuesAttachment=Ld,i.deleteAssetProcedureStepFieldValuesAttachments=Ns,i.deleteAssetProcedureStepFieldValuesMany=nl,i.deleteAssetProcedureStepFields=Ed,i.deleteAssetProcedureStepFieldsAttachment=Sd,i.deleteAssetProcedureStepFieldsAttachments=Ad,i.deleteAssetProcedureStepFieldsMany=vd,i.deleteAssetProcedureSteps=Al,i.deleteAssetProcedureType=td,i.deleteAssetProcedureTypeAttachment=Mc,i.deleteAssetProcedureTypeAttachments=kc,i.deleteAssetProcedureTypeFieldValues=kr,i.deleteAssetProcedureTypeFieldValuesAttachment=fr,i.deleteAssetProcedureTypeFieldValuesAttachments=ks,i.deleteAssetProcedureTypeFieldValuesMany=Er,i.deleteAssetProcedureTypeFields=ir,i.deleteAssetProcedureTypeFieldsAttachment=Lc,i.deleteAssetProcedureTypeFieldsAttachments=Nc,i.deleteAssetProcedureTypeFieldsMany=nr,i.deleteAssetProcedureTypes=sd,i.deleteAssetProcedures=zs,i.deleteAssetStage=au,i.deleteAssetStageCompletion=Nl,i.deleteAssetStageCompletions=Gl,i.deleteAssetStages=cu,i.deleteAssetType=rh,i.deleteAssetTypeAttachment=Su,i.deleteAssetTypeAttachments=ni,i.deleteAssetTypeFieldValues=To,i.deleteAssetTypeFieldValuesAttachment=no,i.deleteAssetTypeFieldValuesAttachments=oi,i.deleteAssetTypeFieldValuesMany=wo,i.deleteAssetTypeFields=Gu,i.deleteAssetTypeFieldsAttachment=Eu,i.deleteAssetTypeFieldsAttachments=vu,i.deleteAssetTypeFieldsMany=Hu,i.deleteAssetTypeIdentifier=Vo,i.deleteAssetTypeIdentifierValue=Ko,i.deleteAssetTypeIdentifierValues=Yo,i.deleteAssetTypeIdentifiers=Bo,i.deleteAssetTypeStatus=Ih,i.deleteAssetTypeStatuses=Oh,i.deleteAssetTypes=dh,i.deleteAssets=Qs,i.deleteConversation=s_,i.deleteConversations=i_,i.deleteDocument=Xh,i.deleteDocumentAttachment=Dh,i.deleteDocumentAttachments=jh,i.deleteDocuments=xh,i.deleteEmailDomain=hp,i.deleteEmailDomains=pp,i.deleteForm=bm,i.deleteFormIdentifier=Mp,i.deleteFormIdentifierValue=Lp,i.deleteFormIdentifierValues=Np,i.deleteFormIdentifiers=kp,i.deleteFormRevision=zi,i.deleteFormRevisionAttachment=im,i.deleteFormRevisionAttachments=nm,i.deleteFormRevisions=Wi,i.deleteFormSubmission=Xm,i.deleteFormSubmissionAttachment=$m,i.deleteFormSubmissionAttachments=Ui,i.deleteFormSubmissions=Yi,i.deleteForms=Rm,i.deleteGeoImage=hy,i.deleteGeoImages=py,i.deleteIssue=Mf,i.deleteIssueAssociation=Py,i.deleteIssueAssociations=mt,i.deleteIssueAttachment=Uy,i.deleteIssueAttachments=tn,i.deleteIssueComment=Sf,i.deleteIssueCommentAttachment=sf,i.deleteIssueCommentAttachments=nf,i.deleteIssueComments=Af,i.deleteIssueType=vA,i.deleteIssueTypeAttachment=Lf,i.deleteIssueTypeAttachments=Nf,i.deleteIssueTypeFieldValues=SS,i.deleteIssueTypeFieldValuesAttachment=NS,i.deleteIssueTypeFieldValuesAttachments=Tn,i.deleteIssueTypeFieldValuesMany=AS,i.deleteIssueTypeFields=ES,i.deleteIssueTypeFieldsAttachment=iS,i.deleteIssueTypeFieldsAttachments=nS,i.deleteIssueTypeFieldsMany=vS,i.deleteIssueTypeIdentifier=nA,i.deleteIssueTypeIdentifierValue=AA,i.deleteIssueTypeIdentifierValues=TA,i.deleteIssueTypeIdentifiers=aA,i.deleteIssueTypeStatus=HA,i.deleteIssueTypeStatuses=KA,i.deleteIssueTypes=VA,i.deleteIssueUpdate=vn,i.deleteIssueUpdates=Vn,i.deleteIssues=un,i.deleteOrganization=$T,i.deleteOrganizationAccess=_T,i.deleteOrganizationAccesses=bT,i.deleteOrganizations=CT,i.deleteProject=Zw,i.deleteProjectAccess=rw,i.deleteProjectAccesses=dw,i.deleteProjectAttachment=ww,i.deleteProjectAttachments=Iw,i.deleteProjectFile=Bw,i.deleteProjectFiles=zw,i.deleteProjects=Jw,i.deleteTeam=gI,i.deleteTeamMembership=uI,i.deleteTeamMemberships=oI,i.deleteTeams=PI,i.deleteUser=Dn,i.deleteUsers=mT,i.deleteWorkflow=$I,i.deleteWorkflowStep=Rg,i.deleteWorkflowStepAssignee=eO,i.deleteWorkflowStepAssignees=tO,i.deleteWorkflowStepComment=mO,i.deleteWorkflowStepComments=yO,i.deleteWorkflowStepEvent=RO,i.deleteWorkflowStepEvents=MO,i.deleteWorkflowStepFieldValues=eg,i.deleteWorkflowStepFieldValuesAttachment=mF,i.deleteWorkflowStepFieldValuesAttachments=ua,i.deleteWorkflowStepFieldValuesMany=tg,i.deleteWorkflowStepFieldValuesReview=$F,i.deleteWorkflowStepFieldValuesReviewRequest=bF,i.deleteWorkflowStepFieldValuesReviewRequests=ma,i.deleteWorkflowStepFieldValuesReviews=Sa,i.deleteWorkflowStepFields=tF,i.deleteWorkflowStepFieldsAttachment=CO,i.deleteWorkflowStepFieldsAttachments=aa,i.deleteWorkflowStepFieldsMany=sF,i.deleteWorkflowStepReviewer=mg,i.deleteWorkflowStepReviewers=yg,i.deleteWorkflowSteps=Mg,i.deleteWorkflowType=Ug,i.deleteWorkflowTypes=Lg,i.deleteWorkflows=CI,i.dequeue=nP,i.discard=cP,i.documentAttachmentReducer=Lh,i.documentAttachmentSlice=Ii,i.documentSlice=Fi,i.documentsReducer=ep,i.downloadFile=CP,i.emailDomainsReducer=Sp,i.emailDomainsSlice=Pi,i.emailRegex=ZP,i.enqueue=iP,i.enqueueRequest=ZT,i.extractResponseFromError=dP,i.fallbackToEmptyArray=A,i.fallbackToEmptyObject=zt,i.fetchBlobFromObjectUrl=Ga,i.fetchFileFromObjectUrl=Ha,i.fileReducer=wp,i.fileSlice=bi,i.formIdentifierReducer=Bp,i.formIdentifierSlice=Ri,i.formIdentifierValueReducer=Yp,i.formIdentifierValueSlice=ki,i.formReducer=Mm,i.formRevisionAttachmentReducer=dm,i.formRevisionAttachmentSlice=Ei,i.formRevisionReducer=Am,i.formRevisionsSlice=vi,i.formSlice=Di,i.formSubmissionAttachmentReducer=Nm,i.formSubmissionAttachmentSlice=$i,i.formSubmissionReducer=iy,i.formSubmissionSlice=Hi,i.geoImageReducer=Sy,i.geoImageSlice=Ji,i.getAssetProcedureStepSubTree=Qa,i.getAssetProcedureStepTrees=JP,i.getClientSDK=pP,i.getClientStore=Ot,i.getDocumentSubTree=tc,i.getDocumentTrees=QP,i.getFileExtension=Na,i.getLocalDateString=La,i.getLocalRelativeDateString=qP,i.getOutboxCoordinator=St,i.getRenamedFile=$P,i.getRequestDescription=T,i.getS3FileKey=jP,i.hashFile=Wt,i.initSDK=LM,i.initializeAssetAttachments=lc,i.initializeAssetProcedureStepFieldValues=Jd,i.initializeAssetProcedureStepFieldValuesAttachments=qd,i.initializeAssetProcedureStepFields=gd,i.initializeAssetProcedureStepFieldsAttachments=ud,i.initializeAssetProcedureSteps=ul,i.initializeAssetProcedureTypeAttachments=Oc,i.initializeAssetProcedureTypeFieldValues=Fr,i.initializeAssetProcedureTypeFieldValuesAttachments=ur,i.initializeAssetProcedureTypeFields=Jc,i.initializeAssetProcedureTypeFieldsAttachments=Wc,i.initializeAssetProcedureTypes=Jr,i.initializeAssetProcedures=qr,i.initializeAssetStageCompletions=ql,i.initializeAssetStages=Xl,i.initializeAssetTypeAttachments=ou,i.initializeAssetTypeFieldValues=ho,i.initializeAssetTypeFieldValuesAttachments=Xu,i.initializeAssetTypeFields=Du,i.initializeAssetTypeFieldsAttachments=gu,i.initializeAssetTypeIdentifierValues=$o,i.initializeAssetTypeIdentifiers=_o,i.initializeAssetTypeStatuses=mh,i.initializeAssetTypes=eh,i.initializeAssets=gl,i.initializeConversations=ic,i.initializeDocumentAttachments=Eh,i.initializeDocuments=Gh,i.initializeEmailDomains=ap,i.initializeFormIdentifierValues=Wp,i.initializeFormIdentifiers=Op,i.initializeFormRevisionAttachments=Jp,i.initializeFormRevisions=um,i.initializeFormSubmissionAttachments=Bm,i.initializeFormSubmissions=Hm,i.initializeForms=wm,i.initializeGeoImages=ay,i.initializeIssueAssociations=Ty,i.initializeIssueAttachments=Wy,i.initializeIssueCommentAttachments=Zy,i.initializeIssueComments=uf,i.initializeIssueTypeAttachments=Wf,i.initializeIssueTypeFieldValues=uS,i.initializeIssueTypeFieldValuesAttachments=DS,i.initializeIssueTypeFields=gS,i.initializeIssueTypeFieldsAttachments=Jf,i.initializeIssueTypeIdentifierValues=oA,i.initializeIssueTypeIdentifiers=QS,i.initializeIssueTypeStatuses=jA,i.initializeIssueTypes=PA,i.initializeIssueUpdates=XA,i.initializeIssues=Ff,i.initializeOrganizationAccesses=TT,i.initializeOrganizations=VT,i.initializeProjectAccesses=ew,i.initializeProjectAttachments=pw,i.initializeProjectFiles=bw,i.initializeProjects=Uw,i.initializeTeamMemberships=iI,i.initializeTeams=SI,i.initializeUsers=dT,i.initializeWorkflowStepAssignees=KI,i.initializeWorkflowStepComments=rO,i.initializeWorkflowStepEvents=IO,i.initializeWorkflowStepFieldValues=KF,i.initializeWorkflowStepFieldValuesAttachments=dF,i.initializeWorkflowStepFieldValuesReviewRequests=IF,i.initializeWorkflowStepFieldValuesReviews=BF,i.initializeWorkflowStepFields=YO,i.initializeWorkflowStepFieldsAttachments=zO,i.initializeWorkflowStepReviewers=rg,i.initializeWorkflowSteps=Ig,i.initializeWorkflowTypes=zg,i.initializeWorkflows=VI,i.isImageFile=UP,i.isObjectUrl=Ka,i.isToday=WP,i.issueAssociationReducer=By,i.issueAssociationSlice=Xi,i.issueAttachmentReducer=Ky,i.issueAttachmentSlice=xi,i.issueCommentAttachmentReducer=df,i.issueCommentAttachmentSlice=nn,i.issueCommentReducer=If,i.issueCommentSlice=cn,i.issueReducer=Bf,i.issueSlice=dn,i.issueTypeAttachmentReducer=Yf,i.issueTypeAttachmentSlice=on,i.issueTypeFieldValuesAttachmentReducer=ZS,i.issueTypeFieldValuesAttachmentSlice=Sn,i.issueTypeFieldValuesReducer=OS,i.issueTypeFieldValuesSlice=yn,i.issueTypeFieldsAttachmentReducer=dS,i.issueTypeFieldsAttachmentSlice=pn,i.issueTypeFieldsReducer=WS,i.issueTypeFieldsSlice=fn,i.issueTypeIdentifierReducer=lA,i.issueTypeIdentifierSlice=In,i.issueTypeIdentifierValueReducer=FA,i.issueTypeIdentifierValueSlice=Fn,i.issueTypeReducer=qA,i.issueTypeSlice=gn,i.issueTypeStatusReducer=JA,i.issueTypeStatusSlice=_n,i.issueTypeStatusSortFn=xa,i.issueUpdateReducer=cT,i.issueUpdateSlice=Mn,i.logOnlyOnce=LP,i.markAsDeleted=JT,i.markForDeletion=wb,i.memoize=ms,i.organizationAccessReducer=RT,i.organizationAccessSlice=$n,i.organizationReducer=HT,i.organizationSlice=Cn,i.outboxReducer=XT,i.outboxSlice=Un,i.overmapEnhancer=oR,i.overmapReducer=iR,i.overmapReducers=Yg,i.performRequest=ba,i.performRequestFromAction=aP,i.projectAccessReducer=lw,i.projectAccessSlice=Ln,i.projectAttachmentReducer=Pw,i.projectAttachmentSlice=Gn,i.projectFileReducer=$w,i.projectFileSlice=Kn,i.projectReducer=Qw,i.projectSlice=Yn,i.rehydratedReducer=tI,i.rehydratedSlice=Zn,i.restructureSelectorWithArgs=S,i.runMiddleware=SP,i.selectAccessToken=D_,i.selectAccessesByUserOfProject=Ob,i.selectAccessibleProjects=Pb,i.selectActiveOrganizationAccess=fb,i.selectAllDocumentAttachments=Oi,i.selectAssetAttachmentById=Sc,i.selectAssetAttachmentMapping=fc,i.selectAssetAttachments=Os,i.selectAssetAttachmentsByIds=Ac,i.selectAssetById=Vl,i.selectAssetProcedureById=Kr,i.selectAssetProcedureStepById=wl,i.selectAssetProcedureStepFieldValues=Pt,i.selectAssetProcedureStepFieldValuesAttachmentById=Gd,i.selectAssetProcedureStepFieldValuesAttachments=Gs,i.selectAssetProcedureStepFieldValuesAttachmentsByIds=Hd,i.selectAssetProcedureStepFieldValuesAttachmentsMapping=Nd,i.selectAssetProcedureStepFieldValuesById=cl,i.selectAssetProcedureStepFieldValuesByIds=rl,i.selectAssetProcedureStepFieldValuesMapping=al,i.selectAssetProcedureStepFieldValuesOfAsset=A_,i.selectAssetProcedureStepFieldValuesOfAssetProcedure=T_,i.selectAssetProcedureStepFieldValuesOfAssetProcedureStep=w_,i.selectAssetProcedureStepFields=Ct,i.selectAssetProcedureStepFieldsAttachmentById=wd,i.selectAssetProcedureStepFieldsAttachments=js,i.selectAssetProcedureStepFieldsAttachmentsByIds=Id,i.selectAssetProcedureStepFieldsAttachmentsMapping=Td,i.selectAssetProcedureStepFieldsById=Vd,i.selectAssetProcedureStepFieldsByIds=Bd,i.selectAssetProcedureStepFieldsMapping=Cs,i.selectAssetProcedureStepFieldsOfAssetProcedureStep=y_,i.selectAssetProcedureStepMapping=Ut,i.selectAssetProcedureSteps=Ys,i.selectAssetProcedureStepsByIds=Il,i.selectAssetProcedureStepsMappingOfAssetProcedureType=I_,i.selectAssetProcedureStepsOfAssetProcedureType=O_,i.selectAssetProcedureTypeAttachmentById=Vc,i.selectAssetProcedureTypeAttachmentMapping=vc,i.selectAssetProcedureTypeAttachments=gs,i.selectAssetProcedureTypeAttachmentsByIds=Bc,i.selectAssetProcedureTypeById=rd,i.selectAssetProcedureTypeFieldValues=jt,i.selectAssetProcedureTypeFieldValuesAttachmentById=Tr,i.selectAssetProcedureTypeFieldValuesAttachments=Es,i.selectAssetProcedureTypeFieldValuesAttachmentsByIds=wr,i.selectAssetProcedureTypeFieldValuesAttachmentsMapping=Ar,i.selectAssetProcedureTypeFieldValuesById=Br,i.selectAssetProcedureTypeFieldValuesByIds=zr,i.selectAssetProcedureTypeFieldValuesMapping=Vr,i.selectAssetProcedureTypeFieldValuesOfAsset=u_,i.selectAssetProcedureTypeFields=Dt,i.selectAssetProcedureTypeFieldsAttachmentById=Kc,i.selectAssetProcedureTypeFieldsAttachments=_s,i.selectAssetProcedureTypeFieldsAttachmentsByIds=Yc,i.selectAssetProcedureTypeFieldsAttachmentsMapping=Hc,i.selectAssetProcedureTypeFieldsById=rr,i.selectAssetProcedureTypeFieldsByIds=dr,i.selectAssetProcedureTypeFieldsMapping=cr,i.selectAssetProcedureTypeFieldsOfAssetProcedureType=d_,i.selectAssetProcedureTypes=qs,i.selectAssetProcedureTypesByIds=dd,i.selectAssetProcedureTypesMapping=cd,i.selectAssetProcedureTypesOfOrganization=p_,i.selectAssetProcedures=$t,i.selectAssetProceduresByIds=Yr,i.selectAssetProceduresMapping=Gr,i.selectAssetProceduresOfAssetProcedureType=Hr,i.selectAssetProceduresOfAssetType=h_,i.selectAssetStageById=du,i.selectAssetStageCompletionById=Zl,i.selectAssetStageCompletionMapping=Kl,i.selectAssetStageCompletions=Yl,i.selectAssetStageCompletionsByIds=Jl,i.selectAssetStages=ti,i.selectAssetStagesByIds=lu,i.selectAssetStagesMappingOfAssetProcedureType=g_,i.selectAssetStagesOfAssetProcedureType=P_,i.selectAssetTypeAttachmentById=Tu,i.selectAssetTypeAttachmentMapping=Au,i.selectAssetTypeAttachments=ai,i.selectAssetTypeAttachmentsByIds=wu,i.selectAssetTypeById=uh,i.selectAssetTypeFieldValues=Nt,i.selectAssetTypeFieldValuesAttachmentById=co,i.selectAssetTypeFieldValuesAttachments=hi,i.selectAssetTypeFieldValuesAttachmentsByIds=ro,i.selectAssetTypeFieldValuesAttachmentsMapping=ao,i.selectAssetTypeFieldValuesById=Oo,i.selectAssetTypeFieldValuesByIds=Fo,i.selectAssetTypeFieldValuesMapping=Io,i.selectAssetTypeFieldValuesOfAsset=M_,i.selectAssetTypeFields=_t,i.selectAssetTypeFieldsAttachmentById=Bu,i.selectAssetTypeFieldsAttachments=ri,i.selectAssetTypeFieldsAttachmentsByIds=zu,i.selectAssetTypeFieldsAttachmentsMapping=Vu,i.selectAssetTypeFieldsById=Yu,i.selectAssetTypeFieldsByIds=Zu,i.selectAssetTypeFieldsMapping=Ku,i.selectAssetTypeFieldsOfAssetType=b_,i.selectAssetTypeIdentifierById=Wo,i.selectAssetTypeIdentifierMapping=zo,i.selectAssetTypeIdentifierValueById=Jo,i.selectAssetTypeIdentifierValueMapping=Zo,i.selectAssetTypeIdentifierValues=Gt,i.selectAssetTypeIdentifierValuesByIds=Qo,i.selectAssetTypeIdentifierValuesOfAsset=v_,i.selectAssetTypeIdentifierValuesOfIdentifier=V_,i.selectAssetTypeIdentifiers=yi,i.selectAssetTypeIdentifiersByIds=qo,i.selectAssetTypeIdentifiersOfAssetType=E_,i.selectAssetTypeStatusById=gh,i.selectAssetTypeStatusMapping=Fh,i.selectAssetTypeStatuses=wi,i.selectAssetTypeStatusesByIds=Ph,i.selectAssetTypeStatusesOfAssetType=z_,i.selectAssetTypeValuesOfAssetType=k_,i.selectAssetTypes=Ai,i.selectAssetTypesByIds=oh,i.selectAssetTypesMapping=lh,i.selectAssetTypesOfOrganization=B_,i.selectAssets=Lt,i.selectAssetsByIds=Bl,i.selectAssetsMapping=El,i.selectAssetsOfAssetType=vl,i.selectAssetsOfProject=F_,i.selectAttachmentsOfAsset=Tc,i.selectAttachmentsOfAssetProcedureStepFieldValues=Kd,i.selectAttachmentsOfAssetProcedureStepFields=m_,i.selectAttachmentsOfAssetProcedureType=c_,i.selectAttachmentsOfAssetProcedureTypeFieldValues=Ir,i.selectAttachmentsOfAssetProcedureTypeFields=r_,i.selectAttachmentsOfAssetType=Iu,i.selectAttachmentsOfAssetTypeFieldValues=lo,i.selectAttachmentsOfAssetTypeFields=__,i.selectAttachmentsOfDocument=$_,i.selectAttachmentsOfFormRevision=J_,i.selectAttachmentsOfFormSubmission=Lm,i.selectAttachmentsOfIssue=Ny,i.selectAttachmentsOfIssueComment=eb,i.selectAttachmentsOfIssueType=ib,i.selectAttachmentsOfIssueTypeFieldValues=YS,i.selectAttachmentsOfIssueTypeFields=nb,i.selectAttachmentsOfProject=gb,i.selectAttachmentsOfWorkflowStepFieldValues=AF,i.selectAttachmentsOfWorkflowStepFields=LO,i.selectCommentsOfIssue=tb,i.selectConversation=a_,i.selectConversationMapping=As,i.selectConversations=n_,i.selectCurrentUser=fT,i.selectDeletedRequests=Ab,i.selectDescendantsOfAssetProcedureStep=Ol,i.selectDescendantsOfDocument=ip,i.selectDocumentAttachmentById=Ch,i.selectDocumentAttachmentMapping=$h,i.selectDocumentAttachmentsByIds=Uh,i.selectDocumentById=tp,i.selectDocuments=Kt,i.selectDocumentsByIds=sp,i.selectDocumentsMapping=gi,i.selectEmailDomainById=yp,i.selectEmailDomains=_i,i.selectEmailDomainsAsMapping=mp,i.selectEmailDomainsByIds=fp,i.selectEmailDomainsOfOrganization=L_,i.selectFieldValuesOfAssetProcedure=o_,i.selectFormById=Em,i.selectFormIdentifierById=vp,i.selectFormIdentifierMapping=Ep,i.selectFormIdentifierValueById=Hp,i.selectFormIdentifierValueMapping=Gp,i.selectFormIdentifierValues=Yt,i.selectFormIdentifierValuesByIds=Kp,i.selectFormIdentifierValuesOfFormSubmission=Y_,i.selectFormIdentifierValuesOfIdentifier=Z_,i.selectFormIdentifiers=Mi,i.selectFormIdentifiersByIds=Vp,i.selectFormIdentifiersOfForm=K_,i.selectFormMapping=km,i.selectFormRevisionAttachmentById=cm,i.selectFormRevisionAttachments=am,i.selectFormRevisionAttachmentsByIds=rm,i.selectFormRevisionAttachmentsMapping=Zt,i.selectFormRevisionById=ym,i.selectFormRevisionMapping=qi,i.selectFormRevisions=Jt,i.selectFormRevisionsByIds=fm,i.selectFormRevisionsOfForm=Sm,i.selectFormSubmissionAttachemntsByIds=Gi,i.selectFormSubmissionAttachmentById=Cm,i.selectFormSubmissionAttachments=Ni,i.selectFormSubmissionAttachmentsByIds=Um,i.selectFormSubmissionAttachmentsMapping=Li,i.selectFormSubmissionById=ey,i.selectFormSubmissions=xm,i.selectFormSubmissionsByIds=ty,i.selectFormSubmissionsMapping=Zi,i.selectFormSubmissionsOfForm=sy,i.selectForms=ji,i.selectFormsByIds=vm,i.selectFormsOfOrganization=X_,i.selectGeoImageById=yy,i.selectGeoImageMapping=my,i.selectGeoImages=Qi,i.selectGeoImagesByIds=fy,i.selectGeoImagesOfProject=x_,i.selectIsLoggedIn=j_,i.selectIssueAssociationById=by,i.selectIssueAssociationMapping=_y,i.selectIssueAssociations=yt,i.selectIssueAssociationsByIds=Ry,i.selectIssueAssociationsOfAsset=Vy,i.selectIssueAssociationsOfIssue=vy,i.selectIssueAssociationsOfIssues=Ey,i.selectIssueAssociationsToIssue=My,i.selectIssueAssociationsToIssues=ky,i.selectIssueAttachmentById=Gy,i.selectIssueAttachmentMapping=Ly,i.selectIssueAttachments=sn,i.selectIssueAttachmentsByIds=Hy,i.selectIssueById=Ef,i.selectIssueCommentAttachmentById=cf,i.selectIssueCommentAttachmentMapping=af,i.selectIssueCommentAttachments=an,i.selectIssueCommentAttachmentsByIds=rf,i.selectIssueCommentById=Tf,i.selectIssueCommentMapping=rn,i.selectIssueCommentsByIds=wf,i.selectIssueMapping=kf,i.selectIssueTypeAttachmentById=Hf,i.selectIssueTypeAttachmentMapping=Gf,i.selectIssueTypeAttachments=hn,i.selectIssueTypeAttachmentsByIds=Kf,i.selectIssueTypeById=zA,i.selectIssueTypeFieldValues=Xt,i.selectIssueTypeFieldValuesAttachmentById=HS,i.selectIssueTypeFieldValuesAttachments=wn,i.selectIssueTypeFieldValuesAttachmentsByIds=KS,i.selectIssueTypeFieldValuesAttachmentsMapping=GS,i.selectIssueTypeFieldValuesById=wS,i.selectIssueTypeFieldValuesByIds=IS,i.selectIssueTypeFieldValuesMapping=TS,i.selectIssueTypeFieldValuesOfIssue=ab,i.selectIssueTypeFields=bt,i.selectIssueTypeFieldsAttachmentById=cS,i.selectIssueTypeFieldsAttachments=mn,i.selectIssueTypeFieldsAttachmentsByIds=rS,i.selectIssueTypeFieldsAttachmentsMapping=aS,i.selectIssueTypeFieldsById=BS,i.selectIssueTypeFieldsByIds=zS,i.selectIssueTypeFieldsMapping=VS,i.selectIssueTypeFieldsOfIssueType=cb,i.selectIssueTypeIdentifierById=rA,i.selectIssueTypeIdentifierMapping=cA,i.selectIssueTypeIdentifierValueById=IA,i.selectIssueTypeIdentifierValueMapping=wA,i.selectIssueTypeIdentifierValues=xt,i.selectIssueTypeIdentifierValuesByIds=OA,i.selectIssueTypeIdentifierValuesOfIdentifier=ob,i.selectIssueTypeIdentifierValuesOfIssue=ub,i.selectIssueTypeIdentifiers=On,i.selectIssueTypeIdentifiersByIds=dA,i.selectIssueTypeIdentifiersOfIssueType=lb,i.selectIssueTypeMapping=BA,i.selectIssueTypeStatusById=Rn,i.selectIssueTypeStatusMapping=YA,i.selectIssueTypeStatuses=bn,i.selectIssueTypeStatusesByIds=ZA,i.selectIssueTypeStatusesOfIssueType=pb,i.selectIssueTypeValuesOfIssueType=db,i.selectIssueTypes=Pn,i.selectIssueTypesByIds=WA,i.selectIssueTypesOfOrganization=hb,i.selectIssueUpdateById=iT,i.selectIssueUpdateMapping=Bn,i.selectIssueUpdates=zn,i.selectIssueUpdatesByIds=nT,i.selectIssueUpdatesOfIssue=aT,i.selectIssues=Qt,i.selectIssuesByIds=vf,i.selectIssuesOfIssueType=Vf,i.selectIssuesOfProject=sb,i.selectLatestAssetProcedureStepFieldsOfAssetProcedureStep=f_,i.selectLatestAssetProcedureTypeFieldsOfAssetProcedureType=l_,i.selectLatestAssetTypeFieldsOfAssetType=R_,i.selectLatestFieldsByAssetProcedureStep=S_,i.selectLatestFormRevisionOfForm=Q_,i.selectLatestIssueTypeFieldsOfIssueType=rb,i.selectLatestRetryTime=Tb,i.selectLatestReviewOfWorkflowStepFieldValues=Kb,i.selectLatestReviewRequestOfWorkflowStepFieldValues=Hb,i.selectLatestWorkflowStepFieldsOfWorkflowStep=Gb,i.selectMembershipsByUserOfTeam=kb,i.selectOrganizationAccessById=MT,i.selectOrganizationAccessMapping=ss,i.selectOrganizationAccessUserMapping=ET,i.selectOrganizationAccessesByIds=kT,i.selectOrganizationById=NT,i.selectOrganizationDocuments=U_,i.selectOrganizations=LT,i.selectOrganizationsByIds=GT,i.selectOrganizationsMapping=UT,i.selectProjectAccessById=uw,i.selectProjectAccessMapping=Nn,i.selectProjectAccesses=Rt,i.selectProjectAccessesByIds=ow,i.selectProjectAccessesOfProject=Ib,i.selectProjectAttachmentById=Fw,i.selectProjectAttachmentMapping=Ow,i.selectProjectAttachments=Hn,i.selectProjectAttachmentsByIds=gw,i.selectProjectById=xw,i.selectProjectDocuments=C_,i.selectProjectFileById=Dw,i.selectProjectFileMapping=Ww,i.selectProjectFiles=qw,i.selectProjectFilesByIds=jw,i.selectProjectMapping=Xw,i.selectProjects=is,i.selectProjectsByIds=eI,i.selectProjectsOfOrganization=_b,i.selectRehydrated=Mb,i.selectReviewRequestsOfWorkflowStepFieldValues=EF,i.selectReviewsOfWorkflowStepFieldValues=NF,i.selectStageMapping=ei,i.selectTeamById=bI,i.selectTeamMembershipById=mI,i.selectTeamMemberships=ns,i.selectTeamMembershipsByIds=yI,i.selectTeamMembershipsMapping=pI,i.selectTeams=Xn,i.selectTeamsByIds=RI,i.selectTeamsMapping=_I,i.selectTeamsOfOrganization=vb,i.selectUploadUrl=H_,i.selectUserById=ts,i.selectUsers=es,i.selectUsersByIds=ST,i.selectUsersMapping=jn,i.selectUsersOfOrganization=Sb,i.selectUsersOfProject=Fb,i.selectUsersOfTeam=Eb,i.selectWorkflowById=LI,i.selectWorkflowMapping=UI,i.selectWorkflowStepAssigneeById=iO,i.selectWorkflowStepAssignees=Mt,i.selectWorkflowStepAssigneesByIds=nO,i.selectWorkflowStepAssigneesMapping=sO,i.selectWorkflowStepAssigneesOfWorkflow=Wb,i.selectWorkflowStepAssigneesOfWorkflowAndWorkflowStep=Db,i.selectWorkflowStepAssigneesOfWorkflowStep=qb,i.selectWorkflowStepById=Eg,i.selectWorkflowStepCommentById=SO,i.selectWorkflowStepComments=kt,i.selectWorkflowStepCommentsByIds=AO,i.selectWorkflowStepCommentsMapping=fO,i.selectWorkflowStepCommentsOfWorkflow=jb,i.selectWorkflowStepCommentsOfWorkflowAndWorkflowStep=Cb,i.selectWorkflowStepCommentsOfWorkflowStep=$b,i.selectWorkflowStepEventById=EO,i.selectWorkflowStepEvents=cs,i.selectWorkflowStepEventsByIds=vO,i.selectWorkflowStepEventsMapping=kO,i.selectWorkflowStepEventsOfWorkflow=Ub,i.selectWorkflowStepEventsOfWorkflowStep=Lb,i.selectWorkflowStepFieldValues=Et,i.selectWorkflowStepFieldValuesAttachmentById=fF,i.selectWorkflowStepFieldValuesAttachments=oa,i.selectWorkflowStepFieldValuesAttachmentsByIds=SF,i.selectWorkflowStepFieldValuesAttachmentsMapping=yF,i.selectWorkflowStepFieldValuesById=ig,i.selectWorkflowStepFieldValuesByIds=ng,i.selectWorkflowStepFieldValuesMapping=sg,i.selectWorkflowStepFieldValuesOfWorkflow=Yb,i.selectWorkflowStepFieldValuesOfWorkflowAndWorkflowStep=Jb,i.selectWorkflowStepFieldValuesOfWorkflowStep=Zb,i.selectWorkflowStepFieldValuesReviewById=UF,i.selectWorkflowStepFieldValuesReviewRequestById=MF,i.selectWorkflowStepFieldValuesReviewRequests=ds,i.selectWorkflowStepFieldValuesReviewRequestsByIds=kF,i.selectWorkflowStepFieldValuesReviewRequestsMapping=RF,i.selectWorkflowStepFieldValuesReviews=ls,i.selectWorkflowStepFieldValuesReviewsByIds=LF,i.selectWorkflowStepFieldValuesReviewsMapping=CF,i.selectWorkflowStepFields=rs,i.selectWorkflowStepFieldsAttachmentById=NO,i.selectWorkflowStepFieldsAttachments=ca,i.selectWorkflowStepFieldsAttachmentsByIds=GO,i.selectWorkflowStepFieldsAttachmentsMapping=UO,i.selectWorkflowStepFieldsById=nF,i.selectWorkflowStepFieldsByIds=aF,i.selectWorkflowStepFieldsMapping=iF,i.selectWorkflowStepFieldsOfWorkflowStep=Nb,i.selectWorkflowStepReviewerById=Sg,i.selectWorkflowStepReviewers=vt,i.selectWorkflowStepReviewersByIds=Ag,i.selectWorkflowStepReviewersMapping=fg,i.selectWorkflowStepReviewersOfWorkflow=Qb,i.selectWorkflowStepReviewersOfWorkflowAndWorkflowStep=xb,i.selectWorkflowStepReviewersOfWorkflowStep=Xb,i.selectWorkflowSteps=Ia,i.selectWorkflowStepsByIds=vg,i.selectWorkflowStepsMapping=kg,i.selectWorkflowStepsOfWorkflowType=eR,i.selectWorkflowTypeById=Gg,i.selectWorkflowTypeMapping=Ng,i.selectWorkflowTypes=Fa,i.selectWorkflowTypesByIds=Hg,i.selectWorkflowTypesOfOrganization=tR,i.selectWorkflows=as,i.selectWorkflowsByIds=NI,i.selectWorkflowsOfProject=Bb,i.selectWorkflowsOfWorkflowType=zb,i.setAsset=Ml,i.setAssetAttachment=oc,i.setAssetAttachments=hc,i.setAssetProcedure=Ur,i.setAssetProcedureStep=ol,i.setAssetProcedureStepFieldValues=xd,i.setAssetProcedureStepFieldValuesAttachment=jd,i.setAssetProcedureStepFieldValuesAttachments=$d,i.setAssetProcedureStepFieldValuesMany=el,i.setAssetProcedureStepFields=bd,i.setAssetProcedureStepFieldsAttachment=pd,i.setAssetProcedureStepFieldsAttachments=md,i.setAssetProcedureStepFieldsMany=Rd,i.setAssetProcedureSteps=hl,i.setAssetProcedureType=id,i.setAssetProcedureTypeAttachment=Pc,i.setAssetProcedureTypeAttachments=_c,i.setAssetProcedureTypeFieldValues=_r,i.setAssetProcedureTypeFieldValuesAttachment=hr,i.setAssetProcedureTypeFieldValuesAttachments=pr,i.setAssetProcedureTypeFieldValuesMany=br,i.setAssetProcedureTypeFields=xc,i.setAssetProcedureTypeFieldsAttachment=jc,i.setAssetProcedureTypeFieldsAttachments=$c,i.setAssetProcedureTypeFieldsMany=er,i.setAssetProcedureTypes=nd,i.setAssetProcedures=Lr,i.setAssetStage=xl,i.setAssetStageCompletion=$l,i.setAssetStageCompletions=Cl,i.setAssetStages=eu,i.setAssetType=th,i.setAssetTypeAttachment=pu,i.setAssetTypeAttachments=mu,i.setAssetTypeFieldValues=yo,i.setAssetTypeFieldValuesAttachment=eo,i.setAssetTypeFieldValuesAttachments=to,i.setAssetTypeFieldValuesMany=fo,i.setAssetTypeFields=Cu,i.setAssetTypeFieldsAttachment=bu,i.setAssetTypeFieldsAttachments=Ru,i.setAssetTypeFieldsMany=Uu,i.setAssetTypeIdentifier=Mo,i.setAssetTypeIdentifierValue=Lo,i.setAssetTypeIdentifierValues=No,i.setAssetTypeIdentifiers=ko,i.setAssetTypeStatus=Sh,i.setAssetTypeStatuses=Ah,i.setAssetTypes=sh,i.setAssets=kl,i.setClientSDK=hP,i.setClientStore=uP,i.setConversation=ac,i.setConversations=e_,i.setCurrentUser=mb,i.setCurrentUserProfile=yb,i.setDocument=Yh,i.setDocumentAttachment=Bh,i.setDocumentAttachments=zh,i.setDocuments=Zh,i.setEmailDomain=dp,i.setEmailDomains=lp,i.setForm=Fm,i.setFormIdentifier=Pp,i.setFormIdentifierValue=jp,i.setFormIdentifierValues=$p,i.setFormIdentifiers=_p,i.setFormRevision=om,i.setFormRevisionAttachment=xp,i.setFormRevisionAttachments=em,i.setFormRevisions=hm,i.setFormSubmission=Km,i.setFormSubmissionAttachment=Wm,i.setFormSubmissionAttachments=qm,i.setFormSubmissions=Ym,i.setForms=gm,i.setGeoImage=cy,i.setGeoImages=ry,i.setIssue=Pf,i.setIssueAssociation=Iy,i.setIssueAssociations=wy,i.setIssueAttachment=Dy,i.setIssueAttachments=jy,i.setIssueComment=pf,i.setIssueCommentAttachment=Xy,i.setIssueCommentAttachments=xy,i.setIssueComments=mf,i.setIssueType=RA,i.setIssueTypeAttachment=jf,i.setIssueTypeAttachments=$f,i.setIssueTypeFieldValues=pS,i.setIssueTypeFieldValuesAttachment=$S,i.setIssueTypeFieldValuesAttachments=CS,i.setIssueTypeFieldValuesMany=mS,i.setIssueTypeFields=bS,i.setIssueTypeFieldsAttachment=xf,i.setIssueTypeFieldsAttachments=eS,i.setIssueTypeFieldsMany=RS,i.setIssueTypeIdentifier=eA,i.setIssueTypeIdentifierValue=mA,i.setIssueTypeIdentifierValues=yA,i.setIssueTypeIdentifiers=tA,i.setIssueTypeStatus=UA,i.setIssueTypeStatuses=LA,i.setIssueTypes=MA,i.setIssueUpdate=xA,i.setIssueUpdates=eT,i.setIssues=_f,i.setLoggedIn=Rh,i.setOrganization=zT,i.setOrganizationAccess=OT,i.setOrganizationAccesses=FT,i.setOrganizations=BT,i.setProject=Nw,i.setProjectAccess=iw,i.setProjectAccesses=nw,i.setProjectAttachment=fw,i.setProjectAttachments=Sw,i.setProjectFile=Rw,i.setProjectFiles=Mw,i.setProjects=Lw,i.setRehydrated=Rb,i.setTeam=wI,i.setTeamMembership=cI,i.setTeamMemberships=rI,i.setTeams=II,i.setTokens=W_,i.setUploadUrl=G_,i.setUser=uT,i.setUsers=lT,i.setWorkflow=WI,i.setWorkflowStep=gg,i.setWorkflowStepAssignee=JI,i.setWorkflowStepAssignees=QI,i.setWorkflowStepComment=uO,i.setWorkflowStepComments=oO,i.setWorkflowStepEvent=gO,i.setWorkflowStepEvents=PO,i.setWorkflowStepFieldValues=JF,i.setWorkflowStepFieldValuesAttachment=uF,i.setWorkflowStepFieldValuesAttachments=oF,i.setWorkflowStepFieldValuesMany=QF,i.setWorkflowStepFieldValuesReview=WF,i.setWorkflowStepFieldValuesReviewRequest=FF,i.setWorkflowStepFieldValuesReviewRequests=gF,i.setWorkflowStepFieldValuesReviews=qF,i.setWorkflowStepFields=QO,i.setWorkflowStepFieldsAttachment=qO,i.setWorkflowStepFieldsAttachments=DO,i.setWorkflowStepFieldsMany=XO,i.setWorkflowStepReviewer=ug,i.setWorkflowStepReviewers=og,i.setWorkflowSteps=Pg,i.setWorkflowType=Dg,i.setWorkflowTypes=jg,i.setWorkflows=qI,i.shallowEqual=vP,i.slugify=KP,i.spacesToDashesLower=HP,i.teamMembershipReducer=hI,i.teamMembershipSlice=Jn,i.teamReducer=MI,i.teamSlice=Qn,i.toFileNameSafeString=GP,i.toUuidArray=V,i.toUuidIdRecord=NP,i.truncate=YP,i.updateAsset=_l,i.updateAssetAttachment=pc,i.updateAssetAttachments=mc,i.updateAssetProcedure=jr,i.updateAssetProcedureStep=yl,i.updateAssetProcedureStepFieldValues=tl,i.updateAssetProcedureStepFieldValuesAttachment=Cd,i.updateAssetProcedureStepFieldValuesAttachments=Ud,i.updateAssetProcedureStepFieldValuesMany=sl,i.updateAssetProcedureStepFields=Md,i.updateAssetProcedureStepFieldsAttachment=yd,i.updateAssetProcedureStepFieldsAttachments=fd,i.updateAssetProcedureStepFieldsMany=kd,i.updateAssetProcedureSteps=fl,i.updateAssetProcedureType=xr,i.updateAssetProcedureTypeAttachment=bc,i.updateAssetProcedureTypeAttachments=Rc,i.updateAssetProcedureTypeFieldValues=Rr,i.updateAssetProcedureTypeFieldValuesAttachment=mr,i.updateAssetProcedureTypeFieldValuesAttachments=yr,i.updateAssetProcedureTypeFieldValuesMany=Mr,i.updateAssetProcedureTypeFields=tr,i.updateAssetProcedureTypeFieldsAttachment=Cc,i.updateAssetProcedureTypeFieldsAttachments=Uc,i.updateAssetProcedureTypeFieldsMany=sr,i.updateAssetProcedureTypes=ed,i.updateAssetProcedures=$r,i.updateAssetStage=iu,i.updateAssetStageCompletion=Ul,i.updateAssetStageCompletions=Ll,i.updateAssetStages=nu,i.updateAssetType=ah,i.updateAssetTypeAttachment=yu,i.updateAssetTypeAttachments=fu,i.updateAssetTypeFieldValues=So,i.updateAssetTypeFieldValuesAttachment=so,i.updateAssetTypeFieldValuesAttachments=io,i.updateAssetTypeFieldValuesMany=Ao,i.updateAssetTypeFields=Lu,i.updateAssetTypeFieldsAttachment=Mu,i.updateAssetTypeFieldsAttachments=ku,i.updateAssetTypeFieldsMany=Nu,i.updateAssetTypeIdentifier=Eo,i.updateAssetTypeIdentifierValue=Go,i.updateAssetTypeIdentifierValues=Ho,i.updateAssetTypeIdentifiers=vo,i.updateAssetTypeStatus=Th,i.updateAssetTypeStatuses=wh,i.updateAssetTypes=ch,i.updateAssets=bl,i.updateConversation=cc,i.updateConversations=t_,i.updateDocument=Jh,i.updateDocumentAttachment=Wh,i.updateDocumentAttachments=qh,i.updateDocuments=Qh,i.updateEmailDomain=up,i.updateEmailDomains=op,i.updateForm=Pm,i.updateFormIdentifier=bp,i.updateFormIdentifierValue=Cp,i.updateFormIdentifierValues=Up,i.updateFormIdentifiers=Rp,i.updateFormRevision=pm,i.updateFormRevisionAttachment=tm,i.updateFormRevisionAttachments=sm,i.updateFormRevisions=mm,i.updateFormSubmission=Jm,i.updateFormSubmissionAttachment=Dm,i.updateFormSubmissionAttachments=jm,i.updateFormSubmissions=Qm,i.updateForms=_m,i.updateGeoImage=uy,i.updateGeoImages=oy,i.updateIssue=bf,i.updateIssueAssociation=Oy,i.updateIssueAssociations=Fy,i.updateIssueAttachment=$y,i.updateIssueAttachments=Cy,i.updateIssueComment=yf,i.updateIssueCommentAttachment=ef,i.updateIssueCommentAttachments=tf,i.updateIssueComments=ff,i.updateIssueType=kA,i.updateIssueTypeAttachment=Cf,i.updateIssueTypeAttachments=Uf,i.updateIssueTypeFieldValues=yS,i.updateIssueTypeFieldValuesAttachment=US,i.updateIssueTypeFieldValuesAttachments=LS,i.updateIssueTypeFieldValuesMany=fS,i.updateIssueTypeFields=MS,i.updateIssueTypeFieldsAttachment=tS,i.updateIssueTypeFieldsAttachments=sS,i.updateIssueTypeFieldsMany=kS,i.updateIssueTypeIdentifier=sA,i.updateIssueTypeIdentifierValue=fA,i.updateIssueTypeIdentifierValues=SA,i.updateIssueTypeIdentifiers=iA,i.updateIssueTypeStatus=NA,i.updateIssueTypeStatuses=GA,i.updateIssueTypes=EA,i.updateIssueUpdate=tT,i.updateIssueUpdates=sT,i.updateIssues=Rf,i.updateOrganization=jT,i.updateOrganizationAccess=gT,i.updateOrganizationAccesses=PT,i.updateOrganizations=DT,i.updateProject=Yw,i.updateProjectAccess=aw,i.updateProjectAccesses=cw,i.updateProjectAttachment=Aw,i.updateProjectAttachments=Tw,i.updateProjectFile=vw,i.updateProjectFiles=Vw,i.updateProjects=Kw,i.updateTeam=OI,i.updateTeamMembership=dI,i.updateTeamMemberships=lI,i.updateTeams=FI,i.updateUser=pT,i.updateUsers=hT,i.updateWorkflow=DI,i.updateWorkflowStep=_g,i.updateWorkflowStepAssignee=XI,i.updateWorkflowStepAssignees=xI,i.updateWorkflowStepComment=hO,i.updateWorkflowStepComments=pO,i.updateWorkflowStepEvent=_O,i.updateWorkflowStepEvents=bO,i.updateWorkflowStepFieldValues=XF,i.updateWorkflowStepFieldValuesAttachment=hF,i.updateWorkflowStepFieldValuesAttachments=pF,i.updateWorkflowStepFieldValuesMany=xF,i.updateWorkflowStepFieldValuesReview=DF,i.updateWorkflowStepFieldValuesReviewRequest=PF,i.updateWorkflowStepFieldValuesReviewRequests=_F,i.updateWorkflowStepFieldValuesReviews=jF,i.updateWorkflowStepFields=xO,i.updateWorkflowStepFieldsAttachment=jO,i.updateWorkflowStepFieldsAttachments=$O,i.updateWorkflowStepFieldsMany=eF,i.updateWorkflowStepReviewer=hg,i.updateWorkflowStepReviewers=pg,i.updateWorkflowSteps=bg,i.updateWorkflowType=$g,i.updateWorkflowTypes=Cg,i.updateWorkflows=jI,i.useSelectorBuilder=EP,i.userReducer=yT,i.userSlice=Wn,i.uuidObj=O,i.uuidObjSortFn=fs,i.uuidSortFn=qt,i.versioningReducer=EI,i.versioningSlice=kI,i.workflowReducer=GI,i.workflowSlice=xn,i.workflowStepAssigneeReducer=aO,i.workflowStepAssigneeSlice=ea,i.workflowStepCommentReducer=TO,i.workflowStepCommentSlice=ta,i.workflowStepEventReducer=VO,i.workflowStepEventSlice=sa,i.workflowStepFieldValuesAttachmentReducer=TF,i.workflowStepFieldValuesAttachmentSlice=da,i.workflowStepFieldValuesReducer=ag,i.workflowStepFieldValuesReviewReducer=GF,i.workflowStepFieldValuesReviewRequestReducer=vF,i.workflowStepFieldValuesReviewRequestSlice=ha,i.workflowStepFieldValuesReviewSlice=ya,i.workflowStepFieldValuesSlice=Aa,i.workflowStepFieldsAttachmentReducer=HO,i.workflowStepFieldsAttachmentSlice=ia,i.workflowStepFieldsReducer=cF,i.workflowStepFieldsSlice=ra,i.workflowStepReducer=Vg,i.workflowStepReviewerReducer=Tg,i.workflowStepReviewerSlice=Ta,i.workflowStepSlice=wa,i.workflowTypeReducer=Kg,i.workflowTypeSlice=Oa,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|