@mondaydotcomorg/api
Advanced tools
Comparing version 6.0.0 to 7.0.0-beta.1
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("graphql-tag"),t=require("graphql-request");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o,n,i,a,s,u,d,l,p,c,m,_,v,I,h,g,x,b,O,f,y,E,C,A,D,N,T,P,B,S,L,R,$,k,w=r(e),V=function(){return V=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},V.apply(this,arguments)};function G(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))}function F(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}"function"==typeof SuppressedError&&SuppressedError,exports.AssetsSource=void 0,(o=exports.AssetsSource||(exports.AssetsSource={})).All="all",o.Columns="columns",o.Gallery="gallery",exports.BoardAttributes=void 0,(n=exports.BoardAttributes||(exports.BoardAttributes={})).Communication="communication",n.Description="description",n.Name="name",exports.BoardEditPermissions=void 0,(i=exports.BoardEditPermissions||(exports.BoardEditPermissions={})).Assignee="assignee",i.Collaborators="collaborators",i.Everyone="everyone",i.Owners="owners",exports.BoardKind=void 0,(a=exports.BoardKind||(exports.BoardKind={})).Private="private",a.Public="public",a.Share="share",exports.BoardObjectType=void 0,(s=exports.BoardObjectType||(exports.BoardObjectType={})).Board="board",s.CustomObject="custom_object",s.Document="document",s.SubItemsBoard="sub_items_board",exports.BoardSubscriberKind=void 0,(u=exports.BoardSubscriberKind||(exports.BoardSubscriberKind={})).Owner="owner",u.Subscriber="subscriber",exports.BoardViewPermissions=void 0,(exports.BoardViewPermissions||(exports.BoardViewPermissions={})).AnyAssigneeColumn="any_assignee_column",exports.BoardsOrderBy=void 0,(d=exports.BoardsOrderBy||(exports.BoardsOrderBy={})).CreatedAt="created_at",d.UsedAt="used_at",exports.ColumnProperty=void 0,(l=exports.ColumnProperty||(exports.ColumnProperty={})).Description="description",l.Title="title",exports.ColumnType=void 0,(p=exports.ColumnType||(exports.ColumnType={})).AutoNumber="auto_number",p.BoardRelation="board_relation",p.Button="button",p.Checkbox="checkbox",p.ColorPicker="color_picker",p.Country="country",p.CreationLog="creation_log",p.Date="date",p.Dependency="dependency",p.Doc="doc",p.Dropdown="dropdown",p.Email="email",p.File="file",p.Formula="formula",p.Group="group",p.Hour="hour",p.Integration="integration",p.ItemAssignees="item_assignees",p.ItemId="item_id",p.LastUpdated="last_updated",p.Link="link",p.Location="location",p.LongText="long_text",p.Mirror="mirror",p.Name="name",p.Numbers="numbers",p.People="people",p.Person="person",p.Phone="phone",p.Progress="progress",p.Rating="rating",p.Status="status",p.Subtasks="subtasks",p.Tags="tags",p.Team="team",p.Text="text",p.TimeTracking="time_tracking",p.Timeline="timeline",p.Unsupported="unsupported",p.Vote="vote",p.Week="week",p.WorldClock="world_clock",exports.CustomActivityColor=void 0,(c=exports.CustomActivityColor||(exports.CustomActivityColor={})).BrinkPink="BRINK_PINK",c.CelticBlue="CELTIC_BLUE",c.CornflowerBlue="CORNFLOWER_BLUE",c.DingyDungeon="DINGY_DUNGEON",c.GoGreen="GO_GREEN",c.Gray="GRAY",c.LightDeepPink="LIGHT_DEEP_PINK",c.LightHotPink="LIGHT_HOT_PINK",c.MayaBlue="MAYA_BLUE",c.MediumTurquoise="MEDIUM_TURQUOISE",c.ParadisePink="PARADISE_PINK",c.PhilippineGreen="PHILIPPINE_GREEN",c.PhilippineYellow="PHILIPPINE_YELLOW",c.SlateBlue="SLATE_BLUE",c.VividCerulean="VIVID_CERULEAN",c.YankeesBlue="YANKEES_BLUE",c.YellowGreen="YELLOW_GREEN",c.YellowOrange="YELLOW_ORANGE",exports.CustomActivityIcon=void 0,(m=exports.CustomActivityIcon||(exports.CustomActivityIcon={})).Ascending="ASCENDING",m.Camera="CAMERA",m.Conference="CONFERENCE",m.Flag="FLAG",m.Gift="GIFT",m.Headphones="HEADPHONES",m.Homekeys="HOMEKEYS",m.Location="LOCATION",m.Notebook="NOTEBOOK",m.Paperplane="PAPERPLANE",m.Plane="PLANE",m.Pliers="PLIERS",m.Tripod="TRIPOD",m.Twoflags="TWOFLAGS",m.Utencils="UTENCILS",exports.DiscountPeriod=void 0,(_=exports.DiscountPeriod||(exports.DiscountPeriod={})).Monthly="MONTHLY",_.Yearly="YEARLY",exports.DocBlockContentType=void 0,(v=exports.DocBlockContentType||(exports.DocBlockContentType={})).BulletedList="bulleted_list",v.CheckList="check_list",v.Code="code",v.Divider="divider",v.Image="image",v.LargeTitle="large_title",v.Layout="layout",v.MediumTitle="medium_title",v.NormalText="normal_text",v.NoticeBox="notice_box",v.NumberedList="numbered_list",v.Quote="quote",v.SmallTitle="small_title",v.Table="table",v.Video="video",exports.DocsOrderBy=void 0,(I=exports.DocsOrderBy||(exports.DocsOrderBy={})).CreatedAt="created_at",I.UsedAt="used_at",exports.DuplicateBoardType=void 0,(h=exports.DuplicateBoardType||(exports.DuplicateBoardType={})).DuplicateBoardWithPulses="duplicate_board_with_pulses",h.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",h.DuplicateBoardWithStructure="duplicate_board_with_structure",exports.FileLinkValueKind=void 0,(g=exports.FileLinkValueKind||(exports.FileLinkValueKind={})).Box="box",g.Dropbox="dropbox",g.GoogleDrive="google_drive",g.Link="link",g.Onedrive="onedrive",exports.FirstDayOfTheWeek=void 0,(x=exports.FirstDayOfTheWeek||(exports.FirstDayOfTheWeek={})).Monday="monday",x.Sunday="sunday",exports.FolderColor=void 0,(b=exports.FolderColor||(exports.FolderColor={})).Aquamarine="AQUAMARINE",b.BrightBlue="BRIGHT_BLUE",b.BrightGreen="BRIGHT_GREEN",b.ChiliBlue="CHILI_BLUE",b.DarkOrange="DARK_ORANGE",b.DarkPurple="DARK_PURPLE",b.DarkRed="DARK_RED",b.DoneGreen="DONE_GREEN",b.Indigo="INDIGO",b.Lipstick="LIPSTICK",b.Null="NULL",b.Purple="PURPLE",b.SofiaPink="SOFIA_PINK",b.StuckRed="STUCK_RED",b.Sunset="SUNSET",b.WorkingOrange="WORKING_ORANGE",exports.FolderCustomIcon=void 0,(O=exports.FolderCustomIcon||(exports.FolderCustomIcon={})).Folder="FOLDER",O.Morebelow="MOREBELOW",O.Morebelowfilled="MOREBELOWFILLED",O.Null="NULL",O.Work="WORK",exports.FolderFontWeight=void 0,(f=exports.FolderFontWeight||(exports.FolderFontWeight={})).FontWeightBold="FONT_WEIGHT_BOLD",f.FontWeightLight="FONT_WEIGHT_LIGHT",f.FontWeightNormal="FONT_WEIGHT_NORMAL",f.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",f.Null="NULL",exports.GroupAttributes=void 0,(y=exports.GroupAttributes||(exports.GroupAttributes={})).Color="color",y.Position="position",y.RelativePositionAfter="relative_position_after",y.RelativePositionBefore="relative_position_before",y.Title="title",exports.ItemsOrderByDirection=void 0,(E=exports.ItemsOrderByDirection||(exports.ItemsOrderByDirection={})).Asc="asc",E.Desc="desc",exports.ItemsQueryOperator=void 0,(C=exports.ItemsQueryOperator||(exports.ItemsQueryOperator={})).And="and",C.Or="or",exports.ItemsQueryRuleOperator=void 0,(A=exports.ItemsQueryRuleOperator||(exports.ItemsQueryRuleOperator={})).AnyOf="any_of",A.Between="between",A.ContainsTerms="contains_terms",A.ContainsText="contains_text",A.EndsWith="ends_with",A.GreaterThan="greater_than",A.GreaterThanOrEquals="greater_than_or_equals",A.IsEmpty="is_empty",A.IsNotEmpty="is_not_empty",A.LowerThan="lower_than",A.LowerThanOrEqual="lower_than_or_equal",A.NotAnyOf="not_any_of",A.NotContainsText="not_contains_text",A.StartsWith="starts_with",A.WithinTheLast="within_the_last",A.WithinTheNext="within_the_next",exports.Kind=void 0,(D=exports.Kind||(exports.Kind={})).Person="person",D.Team="team",exports.NotificationTargetType=void 0,(N=exports.NotificationTargetType||(exports.NotificationTargetType={})).Post="Post",N.Project="Project",exports.NumberValueUnitDirection=void 0,(T=exports.NumberValueUnitDirection||(exports.NumberValueUnitDirection={})).Left="left",T.Right="right",exports.PositionRelative=void 0,(P=exports.PositionRelative||(exports.PositionRelative={})).AfterAt="after_at",P.BeforeAt="before_at",exports.State=void 0,(B=exports.State||(exports.State={})).Active="active",B.All="all",B.Archived="archived",B.Deleted="deleted",exports.UserKind=void 0,(S=exports.UserKind||(exports.UserKind={})).All="all",S.Guests="guests",S.NonGuests="non_guests",S.NonPending="non_pending",exports.VersionKind=void 0,(L=exports.VersionKind||(exports.VersionKind={})).Current="current",L.Deprecated="deprecated",L.Dev="dev",L.Maintenance="maintenance",L.OldMaintenance="old__maintenance",L.OldPreviousMaintenance="old_previous_maintenance",L.PreviousMaintenance="previous_maintenance",L.ReleaseCandidate="release_candidate",exports.WebhookEventType=void 0,(R=exports.WebhookEventType||(exports.WebhookEventType={})).ChangeColumnValue="change_column_value",R.ChangeName="change_name",R.ChangeSpecificColumnValue="change_specific_column_value",R.ChangeStatusColumnValue="change_status_column_value",R.ChangeSubitemColumnValue="change_subitem_column_value",R.ChangeSubitemName="change_subitem_name",R.CreateColumn="create_column",R.CreateItem="create_item",R.CreateSubitem="create_subitem",R.CreateSubitemUpdate="create_subitem_update",R.CreateUpdate="create_update",R.DeleteUpdate="delete_update",R.EditUpdate="edit_update",R.ItemArchived="item_archived",R.ItemDeleted="item_deleted",R.ItemMovedToAnyGroup="item_moved_to_any_group",R.ItemMovedToSpecificGroup="item_moved_to_specific_group",R.ItemRestored="item_restored",R.MoveSubitem="move_subitem",R.SubitemArchived="subitem_archived",R.SubitemDeleted="subitem_deleted",exports.WorkspaceKind=void 0,($=exports.WorkspaceKind||(exports.WorkspaceKind={})).Closed="closed",$.Open="open",exports.WorkspaceSubscriberKind=void 0,(k=exports.WorkspaceSubscriberKind||(exports.WorkspaceSubscriberKind={})).Owner="owner",k.Subscriber="subscriber",exports.WorkspacesOrderBy=void 0,(exports.WorkspacesOrderBy||(exports.WorkspacesOrderBy={})).CreatedAt="created_at";var U,W,q,K,H,Y,j,Q,J,z=w.default(U||(U=M(["\n fragment UserFields on User {\n id\n name\n email\n }\n"],["\n fragment UserFields on User {\n id\n name\n email\n }\n"]))),X=w.default(W||(W=M(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),z),Z=w.default(q||(q=M(["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),ee=w.default(K||(K=M(["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),te=w.default(H||(H=M(["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"],["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"]))),re=w.default(Y||(Y=M(["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"],["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"]))),oe=w.default(j||(j=M(["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"],["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"]))),ne=w.default(Q||(Q=M(["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"],["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"]))),ie=function(e,t,r,o){return e()};function ae(e,t){return void 0===t&&(t=ie),{getMeOp:function(r,o){return t((function(t){return e.request(X,r,V(V({},o),t))}),"getMeOp","query",r)},changeSimpleColumnValueOp:function(r,o){return t((function(t){return e.request(Z,r,V(V({},o),t))}),"changeSimpleColumnValueOp","mutation",r)},changeColumnValueOp:function(r,o){return t((function(t){return e.request(ee,r,V(V({},o),t))}),"changeColumnValueOp","mutation",r)},createItemOp:function(r,o){return t((function(t){return e.request(te,r,V(V({},o),t))}),"createItemOp","mutation",r)},changeMultipleColumnValuesOp:function(r,o){return t((function(t){return e.request(re,r,V(V({},o),t))}),"changeMultipleColumnValuesOp","mutation",r)},getBoardItemsOp:function(r,o){return t((function(t){return e.request(oe,r,V(V({},o),t))}),"getBoardItemsOp","query",r)},getBoardGroupsOp:function(r,o){return t((function(t){return e.request(ne,r,V(V({},o),t))}),"getBoardGroupsOp","query",r)}}}exports.AvailableVersions=void 0,(J=exports.AvailableVersions||(exports.AvailableVersions={})).DEPRECATED="deprecated",J.MAINTENANCE="maintenance",J.CURRENT="current",J.RELEASE_CANDIDATE="release_candidate",J.DEV="dev",J.CURRENT_VERSION="2024-10";var se="https://api.monday.com/v2",ue=exports.AvailableVersions.CURRENT_VERSION,de="6.0.0",le=function(){function e(e){var r=this;this.request=function(e,t){return G(r,void 0,void 0,(function(){return F(this,(function(r){switch(r.label){case 0:return[4,this.client.request(e,t)];case 1:return[2,r.sent()]}}))}))},this.rawRequest=function(e,t){return G(r,void 0,void 0,(function(){return F(this,(function(r){switch(r.label){case 0:return[4,this.client.rawRequest(e,t)];case 1:return[2,r.sent()]}}))}))};var o=e.token,n=e.apiVersion,i=void 0===n?ue:n,a=e.requestConfig,s=void 0===a?{}:a;if(!this.isValidApiVersion(i))throw new Error("Invalid API version format. Expected format is 'yyyy-mm' with month as one of '01', '04', '07', or '10'.");this.apiVersion=i;var u=function(){if(process.env.MONDAY_API_ENDPOINT)return process.env.MONDAY_API_ENDPOINT;var e=process.env.PLATFORM_API;if(e)try{var t=JSON.parse(e);if(t.PLATFORM_API_ENDPOINT)return t.PLATFORM_API_ENDPOINT}catch(e){console.error("Failed to parse PLATFORM_API secret",e)}return se}();this.client=new t.GraphQLClient(u,V(V({},s),{headers:{"Content-Type":"application/json",Authorization:o,"API-Version":this.apiVersion,"Api-Sdk-Version":de}})),this.operations=ae(this.client)}return e.prototype.isValidApiVersion=function(e){return/^\d{4}-(01|04|07|10)$/.test(e)},e}(),pe=function(){function e(e){void 0===e&&(e=ue),this.listeners={},this.generateRequestId=function(){return Math.random().toString(36).substring(2,9)},this.apiVersion=e,window.addEventListener("message",this.receiveMessage.bind(this),!1)}return e.prototype.request=function(e,t,r,o){var n=this;return void 0===o&&(o=6e4),new Promise((function(i,a){var s=n.generateRequestId(),u={query:e,variables:t},d=r||n.apiVersion;window.parent.postMessage({method:"api",args:{params:u,apiVersion:d},requestId:s},"*");var l=setTimeout((function(){a(new Error("Request timed out"))}),o),p=n.addListener(s,(function(e){clearTimeout(l),p(),e.errorMessage?a(new Error("".concat(e.errorMessage," - ").concat(e.data))):i(e)}))}))},e.prototype.addListener=function(e,t){var r=this,o=this.listeners[e]||new Set;return o.add(t),this.listeners[e]=o,function(){o.delete(t),0===o.size&&delete r.listeners[e]}},e.prototype.receiveMessage=function(e){var t=e.data.requestId,r=this.listeners[t];r&&r.forEach((function(t){return t(e.data)}))},e}();Object.defineProperty(exports,"ClientError",{enumerable:!0,get:function(){return t.ClientError}}),exports.ApiClient=le,exports.ChangeColumnValueOpDocument=ee,exports.ChangeMultipleColumnValuesOpDocument=re,exports.ChangeSimpleColumnValueOpDocument=Z,exports.CreateItemOpDocument=te,exports.DEFAULT_VERSION=ue,exports.GetBoardGroupsOpDocument=ne,exports.GetBoardItemsOpDocument=oe,exports.GetMeOpDocument=X,exports.MONDAY_API_ENDPOINT=se,exports.SeamlessApiClient=pe,exports.UserFieldsFragmentDoc=z,exports.getSdk=ae; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("graphql-tag"),t=require("graphql-request");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e),n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};var i,a,s,u,d,l,p,c,m,_,v,I,h,g,x,b,O,f,y,E,C,A,D,N,T,P,B,S,L,R,w,$,k,V,G=function(){return G=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},G.apply(this,arguments)};function F(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((o=o.apply(e,t||[])).next())}))}function M(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function U(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}"function"==typeof SuppressedError&&SuppressedError,exports.AssetsSource=void 0,(i=exports.AssetsSource||(exports.AssetsSource={})).All="all",i.Columns="columns",i.Gallery="gallery",exports.BoardAttributes=void 0,(a=exports.BoardAttributes||(exports.BoardAttributes={})).Communication="communication",a.Description="description",a.Name="name",exports.BoardEditPermissions=void 0,(s=exports.BoardEditPermissions||(exports.BoardEditPermissions={})).Assignee="assignee",s.Collaborators="collaborators",s.Everyone="everyone",s.Owners="owners",exports.BoardKind=void 0,(u=exports.BoardKind||(exports.BoardKind={})).Private="private",u.Public="public",u.Share="share",exports.BoardObjectType=void 0,(d=exports.BoardObjectType||(exports.BoardObjectType={})).Board="board",d.CustomObject="custom_object",d.Document="document",d.SubItemsBoard="sub_items_board",exports.BoardSubscriberKind=void 0,(l=exports.BoardSubscriberKind||(exports.BoardSubscriberKind={})).Owner="owner",l.Subscriber="subscriber",exports.BoardViewPermissions=void 0,(exports.BoardViewPermissions||(exports.BoardViewPermissions={})).AnyAssigneeColumn="any_assignee_column",exports.BoardsOrderBy=void 0,(p=exports.BoardsOrderBy||(exports.BoardsOrderBy={})).CreatedAt="created_at",p.UsedAt="used_at",exports.ColumnProperty=void 0,(c=exports.ColumnProperty||(exports.ColumnProperty={})).Description="description",c.Title="title",exports.ColumnType=void 0,(m=exports.ColumnType||(exports.ColumnType={})).AutoNumber="auto_number",m.BoardRelation="board_relation",m.Button="button",m.Checkbox="checkbox",m.ColorPicker="color_picker",m.Country="country",m.CreationLog="creation_log",m.Date="date",m.Dependency="dependency",m.Doc="doc",m.Dropdown="dropdown",m.Email="email",m.File="file",m.Formula="formula",m.Group="group",m.Hour="hour",m.Integration="integration",m.ItemAssignees="item_assignees",m.ItemId="item_id",m.LastUpdated="last_updated",m.Link="link",m.Location="location",m.LongText="long_text",m.Mirror="mirror",m.Name="name",m.Numbers="numbers",m.People="people",m.Person="person",m.Phone="phone",m.Progress="progress",m.Rating="rating",m.Status="status",m.Subtasks="subtasks",m.Tags="tags",m.Team="team",m.Text="text",m.TimeTracking="time_tracking",m.Timeline="timeline",m.Unsupported="unsupported",m.Vote="vote",m.Week="week",m.WorldClock="world_clock",exports.CustomActivityColor=void 0,(_=exports.CustomActivityColor||(exports.CustomActivityColor={})).BrinkPink="BRINK_PINK",_.CelticBlue="CELTIC_BLUE",_.CornflowerBlue="CORNFLOWER_BLUE",_.DingyDungeon="DINGY_DUNGEON",_.GoGreen="GO_GREEN",_.Gray="GRAY",_.LightDeepPink="LIGHT_DEEP_PINK",_.LightHotPink="LIGHT_HOT_PINK",_.MayaBlue="MAYA_BLUE",_.MediumTurquoise="MEDIUM_TURQUOISE",_.ParadisePink="PARADISE_PINK",_.PhilippineGreen="PHILIPPINE_GREEN",_.PhilippineYellow="PHILIPPINE_YELLOW",_.SlateBlue="SLATE_BLUE",_.VividCerulean="VIVID_CERULEAN",_.YankeesBlue="YANKEES_BLUE",_.YellowGreen="YELLOW_GREEN",_.YellowOrange="YELLOW_ORANGE",exports.CustomActivityIcon=void 0,(v=exports.CustomActivityIcon||(exports.CustomActivityIcon={})).Ascending="ASCENDING",v.Camera="CAMERA",v.Conference="CONFERENCE",v.Flag="FLAG",v.Gift="GIFT",v.Headphones="HEADPHONES",v.Homekeys="HOMEKEYS",v.Location="LOCATION",v.Notebook="NOTEBOOK",v.Paperplane="PAPERPLANE",v.Plane="PLANE",v.Pliers="PLIERS",v.Tripod="TRIPOD",v.Twoflags="TWOFLAGS",v.Utencils="UTENCILS",exports.DiscountPeriod=void 0,(I=exports.DiscountPeriod||(exports.DiscountPeriod={})).Monthly="MONTHLY",I.Yearly="YEARLY",exports.DocBlockContentType=void 0,(h=exports.DocBlockContentType||(exports.DocBlockContentType={})).BulletedList="bulleted_list",h.CheckList="check_list",h.Code="code",h.Divider="divider",h.Image="image",h.LargeTitle="large_title",h.Layout="layout",h.MediumTitle="medium_title",h.NormalText="normal_text",h.NoticeBox="notice_box",h.NumberedList="numbered_list",h.Quote="quote",h.SmallTitle="small_title",h.Table="table",h.Video="video",exports.DocsOrderBy=void 0,(g=exports.DocsOrderBy||(exports.DocsOrderBy={})).CreatedAt="created_at",g.UsedAt="used_at",exports.DuplicateBoardType=void 0,(x=exports.DuplicateBoardType||(exports.DuplicateBoardType={})).DuplicateBoardWithPulses="duplicate_board_with_pulses",x.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",x.DuplicateBoardWithStructure="duplicate_board_with_structure",exports.FileLinkValueKind=void 0,(b=exports.FileLinkValueKind||(exports.FileLinkValueKind={})).Box="box",b.Dropbox="dropbox",b.GoogleDrive="google_drive",b.Link="link",b.Onedrive="onedrive",exports.FirstDayOfTheWeek=void 0,(O=exports.FirstDayOfTheWeek||(exports.FirstDayOfTheWeek={})).Monday="monday",O.Sunday="sunday",exports.FolderColor=void 0,(f=exports.FolderColor||(exports.FolderColor={})).Aquamarine="AQUAMARINE",f.BrightBlue="BRIGHT_BLUE",f.BrightGreen="BRIGHT_GREEN",f.ChiliBlue="CHILI_BLUE",f.DarkOrange="DARK_ORANGE",f.DarkPurple="DARK_PURPLE",f.DarkRed="DARK_RED",f.DoneGreen="DONE_GREEN",f.Indigo="INDIGO",f.Lipstick="LIPSTICK",f.Null="NULL",f.Purple="PURPLE",f.SofiaPink="SOFIA_PINK",f.StuckRed="STUCK_RED",f.Sunset="SUNSET",f.WorkingOrange="WORKING_ORANGE",exports.FolderCustomIcon=void 0,(y=exports.FolderCustomIcon||(exports.FolderCustomIcon={})).Folder="FOLDER",y.Morebelow="MOREBELOW",y.Morebelowfilled="MOREBELOWFILLED",y.Null="NULL",y.Work="WORK",exports.FolderFontWeight=void 0,(E=exports.FolderFontWeight||(exports.FolderFontWeight={})).FontWeightBold="FONT_WEIGHT_BOLD",E.FontWeightLight="FONT_WEIGHT_LIGHT",E.FontWeightNormal="FONT_WEIGHT_NORMAL",E.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",E.Null="NULL",exports.GroupAttributes=void 0,(C=exports.GroupAttributes||(exports.GroupAttributes={})).Color="color",C.Position="position",C.RelativePositionAfter="relative_position_after",C.RelativePositionBefore="relative_position_before",C.Title="title",exports.ItemsOrderByDirection=void 0,(A=exports.ItemsOrderByDirection||(exports.ItemsOrderByDirection={})).Asc="asc",A.Desc="desc",exports.ItemsQueryOperator=void 0,(D=exports.ItemsQueryOperator||(exports.ItemsQueryOperator={})).And="and",D.Or="or",exports.ItemsQueryRuleOperator=void 0,(N=exports.ItemsQueryRuleOperator||(exports.ItemsQueryRuleOperator={})).AnyOf="any_of",N.Between="between",N.ContainsTerms="contains_terms",N.ContainsText="contains_text",N.EndsWith="ends_with",N.GreaterThan="greater_than",N.GreaterThanOrEquals="greater_than_or_equals",N.IsEmpty="is_empty",N.IsNotEmpty="is_not_empty",N.LowerThan="lower_than",N.LowerThanOrEqual="lower_than_or_equal",N.NotAnyOf="not_any_of",N.NotContainsText="not_contains_text",N.StartsWith="starts_with",N.WithinTheLast="within_the_last",N.WithinTheNext="within_the_next",exports.Kind=void 0,(T=exports.Kind||(exports.Kind={})).Person="person",T.Team="team",exports.NotificationTargetType=void 0,(P=exports.NotificationTargetType||(exports.NotificationTargetType={})).Post="Post",P.Project="Project",exports.NumberValueUnitDirection=void 0,(B=exports.NumberValueUnitDirection||(exports.NumberValueUnitDirection={})).Left="left",B.Right="right",exports.PositionRelative=void 0,(S=exports.PositionRelative||(exports.PositionRelative={})).AfterAt="after_at",S.BeforeAt="before_at",exports.State=void 0,(L=exports.State||(exports.State={})).Active="active",L.All="all",L.Archived="archived",L.Deleted="deleted",exports.UserKind=void 0,(R=exports.UserKind||(exports.UserKind={})).All="all",R.Guests="guests",R.NonGuests="non_guests",R.NonPending="non_pending",exports.VersionKind=void 0,(w=exports.VersionKind||(exports.VersionKind={})).Current="current",w.Deprecated="deprecated",w.Dev="dev",w.Maintenance="maintenance",w.OldMaintenance="old__maintenance",w.OldPreviousMaintenance="old_previous_maintenance",w.PreviousMaintenance="previous_maintenance",w.ReleaseCandidate="release_candidate",exports.WebhookEventType=void 0,($=exports.WebhookEventType||(exports.WebhookEventType={})).ChangeColumnValue="change_column_value",$.ChangeName="change_name",$.ChangeSpecificColumnValue="change_specific_column_value",$.ChangeStatusColumnValue="change_status_column_value",$.ChangeSubitemColumnValue="change_subitem_column_value",$.ChangeSubitemName="change_subitem_name",$.CreateColumn="create_column",$.CreateItem="create_item",$.CreateSubitem="create_subitem",$.CreateSubitemUpdate="create_subitem_update",$.CreateUpdate="create_update",$.DeleteUpdate="delete_update",$.EditUpdate="edit_update",$.ItemArchived="item_archived",$.ItemDeleted="item_deleted",$.ItemMovedToAnyGroup="item_moved_to_any_group",$.ItemMovedToSpecificGroup="item_moved_to_specific_group",$.ItemRestored="item_restored",$.MoveSubitem="move_subitem",$.SubitemArchived="subitem_archived",$.SubitemDeleted="subitem_deleted",exports.WorkspaceKind=void 0,(k=exports.WorkspaceKind||(exports.WorkspaceKind={})).Closed="closed",k.Open="open",exports.WorkspaceSubscriberKind=void 0,(V=exports.WorkspaceSubscriberKind||(exports.WorkspaceSubscriberKind={})).Owner="owner",V.Subscriber="subscriber",exports.WorkspacesOrderBy=void 0,(exports.WorkspacesOrderBy||(exports.WorkspacesOrderBy={})).CreatedAt="created_at";var W,q,K,H,Y,j,Q,J,z,X=o.default(W||(W=U(["\n fragment UserFields on User {\n id\n name\n email\n }\n"],["\n fragment UserFields on User {\n id\n name\n email\n }\n"]))),Z=o.default(q||(q=U(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),X),ee=o.default(K||(K=U(["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),te=o.default(H||(H=U(["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),re=o.default(Y||(Y=U(["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"],["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"]))),oe=o.default(j||(j=U(["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"],["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"]))),ne=o.default(Q||(Q=U(["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"],["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"]))),ie=o.default(J||(J=U(["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"],["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"]))),ae=function(e,t,r,o){return e()};function se(e,t){return void 0===t&&(t=ae),{getMeOp:function(r,o){return t((function(t){return e.request(Z,r,G(G({},o),t))}),"getMeOp","query",r)},changeSimpleColumnValueOp:function(r,o){return t((function(t){return e.request(ee,r,G(G({},o),t))}),"changeSimpleColumnValueOp","mutation",r)},changeColumnValueOp:function(r,o){return t((function(t){return e.request(te,r,G(G({},o),t))}),"changeColumnValueOp","mutation",r)},createItemOp:function(r,o){return t((function(t){return e.request(re,r,G(G({},o),t))}),"createItemOp","mutation",r)},changeMultipleColumnValuesOp:function(r,o){return t((function(t){return e.request(oe,r,G(G({},o),t))}),"changeMultipleColumnValuesOp","mutation",r)},getBoardItemsOp:function(r,o){return t((function(t){return e.request(ne,r,G(G({},o),t))}),"getBoardItemsOp","query",r)},getBoardGroupsOp:function(r,o){return t((function(t){return e.request(ie,r,G(G({},o),t))}),"getBoardGroupsOp","query",r)}}}exports.AvailableVersions=void 0,(z=exports.AvailableVersions||(exports.AvailableVersions={})).DEPRECATED="deprecated",z.MAINTENANCE="maintenance",z.CURRENT="current",z.RELEASE_CANDIDATE="release_candidate",z.DEV="dev",z.CURRENT_VERSION="2024-10";var ue="https://api.monday.com/v2",de=exports.AvailableVersions.CURRENT_VERSION,le="7.0.0",pe=function(){function e(e){var r=this;this.request=function(e,t){return F(r,void 0,void 0,(function(){return M(this,(function(r){switch(r.label){case 0:return[4,this.client.request(e,t)];case 1:return[2,r.sent()]}}))}))},this.rawRequest=function(e,t){return F(r,void 0,void 0,(function(){return M(this,(function(r){switch(r.label){case 0:return[4,this.client.rawRequest(e,t)];case 1:return[2,r.sent()]}}))}))};var o=e.token,n=e.apiVersion,i=void 0===n?de:n,a=e.requestConfig,s=void 0===a?{}:a;if(!this.isValidApiVersion(i))throw new Error("Invalid API version format. Expected format is 'yyyy-mm' with month as one of '01', '04', '07', or '10'.");this.apiVersion=i;var u=function(){if(process.env.MONDAY_API_ENDPOINT)return process.env.MONDAY_API_ENDPOINT;var e=process.env.PLATFORM_API;if(e)try{var t=JSON.parse(e);if(t.PLATFORM_API_ENDPOINT)return t.PLATFORM_API_ENDPOINT}catch(e){console.error("Failed to parse PLATFORM_API secret",e)}return ue}();this.client=new t.GraphQLClient(u,G(G({},s),{headers:{"Content-Type":"application/json",Authorization:o,"API-Version":this.apiVersion,"Api-Sdk-Version":le}})),this.operations=se(this.client)}return e.prototype.isValidApiVersion=function(e){return/^\d{4}-(01|04|07|10)$/.test(e)},e}(),ce=function(e){function t(t,r){var o=e.call(this,t)||this;return o.errors=r,o.name=o.constructor.name,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t}(Error),me=function(){function e(e){void 0===e&&(e=de),this.listeners={},this.generateRequestId=function(){return Math.random().toString(36).substring(2,9)},this.apiVersion=e,window.addEventListener("message",this.receiveMessage.bind(this),!1)}return e.prototype.request=function(e,t,r,o){var n=this;return void 0===o&&(o=6e4),new Promise((function(i,a){var s=n.generateRequestId(),u={query:e,variables:t},d=r||n.apiVersion;window.parent.postMessage({method:"api",args:{params:u,apiVersion:d},requestId:s},"*");var l=setTimeout((function(){a(new Error("Request timed out"))}),o),p=n.addListener(s,(function(e){if(clearTimeout(l),p(),e.errorMessage){var t=new ce(e.errorMessage,e.data);a(t)}else i(e)}))}))},e.prototype.addListener=function(e,t){var r=this,o=this.listeners[e]||new Set;return o.add(t),this.listeners[e]=o,function(){o.delete(t),0===o.size&&delete r.listeners[e]}},e.prototype.receiveMessage=function(e){var t=e.data.requestId,r=this.listeners[t];r&&r.forEach((function(t){return t(e.data)}))},e}();Object.defineProperty(exports,"ClientError",{enumerable:!0,get:function(){return t.ClientError}}),exports.ApiClient=pe,exports.ChangeColumnValueOpDocument=te,exports.ChangeMultipleColumnValuesOpDocument=oe,exports.ChangeSimpleColumnValueOpDocument=ee,exports.CreateItemOpDocument=re,exports.DEFAULT_VERSION=de,exports.GetBoardGroupsOpDocument=ie,exports.GetBoardItemsOpDocument=ne,exports.GetMeOpDocument=Z,exports.MONDAY_API_ENDPOINT=ue,exports.SeamlessApiClient=me,exports.UserFieldsFragmentDoc=X,exports.getSdk=se; | ||
//# sourceMappingURL=index.js.map |
@@ -12,3 +12,3 @@ import { ApiVersionType, QueryVariables } from './constants'; | ||
/** | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Can be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Cann be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* Defaults to the version corresponding to the package version release (which will be the current), | ||
@@ -15,0 +15,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
import e from"graphql-tag";import{GraphQLClient as n}from"graphql-request";export{ClientError}from"graphql-request";var t,i,r,o,a,u,l,s,d,c,m,_,p,f,I,g,h,v,b,E,O,N,A,P,C,L,y,D,T,S,R,$,w,G,B,M,V=function(){return V=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},V.apply(this,arguments)};function k(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function u(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}l((i=i.apply(e,n||[])).next())}))}function q(e,n){var t,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(t=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,i=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(6===u[0]&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],i=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function U(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e}"function"==typeof SuppressedError&&SuppressedError,function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(t||(t={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(i||(i={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(r||(r={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(o||(o={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(a||(a={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(u||(u={})),function(e){e.AnyAssigneeColumn="any_assignee_column"}(l||(l={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(s||(s={})),function(e){e.Description="description",e.Title="title"}(d||(d={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(c||(c={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(m||(m={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(_||(_={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(p||(p={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(f||(f={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(I||(I={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(g||(g={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(h||(h={})),function(e){e.Monday="monday",e.Sunday="sunday"}(v||(v={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(b||(b={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(E||(E={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(O||(O={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(N||(N={})),function(e){e.Asc="asc",e.Desc="desc"}(A||(A={})),function(e){e.And="and",e.Or="or"}(P||(P={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(C||(C={})),function(e){e.Person="person",e.Team="team"}(L||(L={})),function(e){e.Post="Post",e.Project="Project"}(y||(y={})),function(e){e.Left="left",e.Right="right"}(D||(D={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(T||(T={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(S||(S={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(R||(R={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}($||($={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(w||(w={})),function(e){e.Closed="closed",e.Open="open"}(G||(G={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(B||(B={})),function(e){e.CreatedAt="created_at"}(M||(M={}));var F,x,W,H,Y,K,j,J,Q,z=e(F||(F=U(["\n fragment UserFields on User {\n id\n name\n email\n }\n"],["\n fragment UserFields on User {\n id\n name\n email\n }\n"]))),X=e(x||(x=U(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),z),Z=e(W||(W=U(["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),ee=e(H||(H=U(["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),ne=e(Y||(Y=U(["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"],["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"]))),te=e(K||(K=U(["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"],["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"]))),ie=e(j||(j=U(["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"],["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"]))),re=e(J||(J=U(["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"],["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"]))),oe=function(e,n,t,i){return e()};function ae(e,n){return void 0===n&&(n=oe),{getMeOp:function(t,i){return n((function(n){return e.request(X,t,V(V({},i),n))}),"getMeOp","query",t)},changeSimpleColumnValueOp:function(t,i){return n((function(n){return e.request(Z,t,V(V({},i),n))}),"changeSimpleColumnValueOp","mutation",t)},changeColumnValueOp:function(t,i){return n((function(n){return e.request(ee,t,V(V({},i),n))}),"changeColumnValueOp","mutation",t)},createItemOp:function(t,i){return n((function(n){return e.request(ne,t,V(V({},i),n))}),"createItemOp","mutation",t)},changeMultipleColumnValuesOp:function(t,i){return n((function(n){return e.request(te,t,V(V({},i),n))}),"changeMultipleColumnValuesOp","mutation",t)},getBoardItemsOp:function(t,i){return n((function(n){return e.request(ie,t,V(V({},i),n))}),"getBoardItemsOp","query",t)},getBoardGroupsOp:function(t,i){return n((function(n){return e.request(re,t,V(V({},i),n))}),"getBoardGroupsOp","query",t)}}}!function(e){e.DEPRECATED="deprecated",e.MAINTENANCE="maintenance",e.CURRENT="current",e.RELEASE_CANDIDATE="release_candidate",e.DEV="dev",e.CURRENT_VERSION="2024-10"}(Q||(Q={}));var ue="https://api.monday.com/v2",le=Q.CURRENT_VERSION,se="6.0.0",de=function(){function e(e){var t=this;this.request=function(e,n){return k(t,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.client.request(e,n)];case 1:return[2,t.sent()]}}))}))},this.rawRequest=function(e,n){return k(t,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.client.rawRequest(e,n)];case 1:return[2,t.sent()]}}))}))};var i=e.token,r=e.apiVersion,o=void 0===r?le:r,a=e.requestConfig,u=void 0===a?{}:a;if(!this.isValidApiVersion(o))throw new Error("Invalid API version format. Expected format is 'yyyy-mm' with month as one of '01', '04', '07', or '10'.");this.apiVersion=o;var l=function(){if(process.env.MONDAY_API_ENDPOINT)return process.env.MONDAY_API_ENDPOINT;var e=process.env.PLATFORM_API;if(e)try{var n=JSON.parse(e);if(n.PLATFORM_API_ENDPOINT)return n.PLATFORM_API_ENDPOINT}catch(e){console.error("Failed to parse PLATFORM_API secret",e)}return ue}();this.client=new n(l,V(V({},u),{headers:{"Content-Type":"application/json",Authorization:i,"API-Version":this.apiVersion,"Api-Sdk-Version":se}})),this.operations=ae(this.client)}return e.prototype.isValidApiVersion=function(e){return/^\d{4}-(01|04|07|10)$/.test(e)},e}(),ce=function(){function e(e){void 0===e&&(e=le),this.listeners={},this.generateRequestId=function(){return Math.random().toString(36).substring(2,9)},this.apiVersion=e,window.addEventListener("message",this.receiveMessage.bind(this),!1)}return e.prototype.request=function(e,n,t,i){var r=this;return void 0===i&&(i=6e4),new Promise((function(o,a){var u=r.generateRequestId(),l={query:e,variables:n},s=t||r.apiVersion;window.parent.postMessage({method:"api",args:{params:l,apiVersion:s},requestId:u},"*");var d=setTimeout((function(){a(new Error("Request timed out"))}),i),c=r.addListener(u,(function(e){clearTimeout(d),c(),e.errorMessage?a(new Error("".concat(e.errorMessage," - ").concat(e.data))):o(e)}))}))},e.prototype.addListener=function(e,n){var t=this,i=this.listeners[e]||new Set;return i.add(n),this.listeners[e]=i,function(){i.delete(n),0===i.size&&delete t.listeners[e]}},e.prototype.receiveMessage=function(e){var n=e.data.requestId,t=this.listeners[n];t&&t.forEach((function(n){return n(e.data)}))},e}();export{de as ApiClient,t as AssetsSource,Q as AvailableVersions,i as BoardAttributes,r as BoardEditPermissions,o as BoardKind,a as BoardObjectType,u as BoardSubscriberKind,l as BoardViewPermissions,s as BoardsOrderBy,ee as ChangeColumnValueOpDocument,te as ChangeMultipleColumnValuesOpDocument,Z as ChangeSimpleColumnValueOpDocument,d as ColumnProperty,c as ColumnType,ne as CreateItemOpDocument,m as CustomActivityColor,_ as CustomActivityIcon,le as DEFAULT_VERSION,p as DiscountPeriod,f as DocBlockContentType,I as DocsOrderBy,g as DuplicateBoardType,h as FileLinkValueKind,v as FirstDayOfTheWeek,b as FolderColor,E as FolderCustomIcon,O as FolderFontWeight,re as GetBoardGroupsOpDocument,ie as GetBoardItemsOpDocument,X as GetMeOpDocument,N as GroupAttributes,A as ItemsOrderByDirection,P as ItemsQueryOperator,C as ItemsQueryRuleOperator,L as Kind,ue as MONDAY_API_ENDPOINT,y as NotificationTargetType,D as NumberValueUnitDirection,T as PositionRelative,ce as SeamlessApiClient,S as State,z as UserFieldsFragmentDoc,R as UserKind,$ as VersionKind,w as WebhookEventType,G as WorkspaceKind,B as WorkspaceSubscriberKind,M as WorkspacesOrderBy,ae as getSdk}; | ||
import e from"graphql-tag";import{GraphQLClient as n}from"graphql-request";export{ClientError}from"graphql-request";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},t(e,n)};var r,i,o,a,u,s,l,c,d,m,_,p,f,h,I,g,v,b,E,O,N,y,A,P,C,L,T,D,S,R,$,w,G,B,M,V,k=function(){return k=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},k.apply(this,arguments)};function q(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}s((r=r.apply(e,n||[])).next())}))}function U(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(t=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],r=0}finally{t=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function x(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e}"function"==typeof SuppressedError&&SuppressedError,function(e){e.All="all",e.Columns="columns",e.Gallery="gallery"}(r||(r={})),function(e){e.Communication="communication",e.Description="description",e.Name="name"}(i||(i={})),function(e){e.Assignee="assignee",e.Collaborators="collaborators",e.Everyone="everyone",e.Owners="owners"}(o||(o={})),function(e){e.Private="private",e.Public="public",e.Share="share"}(a||(a={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(u||(u={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(s||(s={})),function(e){e.AnyAssigneeColumn="any_assignee_column"}(l||(l={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(c||(c={})),function(e){e.Description="description",e.Title="title"}(d||(d={})),function(e){e.AutoNumber="auto_number",e.BoardRelation="board_relation",e.Button="button",e.Checkbox="checkbox",e.ColorPicker="color_picker",e.Country="country",e.CreationLog="creation_log",e.Date="date",e.Dependency="dependency",e.Doc="doc",e.Dropdown="dropdown",e.Email="email",e.File="file",e.Formula="formula",e.Group="group",e.Hour="hour",e.Integration="integration",e.ItemAssignees="item_assignees",e.ItemId="item_id",e.LastUpdated="last_updated",e.Link="link",e.Location="location",e.LongText="long_text",e.Mirror="mirror",e.Name="name",e.Numbers="numbers",e.People="people",e.Person="person",e.Phone="phone",e.Progress="progress",e.Rating="rating",e.Status="status",e.Subtasks="subtasks",e.Tags="tags",e.Team="team",e.Text="text",e.TimeTracking="time_tracking",e.Timeline="timeline",e.Unsupported="unsupported",e.Vote="vote",e.Week="week",e.WorldClock="world_clock"}(m||(m={})),function(e){e.BrinkPink="BRINK_PINK",e.CelticBlue="CELTIC_BLUE",e.CornflowerBlue="CORNFLOWER_BLUE",e.DingyDungeon="DINGY_DUNGEON",e.GoGreen="GO_GREEN",e.Gray="GRAY",e.LightDeepPink="LIGHT_DEEP_PINK",e.LightHotPink="LIGHT_HOT_PINK",e.MayaBlue="MAYA_BLUE",e.MediumTurquoise="MEDIUM_TURQUOISE",e.ParadisePink="PARADISE_PINK",e.PhilippineGreen="PHILIPPINE_GREEN",e.PhilippineYellow="PHILIPPINE_YELLOW",e.SlateBlue="SLATE_BLUE",e.VividCerulean="VIVID_CERULEAN",e.YankeesBlue="YANKEES_BLUE",e.YellowGreen="YELLOW_GREEN",e.YellowOrange="YELLOW_ORANGE"}(_||(_={})),function(e){e.Ascending="ASCENDING",e.Camera="CAMERA",e.Conference="CONFERENCE",e.Flag="FLAG",e.Gift="GIFT",e.Headphones="HEADPHONES",e.Homekeys="HOMEKEYS",e.Location="LOCATION",e.Notebook="NOTEBOOK",e.Paperplane="PAPERPLANE",e.Plane="PLANE",e.Pliers="PLIERS",e.Tripod="TRIPOD",e.Twoflags="TWOFLAGS",e.Utencils="UTENCILS"}(p||(p={})),function(e){e.Monthly="MONTHLY",e.Yearly="YEARLY"}(f||(f={})),function(e){e.BulletedList="bulleted_list",e.CheckList="check_list",e.Code="code",e.Divider="divider",e.Image="image",e.LargeTitle="large_title",e.Layout="layout",e.MediumTitle="medium_title",e.NormalText="normal_text",e.NoticeBox="notice_box",e.NumberedList="numbered_list",e.Quote="quote",e.SmallTitle="small_title",e.Table="table",e.Video="video"}(h||(h={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(I||(I={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(g||(g={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(v||(v={})),function(e){e.Monday="monday",e.Sunday="sunday"}(b||(b={})),function(e){e.Aquamarine="AQUAMARINE",e.BrightBlue="BRIGHT_BLUE",e.BrightGreen="BRIGHT_GREEN",e.ChiliBlue="CHILI_BLUE",e.DarkOrange="DARK_ORANGE",e.DarkPurple="DARK_PURPLE",e.DarkRed="DARK_RED",e.DoneGreen="DONE_GREEN",e.Indigo="INDIGO",e.Lipstick="LIPSTICK",e.Null="NULL",e.Purple="PURPLE",e.SofiaPink="SOFIA_PINK",e.StuckRed="STUCK_RED",e.Sunset="SUNSET",e.WorkingOrange="WORKING_ORANGE"}(E||(E={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(O||(O={})),function(e){e.FontWeightBold="FONT_WEIGHT_BOLD",e.FontWeightLight="FONT_WEIGHT_LIGHT",e.FontWeightNormal="FONT_WEIGHT_NORMAL",e.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",e.Null="NULL"}(N||(N={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(y||(y={})),function(e){e.Asc="asc",e.Desc="desc"}(A||(A={})),function(e){e.And="and",e.Or="or"}(P||(P={})),function(e){e.AnyOf="any_of",e.Between="between",e.ContainsTerms="contains_terms",e.ContainsText="contains_text",e.EndsWith="ends_with",e.GreaterThan="greater_than",e.GreaterThanOrEquals="greater_than_or_equals",e.IsEmpty="is_empty",e.IsNotEmpty="is_not_empty",e.LowerThan="lower_than",e.LowerThanOrEqual="lower_than_or_equal",e.NotAnyOf="not_any_of",e.NotContainsText="not_contains_text",e.StartsWith="starts_with",e.WithinTheLast="within_the_last",e.WithinTheNext="within_the_next"}(C||(C={})),function(e){e.Person="person",e.Team="team"}(L||(L={})),function(e){e.Post="Post",e.Project="Project"}(T||(T={})),function(e){e.Left="left",e.Right="right"}(D||(D={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(S||(S={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(R||(R={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}($||($={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldMaintenance="old__maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(w||(w={})),function(e){e.ChangeColumnValue="change_column_value",e.ChangeName="change_name",e.ChangeSpecificColumnValue="change_specific_column_value",e.ChangeStatusColumnValue="change_status_column_value",e.ChangeSubitemColumnValue="change_subitem_column_value",e.ChangeSubitemName="change_subitem_name",e.CreateColumn="create_column",e.CreateItem="create_item",e.CreateSubitem="create_subitem",e.CreateSubitemUpdate="create_subitem_update",e.CreateUpdate="create_update",e.DeleteUpdate="delete_update",e.EditUpdate="edit_update",e.ItemArchived="item_archived",e.ItemDeleted="item_deleted",e.ItemMovedToAnyGroup="item_moved_to_any_group",e.ItemMovedToSpecificGroup="item_moved_to_specific_group",e.ItemRestored="item_restored",e.MoveSubitem="move_subitem",e.SubitemArchived="subitem_archived",e.SubitemDeleted="subitem_deleted"}(G||(G={})),function(e){e.Closed="closed",e.Open="open"}(B||(B={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(M||(M={})),function(e){e.CreatedAt="created_at"}(V||(V={}));var F,W,H,Y,K,j,J,Q,z,X=e(F||(F=x(["\n fragment UserFields on User {\n id\n name\n email\n }\n"],["\n fragment UserFields on User {\n id\n name\n email\n }\n"]))),Z=e(W||(W=x(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),X),ee=e(H||(H=x(["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeSimpleColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: String!) {\n change_simple_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),ne=e(Y||(Y=x(["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"],["\n mutation changeColumnValueOp($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {\n change_column_value(board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {\n id\n }\n }\n"]))),te=e(K||(K=x(["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"],["\n mutation createItemOp($boardId: ID!, $groupId: String!, $itemName: String!) {\n create_item(board_id: $boardId, group_id: $groupId, item_name: $itemName) {\n id\n name\n }\n }\n"]))),re=e(j||(j=x(["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"],["\n mutation changeMultipleColumnValuesOp($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n name\n column_values {\n id\n value\n }\n }\n }\n"]))),ie=e(J||(J=x(["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"],["\n query getBoardItemsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n items_page {\n items {\n id\n name\n column_values {\n id\n type\n value\n }\n }\n }\n }\n }\n"]))),oe=e(Q||(Q=x(["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"],["\n query getBoardGroupsOp($ids: [ID!]!) {\n boards(ids: $ids) {\n groups {\n id\n title\n }\n }\n }\n"]))),ae=function(e,n,t,r){return e()};function ue(e,n){return void 0===n&&(n=ae),{getMeOp:function(t,r){return n((function(n){return e.request(Z,t,k(k({},r),n))}),"getMeOp","query",t)},changeSimpleColumnValueOp:function(t,r){return n((function(n){return e.request(ee,t,k(k({},r),n))}),"changeSimpleColumnValueOp","mutation",t)},changeColumnValueOp:function(t,r){return n((function(n){return e.request(ne,t,k(k({},r),n))}),"changeColumnValueOp","mutation",t)},createItemOp:function(t,r){return n((function(n){return e.request(te,t,k(k({},r),n))}),"createItemOp","mutation",t)},changeMultipleColumnValuesOp:function(t,r){return n((function(n){return e.request(re,t,k(k({},r),n))}),"changeMultipleColumnValuesOp","mutation",t)},getBoardItemsOp:function(t,r){return n((function(n){return e.request(ie,t,k(k({},r),n))}),"getBoardItemsOp","query",t)},getBoardGroupsOp:function(t,r){return n((function(n){return e.request(oe,t,k(k({},r),n))}),"getBoardGroupsOp","query",t)}}}!function(e){e.DEPRECATED="deprecated",e.MAINTENANCE="maintenance",e.CURRENT="current",e.RELEASE_CANDIDATE="release_candidate",e.DEV="dev",e.CURRENT_VERSION="2024-10"}(z||(z={}));var se="https://api.monday.com/v2",le=z.CURRENT_VERSION,ce="7.0.0",de=function(){function e(e){var t=this;this.request=function(e,n){return q(t,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.client.request(e,n)];case 1:return[2,t.sent()]}}))}))},this.rawRequest=function(e,n){return q(t,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.client.rawRequest(e,n)];case 1:return[2,t.sent()]}}))}))};var r=e.token,i=e.apiVersion,o=void 0===i?le:i,a=e.requestConfig,u=void 0===a?{}:a;if(!this.isValidApiVersion(o))throw new Error("Invalid API version format. Expected format is 'yyyy-mm' with month as one of '01', '04', '07', or '10'.");this.apiVersion=o;var s=function(){if(process.env.MONDAY_API_ENDPOINT)return process.env.MONDAY_API_ENDPOINT;var e=process.env.PLATFORM_API;if(e)try{var n=JSON.parse(e);if(n.PLATFORM_API_ENDPOINT)return n.PLATFORM_API_ENDPOINT}catch(e){console.error("Failed to parse PLATFORM_API secret",e)}return se}();this.client=new n(s,k(k({},u),{headers:{"Content-Type":"application/json",Authorization:r,"API-Version":this.apiVersion,"Api-Sdk-Version":ce}})),this.operations=ue(this.client)}return e.prototype.isValidApiVersion=function(e){return/^\d{4}-(01|04|07|10)$/.test(e)},e}(),me=function(e){function n(n,t){var r=e.call(this,n)||this;return r.errors=t,r.name=r.constructor.name,r}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error),_e=function(){function e(e){void 0===e&&(e=le),this.listeners={},this.generateRequestId=function(){return Math.random().toString(36).substring(2,9)},this.apiVersion=e,window.addEventListener("message",this.receiveMessage.bind(this),!1)}return e.prototype.request=function(e,n,t,r){var i=this;return void 0===r&&(r=6e4),new Promise((function(o,a){var u=i.generateRequestId(),s={query:e,variables:n},l=t||i.apiVersion;window.parent.postMessage({method:"api",args:{params:s,apiVersion:l},requestId:u},"*");var c=setTimeout((function(){a(new Error("Request timed out"))}),r),d=i.addListener(u,(function(e){if(clearTimeout(c),d(),e.errorMessage){var n=new me(e.errorMessage,e.data);a(n)}else o(e)}))}))},e.prototype.addListener=function(e,n){var t=this,r=this.listeners[e]||new Set;return r.add(n),this.listeners[e]=r,function(){r.delete(n),0===r.size&&delete t.listeners[e]}},e.prototype.receiveMessage=function(e){var n=e.data.requestId,t=this.listeners[n];t&&t.forEach((function(n){return n(e.data)}))},e}();export{de as ApiClient,r as AssetsSource,z as AvailableVersions,i as BoardAttributes,o as BoardEditPermissions,a as BoardKind,u as BoardObjectType,s as BoardSubscriberKind,l as BoardViewPermissions,c as BoardsOrderBy,ne as ChangeColumnValueOpDocument,re as ChangeMultipleColumnValuesOpDocument,ee as ChangeSimpleColumnValueOpDocument,d as ColumnProperty,m as ColumnType,te as CreateItemOpDocument,_ as CustomActivityColor,p as CustomActivityIcon,le as DEFAULT_VERSION,f as DiscountPeriod,h as DocBlockContentType,I as DocsOrderBy,g as DuplicateBoardType,v as FileLinkValueKind,b as FirstDayOfTheWeek,E as FolderColor,O as FolderCustomIcon,N as FolderFontWeight,oe as GetBoardGroupsOpDocument,ie as GetBoardItemsOpDocument,Z as GetMeOpDocument,y as GroupAttributes,A as ItemsOrderByDirection,P as ItemsQueryOperator,C as ItemsQueryRuleOperator,L as Kind,se as MONDAY_API_ENDPOINT,T as NotificationTargetType,D as NumberValueUnitDirection,S as PositionRelative,_e as SeamlessApiClient,R as State,X as UserFieldsFragmentDoc,$ as UserKind,w as VersionKind,G as WebhookEventType,B as WorkspaceKind,M as WorkspaceSubscriberKind,V as WorkspacesOrderBy,ue as getSdk}; | ||
//# sourceMappingURL=index.js.map |
@@ -12,3 +12,3 @@ import { ApiVersionType, QueryVariables } from './constants'; | ||
/** | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Can be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Cann be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* Defaults to the version corresponding to the package version release (which will be the current), | ||
@@ -15,0 +15,0 @@ */ |
@@ -12,3 +12,3 @@ import { ApiVersionType, QueryVariables } from './constants'; | ||
/** | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Can be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* @param {ApiVersionType} [apiVersion=DEFAULT_VERSION] - Cann be one of the predefined versions in `AvailableVersions` or a custom version string. | ||
* Defaults to the version corresponding to the package version release (which will be the current), | ||
@@ -15,0 +15,0 @@ */ |
{ | ||
"name": "@mondaydotcomorg/api", | ||
"version": "6.0.0", | ||
"version": "7.0.0-beta.1", | ||
"description": "monday.com API client", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
904486
36
19395
4