@mondaydotcomorg/api
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("graphql-tag"),t=require("graphql-request");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,o,i,a,s,u,d,l,p,c,m,_,v,b,h,g,x,I,f,y,O,D,C,S,$,A,T=n(e),B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)};function N(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function E(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function V(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}"function"==typeof SuppressedError&&SuppressedError,exports.AssetsSource=void 0,(r=exports.AssetsSource||(exports.AssetsSource={})).All="all",r.Columns="columns",r.Gallery="gallery",exports.BoardAttributes=void 0,(o=exports.BoardAttributes||(exports.BoardAttributes={})).Communication="communication",o.Description="description",o.Name="name",exports.BoardKind=void 0,(i=exports.BoardKind||(exports.BoardKind={})).Private="private",i.Public="public",i.Share="share",exports.BoardObjectType=void 0,(a=exports.BoardObjectType||(exports.BoardObjectType={})).Board="board",a.CustomObject="custom_object",a.Document="document",a.SubItemsBoard="sub_items_board",exports.BoardSubscriberKind=void 0,(s=exports.BoardSubscriberKind||(exports.BoardSubscriberKind={})).Owner="owner",s.Subscriber="subscriber",exports.BoardsOrderBy=void 0,(u=exports.BoardsOrderBy||(exports.BoardsOrderBy={})).CreatedAt="created_at",u.UsedAt="used_at",exports.ColumnProperty=void 0,(d=exports.ColumnProperty||(exports.ColumnProperty={})).Description="description",d.Title="title",exports.ColumnType=void 0,(l=exports.ColumnType||(exports.ColumnType={})).AutoNumber="auto_number",l.BoardRelation="board_relation",l.Button="button",l.Checkbox="checkbox",l.ColorPicker="color_picker",l.Country="country",l.CreationLog="creation_log",l.Date="date",l.Dependency="dependency",l.Doc="doc",l.Dropdown="dropdown",l.Email="email",l.File="file",l.Formula="formula",l.Group="group",l.Hour="hour",l.Integration="integration",l.ItemAssignees="item_assignees",l.ItemId="item_id",l.LastUpdated="last_updated",l.Link="link",l.Location="location",l.LongText="long_text",l.Mirror="mirror",l.Name="name",l.Numbers="numbers",l.People="people",l.Person="person",l.Phone="phone",l.Progress="progress",l.Rating="rating",l.Status="status",l.Subtasks="subtasks",l.Tags="tags",l.Team="team",l.Text="text",l.TimeTracking="time_tracking",l.Timeline="timeline",l.Unsupported="unsupported",l.Vote="vote",l.Week="week",l.WorldClock="world_clock",exports.DuplicateBoardType=void 0,(p=exports.DuplicateBoardType||(exports.DuplicateBoardType={})).DuplicateBoardWithPulses="duplicate_board_with_pulses",p.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",p.DuplicateBoardWithStructure="duplicate_board_with_structure",exports.FileLinkValueKind=void 0,(c=exports.FileLinkValueKind||(exports.FileLinkValueKind={})).Box="box",c.Dropbox="dropbox",c.GoogleDrive="google_drive",c.Link="link",c.Onedrive="onedrive",exports.FirstDayOfTheWeek=void 0,(m=exports.FirstDayOfTheWeek||(exports.FirstDayOfTheWeek={})).Monday="monday",m.Sunday="sunday",exports.FolderColor=void 0,(_=exports.FolderColor||(exports.FolderColor={})).Aquamarine="AQUAMARINE",_.BrightBlue="BRIGHT_BLUE",_.BrightGreen="BRIGHT_GREEN",_.ChiliBlue="CHILI_BLUE",_.DarkOrange="DARK_ORANGE",_.DarkPurple="DARK_PURPLE",_.DarkRed="DARK_RED",_.DoneGreen="DONE_GREEN",_.Indigo="INDIGO",_.Lipstick="LIPSTICK",_.Null="NULL",_.Purple="PURPLE",_.SofiaPink="SOFIA_PINK",_.StuckRed="STUCK_RED",_.Sunset="SUNSET",_.WorkingOrange="WORKING_ORANGE",exports.GroupAttributes=void 0,(v=exports.GroupAttributes||(exports.GroupAttributes={})).Color="color",v.Position="position",v.RelativePositionAfter="relative_position_after",v.RelativePositionBefore="relative_position_before",v.Title="title",exports.ItemsOrderByDirection=void 0,(b=exports.ItemsOrderByDirection||(exports.ItemsOrderByDirection={})).Asc="asc",b.Desc="desc",exports.ItemsQueryOperator=void 0,(h=exports.ItemsQueryOperator||(exports.ItemsQueryOperator={})).And="and",h.Or="or",exports.ItemsQueryRuleOperator=void 0,(g=exports.ItemsQueryRuleOperator||(exports.ItemsQueryRuleOperator={})).AnyOf="any_of",g.Between="between",g.ContainsTerms="contains_terms",g.ContainsText="contains_text",g.EndsWith="ends_with",g.GreaterThan="greater_than",g.GreaterThanOrEquals="greater_than_or_equals",g.IsEmpty="is_empty",g.IsNotEmpty="is_not_empty",g.LowerThan="lower_than",g.LowerThanOrEqual="lower_than_or_equal",g.NotAnyOf="not_any_of",g.NotContainsText="not_contains_text",g.StartsWith="starts_with",g.WithinTheLast="within_the_last",g.WithinTheNext="within_the_next",exports.Kind=void 0,(x=exports.Kind||(exports.Kind={})).Person="person",x.Team="team",exports.NotificationTargetType=void 0,(I=exports.NotificationTargetType||(exports.NotificationTargetType={})).Post="Post",I.Project="Project",exports.NumberValueUnitDirection=void 0,(f=exports.NumberValueUnitDirection||(exports.NumberValueUnitDirection={})).Left="left",f.Right="right",exports.PositionRelative=void 0,(y=exports.PositionRelative||(exports.PositionRelative={})).AfterAt="after_at",y.BeforeAt="before_at",exports.State=void 0,(O=exports.State||(exports.State={})).Active="active",O.All="all",O.Archived="archived",O.Deleted="deleted",exports.UserKind=void 0,(D=exports.UserKind||(exports.UserKind={})).All="all",D.Guests="guests",D.NonGuests="non_guests",D.NonPending="non_pending",exports.VersionKind=void 0,(C=exports.VersionKind||(exports.VersionKind={})).Current="current",C.Deprecated="deprecated",C.Dev="dev",C.Maintenance="maintenance",C.PreviousMaintenance="previous_maintenance",C.ReleaseCandidate="release_candidate",exports.WebhookEventType=void 0,(S=exports.WebhookEventType||(exports.WebhookEventType={})).ChangeColumnValue="change_column_value",S.ChangeName="change_name",S.ChangeSpecificColumnValue="change_specific_column_value",S.ChangeStatusColumnValue="change_status_column_value",S.ChangeSubitemColumnValue="change_subitem_column_value",S.ChangeSubitemName="change_subitem_name",S.CreateColumn="create_column",S.CreateItem="create_item",S.CreateSubitem="create_subitem",S.CreateSubitemUpdate="create_subitem_update",S.CreateUpdate="create_update",S.DeleteUpdate="delete_update",S.EditUpdate="edit_update",S.ItemArchived="item_archived",S.ItemDeleted="item_deleted",S.ItemMovedToAnyGroup="item_moved_to_any_group",S.ItemMovedToSpecificGroup="item_moved_to_specific_group",S.ItemRestored="item_restored",S.MoveSubitem="move_subitem",S.SubitemArchived="subitem_archived",S.SubitemDeleted="subitem_deleted",exports.WorkspaceKind=void 0,($=exports.WorkspaceKind||(exports.WorkspaceKind={})).Closed="closed",$.Open="open",exports.WorkspaceSubscriberKind=void 0,(A=exports.WorkspaceSubscriberKind||(exports.WorkspaceSubscriberKind={})).Owner="owner",A.Subscriber="subscriber",exports.WorkspacesOrderBy=void 0,(exports.WorkspacesOrderBy||(exports.WorkspacesOrderBy={})).CreatedAt="created_at";var k,P,w,R,q,U,G,K,L,M=T.default(k||(k=V(["\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"]))),W=T.default(P||(P=V(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),M),F=T.default(w||(w=V(["\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"]))),j=T.default(R||(R=V(["\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"]))),Q=T.default(q||(q=V(["\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"]))),H=T.default(U||(U=V(["\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"]))),J=T.default(G||(G=V(["\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"]))),z=T.default(K||(K=V(["\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"]))),Y=function(e,t,n,r){return e()};function X(e,t){return void 0===t&&(t=Y),{getMeOp:function(n,r){return t((function(t){return e.request(W,n,B(B({},r),t))}),"getMeOp","query",n)},changeSimpleColumnValueOp:function(n,r){return t((function(t){return e.request(F,n,B(B({},r),t))}),"changeSimpleColumnValueOp","mutation",n)},changeColumnValueOp:function(n,r){return t((function(t){return e.request(j,n,B(B({},r),t))}),"changeColumnValueOp","mutation",n)},createItemOp:function(n,r){return t((function(t){return e.request(Q,n,B(B({},r),t))}),"createItemOp","mutation",n)},changeMultipleColumnValuesOp:function(n,r){return t((function(t){return e.request(H,n,B(B({},r),t))}),"changeMultipleColumnValuesOp","mutation",n)},getBoardItemsOp:function(n,r){return t((function(t){return e.request(J,n,B(B({},r),t))}),"getBoardItemsOp","query",n)},getBoardGroupsOp:function(n,r){return t((function(t){return e.request(z,n,B(B({},r),t))}),"getBoardGroupsOp","query",n)}}}exports.AvailableVersions=void 0,(L=exports.AvailableVersions||(exports.AvailableVersions={})).DEPRECATED="deprecated",L.MAINTENANCE="maintenance",L.CURRENT="current",L.RELEASE_CANDIDATE="release_candidate",L.DEV="dev",L.CURRENT_VERSION="2024-04";var Z="https://api.monday.com/v2",ee=exports.AvailableVersions.CURRENT_VERSION,te="3.0.3",ne=function(e,n){void 0===n&&(n=ee);var r=this;this.query=function(e,t){return N(r,void 0,void 0,(function(){return E(this,(function(n){switch(n.label){case 0:return[4,this.client.request(e,t)];case 1:return[2,n.sent()]}}))}))},this.apiVersion=n;var o=process.env.MONDAY_API_ENDPOINT||Z;this.client=new t.GraphQLClient(o,{headers:{"Content-Type":"application/json",Authorization:e,"API-Version":this.apiVersion,"Api-Sdk-Version":te}}),this.operations=X(this.client)},re=function(){function e(e){void 0===e&&(e=ee),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.query=function(e,t,n,r){var o=this;return void 0===r&&(r=6e4),new Promise((function(i,a){var s=o.generateRequestId(),u={query:e,variables:t},d=n||o.apiVersion;window.parent.postMessage({method:"api",args:{params:u,apiVersion:d},requestId:s},"*");var l=setTimeout((function(){a(new Error("Request timed out"))}),r),p=o.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 n=this,r=this.listeners[e]||new Set;return r.add(t),this.listeners[e]=r,function(){r.delete(t),0===r.size&&delete n.listeners[e]}},e.prototype.receiveMessage=function(e){var t=e.data.requestId,n=this.listeners[t];n&&n.forEach((function(t){return t(e.data)}))},e}();exports.ApiClient=ne,exports.ChangeColumnValueOpDocument=j,exports.ChangeMultipleColumnValuesOpDocument=H,exports.ChangeSimpleColumnValueOpDocument=F,exports.CreateItemOpDocument=Q,exports.DEFAULT_VERSION=ee,exports.GetBoardGroupsOpDocument=z,exports.GetBoardItemsOpDocument=J,exports.GetMeOpDocument=W,exports.MONDAY_API_ENDPOINT=Z,exports.SeamlessApiClient=re,exports.UserFieldsFragmentDoc=M,exports.getSdk=X; | ||
"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 n,o,i,a,s,u,d,l,p,c,m,_,v,g,h,b,x,I,f,O,y,D,C,T,S,B,N,A,$,E,k=r(e),V=function(){return V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},V.apply(this,arguments)};function R(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function L(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}"function"==typeof SuppressedError&&SuppressedError,exports.AssetsSource=void 0,(n=exports.AssetsSource||(exports.AssetsSource={})).All="all",n.Columns="columns",n.Gallery="gallery",exports.BoardAttributes=void 0,(o=exports.BoardAttributes||(exports.BoardAttributes={})).Communication="communication",o.Description="description",o.Name="name",exports.BoardKind=void 0,(i=exports.BoardKind||(exports.BoardKind={})).Private="private",i.Public="public",i.Share="share",exports.BoardObjectType=void 0,(a=exports.BoardObjectType||(exports.BoardObjectType={})).Board="board",a.CustomObject="custom_object",a.Document="document",a.SubItemsBoard="sub_items_board",exports.BoardSubscriberKind=void 0,(s=exports.BoardSubscriberKind||(exports.BoardSubscriberKind={})).Owner="owner",s.Subscriber="subscriber",exports.BoardsOrderBy=void 0,(u=exports.BoardsOrderBy||(exports.BoardsOrderBy={})).CreatedAt="created_at",u.UsedAt="used_at",exports.ColumnProperty=void 0,(d=exports.ColumnProperty||(exports.ColumnProperty={})).Description="description",d.Title="title",exports.ColumnType=void 0,(l=exports.ColumnType||(exports.ColumnType={})).AutoNumber="auto_number",l.BoardRelation="board_relation",l.Button="button",l.Checkbox="checkbox",l.ColorPicker="color_picker",l.Country="country",l.CreationLog="creation_log",l.Date="date",l.Dependency="dependency",l.Doc="doc",l.Dropdown="dropdown",l.Email="email",l.File="file",l.Formula="formula",l.Group="group",l.Hour="hour",l.Integration="integration",l.ItemAssignees="item_assignees",l.ItemId="item_id",l.LastUpdated="last_updated",l.Link="link",l.Location="location",l.LongText="long_text",l.Mirror="mirror",l.Name="name",l.Numbers="numbers",l.People="people",l.Person="person",l.Phone="phone",l.Progress="progress",l.Rating="rating",l.Status="status",l.Subtasks="subtasks",l.Tags="tags",l.Team="team",l.Text="text",l.TimeTracking="time_tracking",l.Timeline="timeline",l.Unsupported="unsupported",l.Vote="vote",l.Week="week",l.WorldClock="world_clock",exports.DocBlockContentType=void 0,(p=exports.DocBlockContentType||(exports.DocBlockContentType={})).BulletedList="bulleted_list",p.CheckList="check_list",p.Code="code",p.Divider="divider",p.Image="image",p.LargeTitle="large_title",p.Layout="layout",p.MediumTitle="medium_title",p.NormalText="normal_text",p.NoticeBox="notice_box",p.NumberedList="numbered_list",p.Quote="quote",p.SmallTitle="small_title",p.Table="table",p.Video="video",exports.DocsOrderBy=void 0,(c=exports.DocsOrderBy||(exports.DocsOrderBy={})).CreatedAt="created_at",c.UsedAt="used_at",exports.DuplicateBoardType=void 0,(m=exports.DuplicateBoardType||(exports.DuplicateBoardType={})).DuplicateBoardWithPulses="duplicate_board_with_pulses",m.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",m.DuplicateBoardWithStructure="duplicate_board_with_structure",exports.FileLinkValueKind=void 0,(_=exports.FileLinkValueKind||(exports.FileLinkValueKind={})).Box="box",_.Dropbox="dropbox",_.GoogleDrive="google_drive",_.Link="link",_.Onedrive="onedrive",exports.FirstDayOfTheWeek=void 0,(v=exports.FirstDayOfTheWeek||(exports.FirstDayOfTheWeek={})).Monday="monday",v.Sunday="sunday",exports.FolderColor=void 0,(g=exports.FolderColor||(exports.FolderColor={})).Aquamarine="AQUAMARINE",g.BrightBlue="BRIGHT_BLUE",g.BrightGreen="BRIGHT_GREEN",g.ChiliBlue="CHILI_BLUE",g.DarkOrange="DARK_ORANGE",g.DarkPurple="DARK_PURPLE",g.DarkRed="DARK_RED",g.DoneGreen="DONE_GREEN",g.Indigo="INDIGO",g.Lipstick="LIPSTICK",g.Null="NULL",g.Purple="PURPLE",g.SofiaPink="SOFIA_PINK",g.StuckRed="STUCK_RED",g.Sunset="SUNSET",g.WorkingOrange="WORKING_ORANGE",exports.FolderCustomIcon=void 0,(h=exports.FolderCustomIcon||(exports.FolderCustomIcon={})).Folder="FOLDER",h.Morebelow="MOREBELOW",h.Morebelowfilled="MOREBELOWFILLED",h.Null="NULL",h.Work="WORK",exports.FolderFontWeight=void 0,(b=exports.FolderFontWeight||(exports.FolderFontWeight={})).FontWeightBold="FONT_WEIGHT_BOLD",b.FontWeightLight="FONT_WEIGHT_LIGHT",b.FontWeightNormal="FONT_WEIGHT_NORMAL",b.FontWeightVeryLight="FONT_WEIGHT_VERY_LIGHT",b.Null="NULL",exports.GroupAttributes=void 0,(x=exports.GroupAttributes||(exports.GroupAttributes={})).Color="color",x.Position="position",x.RelativePositionAfter="relative_position_after",x.RelativePositionBefore="relative_position_before",x.Title="title",exports.ItemsOrderByDirection=void 0,(I=exports.ItemsOrderByDirection||(exports.ItemsOrderByDirection={})).Asc="asc",I.Desc="desc",exports.ItemsQueryOperator=void 0,(f=exports.ItemsQueryOperator||(exports.ItemsQueryOperator={})).And="and",f.Or="or",exports.ItemsQueryRuleOperator=void 0,(O=exports.ItemsQueryRuleOperator||(exports.ItemsQueryRuleOperator={})).AnyOf="any_of",O.Between="between",O.ContainsTerms="contains_terms",O.ContainsText="contains_text",O.EndsWith="ends_with",O.GreaterThan="greater_than",O.GreaterThanOrEquals="greater_than_or_equals",O.IsEmpty="is_empty",O.IsNotEmpty="is_not_empty",O.LowerThan="lower_than",O.LowerThanOrEqual="lower_than_or_equal",O.NotAnyOf="not_any_of",O.NotContainsText="not_contains_text",O.StartsWith="starts_with",O.WithinTheLast="within_the_last",O.WithinTheNext="within_the_next",exports.Kind=void 0,(y=exports.Kind||(exports.Kind={})).Person="person",y.Team="team",exports.NotificationTargetType=void 0,(D=exports.NotificationTargetType||(exports.NotificationTargetType={})).Post="Post",D.Project="Project",exports.NumberValueUnitDirection=void 0,(C=exports.NumberValueUnitDirection||(exports.NumberValueUnitDirection={})).Left="left",C.Right="right",exports.PositionRelative=void 0,(T=exports.PositionRelative||(exports.PositionRelative={})).AfterAt="after_at",T.BeforeAt="before_at",exports.State=void 0,(S=exports.State||(exports.State={})).Active="active",S.All="all",S.Archived="archived",S.Deleted="deleted",exports.UserKind=void 0,(B=exports.UserKind||(exports.UserKind={})).All="all",B.Guests="guests",B.NonGuests="non_guests",B.NonPending="non_pending",exports.VersionKind=void 0,(N=exports.VersionKind||(exports.VersionKind={})).Current="current",N.Deprecated="deprecated",N.Dev="dev",N.Maintenance="maintenance",N.OldPreviousMaintenance="old_previous_maintenance",N.PreviousMaintenance="previous_maintenance",N.ReleaseCandidate="release_candidate",exports.WebhookEventType=void 0,(A=exports.WebhookEventType||(exports.WebhookEventType={})).ChangeColumnValue="change_column_value",A.ChangeName="change_name",A.ChangeSpecificColumnValue="change_specific_column_value",A.ChangeStatusColumnValue="change_status_column_value",A.ChangeSubitemColumnValue="change_subitem_column_value",A.ChangeSubitemName="change_subitem_name",A.CreateColumn="create_column",A.CreateItem="create_item",A.CreateSubitem="create_subitem",A.CreateSubitemUpdate="create_subitem_update",A.CreateUpdate="create_update",A.DeleteUpdate="delete_update",A.EditUpdate="edit_update",A.ItemArchived="item_archived",A.ItemDeleted="item_deleted",A.ItemMovedToAnyGroup="item_moved_to_any_group",A.ItemMovedToSpecificGroup="item_moved_to_specific_group",A.ItemRestored="item_restored",A.MoveSubitem="move_subitem",A.SubitemArchived="subitem_archived",A.SubitemDeleted="subitem_deleted",exports.WorkspaceKind=void 0,($=exports.WorkspaceKind||(exports.WorkspaceKind={})).Closed="closed",$.Open="open",exports.WorkspaceSubscriberKind=void 0,(E=exports.WorkspaceSubscriberKind||(exports.WorkspaceSubscriberKind={})).Owner="owner",E.Subscriber="subscriber",exports.WorkspacesOrderBy=void 0,(exports.WorkspacesOrderBy||(exports.WorkspacesOrderBy={})).CreatedAt="created_at";var w,W,F,G,q,U,M,K,j,H=k.default(w||(w=P(["\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"]))),Q=k.default(W||(W=P(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),H),J=k.default(F||(F=P(["\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"]))),Y=k.default(G||(G=P(["\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"]))),z=k.default(q||(q=P(["\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"]))),X=k.default(U||(U=P(["\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"]))),Z=k.default(M||(M=P(["\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"]))),ee=k.default(K||(K=P(["\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"]))),te=function(e,t,r,n){return e()};function re(e,t){return void 0===t&&(t=te),{getMeOp:function(r,n){return t((function(t){return e.request(Q,r,V(V({},n),t))}),"getMeOp","query",r)},changeSimpleColumnValueOp:function(r,n){return t((function(t){return e.request(J,r,V(V({},n),t))}),"changeSimpleColumnValueOp","mutation",r)},changeColumnValueOp:function(r,n){return t((function(t){return e.request(Y,r,V(V({},n),t))}),"changeColumnValueOp","mutation",r)},createItemOp:function(r,n){return t((function(t){return e.request(z,r,V(V({},n),t))}),"createItemOp","mutation",r)},changeMultipleColumnValuesOp:function(r,n){return t((function(t){return e.request(X,r,V(V({},n),t))}),"changeMultipleColumnValuesOp","mutation",r)},getBoardItemsOp:function(r,n){return t((function(t){return e.request(Z,r,V(V({},n),t))}),"getBoardItemsOp","query",r)},getBoardGroupsOp:function(r,n){return t((function(t){return e.request(ee,r,V(V({},n),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-07";var ne="https://api.monday.com/v2",oe=exports.AvailableVersions.CURRENT_VERSION,ie="4.0.2",ae=function(e,r){void 0===r&&(r=oe);var n=this;this.query=function(e,t){return R(n,void 0,void 0,(function(){return L(this,(function(r){switch(r.label){case 0:return[4,this.client.request(e,t)];case 1:return[2,r.sent()]}}))}))},this.apiVersion=r;var o=process.env.MONDAY_API_ENDPOINT||ne;this.client=new t.GraphQLClient(o,{headers:{"Content-Type":"application/json",Authorization:e,"API-Version":this.apiVersion,"Api-Sdk-Version":ie}}),this.operations=re(this.client)},se=function(){function e(e){void 0===e&&(e=oe),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.query=function(e,t,r,n){var o=this;return void 0===n&&(n=6e4),new Promise((function(i,a){var s=o.generateRequestId(),u={query:e,variables:t},d=r||o.apiVersion;window.parent.postMessage({method:"api",args:{params:u,apiVersion:d},requestId:s},"*");var l=setTimeout((function(){a(new Error("Request timed out"))}),n),p=o.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,n=this.listeners[e]||new Set;return n.add(t),this.listeners[e]=n,function(){n.delete(t),0===n.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}();exports.ApiClient=ae,exports.ChangeColumnValueOpDocument=Y,exports.ChangeMultipleColumnValuesOpDocument=X,exports.ChangeSimpleColumnValueOpDocument=J,exports.CreateItemOpDocument=z,exports.DEFAULT_VERSION=oe,exports.GetBoardGroupsOpDocument=ee,exports.GetBoardItemsOpDocument=Z,exports.GetMeOpDocument=Q,exports.MONDAY_API_ENDPOINT=ne,exports.SeamlessApiClient=se,exports.UserFieldsFragmentDoc=H,exports.getSdk=re; | ||
//# sourceMappingURL=index.js.map |
@@ -7,3 +7,3 @@ export declare enum AvailableVersions { | ||
DEV = "dev", | ||
CURRENT_VERSION = "2024-04" | ||
CURRENT_VERSION = "2024-07" | ||
} | ||
@@ -10,0 +10,0 @@ export declare const MONDAY_API_ENDPOINT = "https://api.monday.com/v2"; |
@@ -1,2 +0,2 @@ | ||
import e from"graphql-tag";import{GraphQLClient as n}from"graphql-request";var t,i,r,o,a,u,s,d,l,c,m,p,_,f,g,h,I,b,v,$,y,O,C,D,S,E,w,N=function(){return N=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},N.apply(this,arguments)};function A(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}s((i=i.apply(e,n||[])).next())}))}function P(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(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,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,s])}}}function R(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.Private="private",e.Public="public",e.Share="share"}(r||(r={})),function(e){e.Board="board",e.CustomObject="custom_object",e.Document="document",e.SubItemsBoard="sub_items_board"}(o||(o={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(a||(a={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(u||(u={})),function(e){e.Description="description",e.Title="title"}(s||(s={})),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"}(d||(d={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(l||(l={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(c||(c={})),function(e){e.Monday="monday",e.Sunday="sunday"}(m||(m={})),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"}(p||(p={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(_||(_={})),function(e){e.Asc="asc",e.Desc="desc"}(f||(f={})),function(e){e.And="and",e.Or="or"}(g||(g={})),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"}(h||(h={})),function(e){e.Person="person",e.Team="team"}(I||(I={})),function(e){e.Post="Post",e.Project="Project"}(b||(b={})),function(e){e.Left="left",e.Right="right"}(v||(v={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}($||($={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(y||(y={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(O||(O={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(C||(C={})),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"}(D||(D={})),function(e){e.Closed="closed",e.Open="open"}(S||(S={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(E||(E={})),function(e){e.CreatedAt="created_at"}(w||(w={}));var T,q,V,k,B,U,G,M,L,x=e(T||(T=R(["\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"]))),W=e(q||(q=R(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),x),j=e(V||(V=R(["\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"]))),F=e(k||(k=R(["\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"]))),K=e(B||(B=R(["\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"]))),H=e(U||(U=R(["\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"]))),J=e(G||(G=R(["\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"]))),z=e(M||(M=R(["\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"]))),Q=function(e,n,t,i){return e()};function Y(e,n){return void 0===n&&(n=Q),{getMeOp:function(t,i){return n((function(n){return e.request(W,t,N(N({},i),n))}),"getMeOp","query",t)},changeSimpleColumnValueOp:function(t,i){return n((function(n){return e.request(j,t,N(N({},i),n))}),"changeSimpleColumnValueOp","mutation",t)},changeColumnValueOp:function(t,i){return n((function(n){return e.request(F,t,N(N({},i),n))}),"changeColumnValueOp","mutation",t)},createItemOp:function(t,i){return n((function(n){return e.request(K,t,N(N({},i),n))}),"createItemOp","mutation",t)},changeMultipleColumnValuesOp:function(t,i){return n((function(n){return e.request(H,t,N(N({},i),n))}),"changeMultipleColumnValuesOp","mutation",t)},getBoardItemsOp:function(t,i){return n((function(n){return e.request(J,t,N(N({},i),n))}),"getBoardItemsOp","query",t)},getBoardGroupsOp:function(t,i){return n((function(n){return e.request(z,t,N(N({},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-04"}(L||(L={}));var X="https://api.monday.com/v2",Z=L.CURRENT_VERSION,ee="3.0.3",ne=function(e,t){void 0===t&&(t=Z);var i=this;this.query=function(e,n){return A(i,void 0,void 0,(function(){return P(this,(function(t){switch(t.label){case 0:return[4,this.client.request(e,n)];case 1:return[2,t.sent()]}}))}))},this.apiVersion=t;var r=process.env.MONDAY_API_ENDPOINT||X;this.client=new n(r,{headers:{"Content-Type":"application/json",Authorization:e,"API-Version":this.apiVersion,"Api-Sdk-Version":ee}}),this.operations=Y(this.client)},te=function(){function e(e){void 0===e&&(e=Z),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.query=function(e,n,t,i){var r=this;return void 0===i&&(i=6e4),new Promise((function(o,a){var u=r.generateRequestId(),s={query:e,variables:n},d=t||r.apiVersion;window.parent.postMessage({method:"api",args:{params:s,apiVersion:d},requestId:u},"*");var l=setTimeout((function(){a(new Error("Request timed out"))}),i),c=r.addListener(u,(function(e){clearTimeout(l),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{ne as ApiClient,t as AssetsSource,L as AvailableVersions,i as BoardAttributes,r as BoardKind,o as BoardObjectType,a as BoardSubscriberKind,u as BoardsOrderBy,F as ChangeColumnValueOpDocument,H as ChangeMultipleColumnValuesOpDocument,j as ChangeSimpleColumnValueOpDocument,s as ColumnProperty,d as ColumnType,K as CreateItemOpDocument,Z as DEFAULT_VERSION,l as DuplicateBoardType,c as FileLinkValueKind,m as FirstDayOfTheWeek,p as FolderColor,z as GetBoardGroupsOpDocument,J as GetBoardItemsOpDocument,W as GetMeOpDocument,_ as GroupAttributes,f as ItemsOrderByDirection,g as ItemsQueryOperator,h as ItemsQueryRuleOperator,I as Kind,X as MONDAY_API_ENDPOINT,b as NotificationTargetType,v as NumberValueUnitDirection,$ as PositionRelative,te as SeamlessApiClient,y as State,x as UserFieldsFragmentDoc,O as UserKind,C as VersionKind,D as WebhookEventType,S as WorkspaceKind,E as WorkspaceSubscriberKind,w as WorkspacesOrderBy,Y as getSdk}; | ||
import e from"graphql-tag";import{GraphQLClient as n}from"graphql-request";var t,i,o,r,a,u,l,s,d,c,m,p,_,g,h,f,I,b,v,O,$,y,C,D,N,E,S,T,w,A,L,R=function(){return R=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},R.apply(this,arguments)};function P(e,n,t,i){return new(t||(t=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function u(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var n;e.done?o(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,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function u(u){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,u[0]&&(a=0)),a;)try{if(t=1,i&&(o=2&u[0]?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=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(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],i=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function V(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.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"}(r||(r={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(a||(a={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(u||(u={})),function(e){e.Description="description",e.Title="title"}(l||(l={})),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"}(s||(s={})),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"}(d||(d={})),function(e){e.CreatedAt="created_at",e.UsedAt="used_at"}(c||(c={})),function(e){e.DuplicateBoardWithPulses="duplicate_board_with_pulses",e.DuplicateBoardWithPulsesAndUpdates="duplicate_board_with_pulses_and_updates",e.DuplicateBoardWithStructure="duplicate_board_with_structure"}(m||(m={})),function(e){e.Box="box",e.Dropbox="dropbox",e.GoogleDrive="google_drive",e.Link="link",e.Onedrive="onedrive"}(p||(p={})),function(e){e.Monday="monday",e.Sunday="sunday"}(_||(_={})),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"}(g||(g={})),function(e){e.Folder="FOLDER",e.Morebelow="MOREBELOW",e.Morebelowfilled="MOREBELOWFILLED",e.Null="NULL",e.Work="WORK"}(h||(h={})),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"}(f||(f={})),function(e){e.Color="color",e.Position="position",e.RelativePositionAfter="relative_position_after",e.RelativePositionBefore="relative_position_before",e.Title="title"}(I||(I={})),function(e){e.Asc="asc",e.Desc="desc"}(b||(b={})),function(e){e.And="and",e.Or="or"}(v||(v={})),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"}(O||(O={})),function(e){e.Person="person",e.Team="team"}($||($={})),function(e){e.Post="Post",e.Project="Project"}(y||(y={})),function(e){e.Left="left",e.Right="right"}(C||(C={})),function(e){e.AfterAt="after_at",e.BeforeAt="before_at"}(D||(D={})),function(e){e.Active="active",e.All="all",e.Archived="archived",e.Deleted="deleted"}(N||(N={})),function(e){e.All="all",e.Guests="guests",e.NonGuests="non_guests",e.NonPending="non_pending"}(E||(E={})),function(e){e.Current="current",e.Deprecated="deprecated",e.Dev="dev",e.Maintenance="maintenance",e.OldPreviousMaintenance="old_previous_maintenance",e.PreviousMaintenance="previous_maintenance",e.ReleaseCandidate="release_candidate"}(S||(S={})),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"}(T||(T={})),function(e){e.Closed="closed",e.Open="open"}(w||(w={})),function(e){e.Owner="owner",e.Subscriber="subscriber"}(A||(A={})),function(e){e.CreatedAt="created_at"}(L||(L={}));var B,k,M,G,U,x,W,F,H,j=e(B||(B=V(["\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"]))),K=e(k||(k=V(["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"],["\n query getMeOp {\n me {\n ...UserFields\n }\n }\n ","\n"])),j),J=e(M||(M=V(["\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"]))),z=e(G||(G=V(["\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"]))),Q=e(U||(U=V(["\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"]))),Y=e(x||(x=V(["\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"]))),X=e(W||(W=V(["\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"]))),Z=e(F||(F=V(["\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"]))),ee=function(e,n,t,i){return e()};function ne(e,n){return void 0===n&&(n=ee),{getMeOp:function(t,i){return n((function(n){return e.request(K,t,R(R({},i),n))}),"getMeOp","query",t)},changeSimpleColumnValueOp:function(t,i){return n((function(n){return e.request(J,t,R(R({},i),n))}),"changeSimpleColumnValueOp","mutation",t)},changeColumnValueOp:function(t,i){return n((function(n){return e.request(z,t,R(R({},i),n))}),"changeColumnValueOp","mutation",t)},createItemOp:function(t,i){return n((function(n){return e.request(Q,t,R(R({},i),n))}),"createItemOp","mutation",t)},changeMultipleColumnValuesOp:function(t,i){return n((function(n){return e.request(Y,t,R(R({},i),n))}),"changeMultipleColumnValuesOp","mutation",t)},getBoardItemsOp:function(t,i){return n((function(n){return e.request(X,t,R(R({},i),n))}),"getBoardItemsOp","query",t)},getBoardGroupsOp:function(t,i){return n((function(n){return e.request(Z,t,R(R({},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-07"}(H||(H={}));var te="https://api.monday.com/v2",ie=H.CURRENT_VERSION,oe="4.0.2",re=function(e,t){void 0===t&&(t=ie);var i=this;this.query=function(e,n){return P(i,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.apiVersion=t;var o=process.env.MONDAY_API_ENDPOINT||te;this.client=new n(o,{headers:{"Content-Type":"application/json",Authorization:e,"API-Version":this.apiVersion,"Api-Sdk-Version":oe}}),this.operations=ne(this.client)},ae=function(){function e(e){void 0===e&&(e=ie),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.query=function(e,n,t,i){var o=this;return void 0===i&&(i=6e4),new Promise((function(r,a){var u=o.generateRequestId(),l={query:e,variables:n},s=t||o.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=o.addListener(u,(function(e){clearTimeout(d),c(),e.errorMessage?a(new Error("".concat(e.errorMessage," - ").concat(e.data))):r(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{re as ApiClient,t as AssetsSource,H as AvailableVersions,i as BoardAttributes,o as BoardKind,r as BoardObjectType,a as BoardSubscriberKind,u as BoardsOrderBy,z as ChangeColumnValueOpDocument,Y as ChangeMultipleColumnValuesOpDocument,J as ChangeSimpleColumnValueOpDocument,l as ColumnProperty,s as ColumnType,Q as CreateItemOpDocument,ie as DEFAULT_VERSION,d as DocBlockContentType,c as DocsOrderBy,m as DuplicateBoardType,p as FileLinkValueKind,_ as FirstDayOfTheWeek,g as FolderColor,h as FolderCustomIcon,f as FolderFontWeight,Z as GetBoardGroupsOpDocument,X as GetBoardItemsOpDocument,K as GetMeOpDocument,I as GroupAttributes,b as ItemsOrderByDirection,v as ItemsQueryOperator,O as ItemsQueryRuleOperator,$ as Kind,te as MONDAY_API_ENDPOINT,y as NotificationTargetType,C as NumberValueUnitDirection,D as PositionRelative,ae as SeamlessApiClient,N as State,j as UserFieldsFragmentDoc,E as UserKind,S as VersionKind,T as WebhookEventType,w as WorkspaceKind,A as WorkspaceSubscriberKind,L as WorkspacesOrderBy,ne as getSdk}; | ||
//# sourceMappingURL=index.js.map |
@@ -7,3 +7,3 @@ export declare enum AvailableVersions { | ||
DEV = "dev", | ||
CURRENT_VERSION = "2024-04" | ||
CURRENT_VERSION = "2024-07" | ||
} | ||
@@ -10,0 +10,0 @@ export declare const MONDAY_API_ENDPOINT = "https://api.monday.com/v2"; |
@@ -7,3 +7,3 @@ export declare enum AvailableVersions { | ||
DEV = "dev", | ||
CURRENT_VERSION = "2024-04" | ||
CURRENT_VERSION = "2024-07" | ||
} | ||
@@ -10,0 +10,0 @@ export declare const MONDAY_API_ENDPOINT = "https://api.monday.com/v2"; |
{ | ||
"name": "@mondaydotcomorg/api", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "monday.com API client", | ||
@@ -40,3 +40,2 @@ "main": "dist/cjs/index.js", | ||
"devDependencies": { | ||
"moment": "^2.30.1", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
@@ -50,2 +49,3 @@ "@rollup/plugin-json": "^6.1.0", | ||
"jest": "^29.7.0", | ||
"moment": "^2.30.1", | ||
"rollup": "^2.79.1", | ||
@@ -52,0 +52,0 @@ "rollup-plugin-delete": "^2.0.0", |
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 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 too big to display
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
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
826148
17606
0