diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7356197..4f69c56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,4 +4,4 @@ # See: https://help.github.com/articles/about-codeowners/ # These owners will be the default owners for everything in the repo. -* @indikasampath2000 @abeykoon @LakshanSS +* @NipunaRanasinghe diff --git a/ballerina/client.bal b/ballerina/client.bal index 1125e6e..5d0259a 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -55,25 +55,25 @@ public isolated client class Client { return; } - resource isolated function get admin\.apps\.approved\.list(map headers = {}, *Admin_apps_approved_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.apps\.approved\.list(map headers = {}, *Admin_apps_approved_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.apps.approved.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.apps\.requests\.list(map headers = {}, *Admin_apps_requests_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.apps\.requests\.list(map headers = {}, *Admin_apps_requests_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.apps.requests.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.apps\.restricted\.list(map headers = {}, *Admin_apps_restricted_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.apps\.restricted\.list(map headers = {}, *Admin_apps_restricted_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.apps.restricted.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.conversations\.ekm\.listOriginalConnectedChannelInfo(map headers = {}, *Admin_conversations_ekm_listOriginalConnectedChannelInfoQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.conversations\.ekm\.listOriginalConnectedChannelInfo(map headers = {}, *Admin_conversations_ekm_listOriginalConnectedChannelInfoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.conversations.ekm.listOriginalConnectedChannelInfo`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -91,7 +91,7 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.conversations\.restrictAccess\.listGroups(map headers = {}, *Admin_conversations_restrictAccess_listGroupsQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.conversations\.restrictAccess\.listGroups(map headers = {}, *Admin_conversations_restrictAccess_listGroupsQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.conversations.restrictAccess.listGroups`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -103,61 +103,61 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.emoji\.list(map headers = {}, *Admin_emoji_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.emoji\.list(map headers = {}, *Admin_emoji_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.emoji.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.inviteRequests\.approved\.list(map headers = {}, *Admin_inviteRequests_approved_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.inviteRequests\.approved\.list(map headers = {}, *Admin_inviteRequests_approved_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.inviteRequests.approved.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.inviteRequests\.denied\.list(map headers = {}, *Admin_inviteRequests_denied_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.inviteRequests\.denied\.list(map headers = {}, *Admin_inviteRequests_denied_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.inviteRequests.denied.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.inviteRequests\.list(map headers = {}, *Admin_inviteRequests_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.inviteRequests\.list(map headers = {}, *Admin_inviteRequests_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.inviteRequests.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.teams\.admins\.list(map headers = {}, *Admin_teams_admins_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.teams\.admins\.list(map headers = {}, *Admin_teams_admins_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.admins.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.teams\.list(map headers = {}, *Admin_teams_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.teams\.list(map headers = {}, *Admin_teams_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.teams\.owners\.list(map headers = {}, *Admin_teams_owners_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.teams\.owners\.list(map headers = {}, *Admin_teams_owners_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.owners.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.teams\.settings\.info(map headers = {}, *Admin_teams_settings_infoQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.teams\.settings\.info(map headers = {}, *Admin_teams_settings_infoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.info`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.usergroups\.listChannels(map headers = {}, *Admin_usergroups_listChannelsQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.usergroups\.listChannels(map headers = {}, *Admin_usergroups_listChannelsQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.usergroups.listChannels`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get admin\.users\.list(map headers = {}, *Admin_users_listQueries queries) returns Default\ success\ template|error { + resource isolated function get admin\.users\.list(map headers = {}, *Admin_users_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -169,7 +169,7 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get apps\.event\.authorizations\.list(map headers = {}, *Apps_event_authorizations_listQueries queries) returns Default\ success\ template|error { + resource isolated function get apps\.event\.authorizations\.list(map headers = {}, *Apps_event_authorizations_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/apps.event.authorizations.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -197,13 +197,13 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get apps\.permissions\.users\.list(map headers = {}, *Apps_permissions_users_listQueries queries) returns Default\ success\ template|error { + resource isolated function get apps\.permissions\.users\.list(map headers = {}, *Apps_permissions_users_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/apps.permissions.users.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get apps\.permissions\.users\.request(map headers = {}, *Apps_permissions_users_requestQueries queries) returns Default\ success\ template|error { + resource isolated function get apps\.permissions\.users\.request(map headers = {}, *Apps_permissions_users_requestQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/apps.permissions.users.request`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -232,7 +232,7 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get calls\.info(map headers = {}, *Calls_infoQueries queries) returns Default\ success\ template|error { + resource isolated function get calls\.info(map headers = {}, *Calls_infoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.info`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -292,13 +292,13 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get dnd\.teamInfo(map headers = {}, *Dnd_teamInfoQueries queries) returns Default\ success\ template|error { + resource isolated function get dnd\.teamInfo(map headers = {}, *Dnd_teamInfoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/dnd.teamInfo`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get emoji\.list(map headers = {}) returns Default\ success\ template|error { + resource isolated function get emoji\.list(map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/emoji.list`; return self.clientEp->get(resourcePath, headers); } @@ -315,19 +315,19 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get files\.remote\.info(map headers = {}, *Files_remote_infoQueries queries) returns Default\ success\ template|error { + resource isolated function get files\.remote\.info(map headers = {}, *Files_remote_infoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.info`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get files\.remote\.list(map headers = {}, *Files_remote_listQueries queries) returns Default\ success\ template|error { + resource isolated function get files\.remote\.list(map headers = {}, *Files_remote_listQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.list`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get files\.remote\.share(map headers = {}, *Files_remote_shareQueries queries) returns Default\ success\ template|error { + resource isolated function get files\.remote\.share(map headers = {}, *Files_remote_shareQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.share`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -339,19 +339,19 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get oauth\.access(map headers = {}, *Oauth_accessQueries queries) returns Default\ success\ template|error { + resource isolated function get oauth\.access(map headers = {}, *Oauth_accessQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/oauth.access`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get oauth\.token(map headers = {}, *Oauth_tokenQueries queries) returns Default\ success\ template|error { + resource isolated function get oauth\.token(map headers = {}, *Oauth_tokenQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/oauth.token`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get oauth\.v2\.access(map headers = {}, *Oauth_v2_accessQueries queries) returns Default\ success\ template|error { + resource isolated function get oauth\.v2\.access(map headers = {}, *Oauth_v2_accessQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/oauth.v2.access`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -392,7 +392,7 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get search\.messages(map headers = {}, *Search_messagesQueries queries) returns Default\ success\ template|error { + resource isolated function get search\.messages(map headers = {}, *Search_messagesQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/search.messages`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -410,7 +410,7 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get team\.billableInfo(map headers = {}, *Team_billableInfoQueries queries) returns Default\ success\ template|error { + resource isolated function get team\.billableInfo(map headers = {}, *Team_billableInfoQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/team.billableInfo`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); @@ -487,49 +487,49 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } - resource isolated function get views\.open(map headers = {}, *Views_openQueries queries) returns Default\ success\ template|error { + resource isolated function get views\.open(map headers = {}, *Views_openQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/views.open`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get views\.publish(map headers = {}, *Views_publishQueries queries) returns Default\ success\ template|error { + resource isolated function get views\.publish(map headers = {}, *Views_publishQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/views.publish`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get views\.push(map headers = {}, *Views_pushQueries queries) returns Default\ success\ template|error { + resource isolated function get views\.push(map headers = {}, *Views_pushQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/views.push`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get views\.update(map headers = {}, *Views_updateQueries queries) returns Default\ success\ template|error { + resource isolated function get views\.update(map headers = {}, *Views_updateQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/views.update`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get workflows\.stepCompleted(map headers = {}, *Workflows_stepCompletedQueries queries) returns Default\ success\ template|error { + resource isolated function get workflows\.stepCompleted(map headers = {}, *Workflows_stepCompletedQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/workflows.stepCompleted`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get workflows\.stepFailed(map headers = {}, *Workflows_stepFailedQueries queries) returns Default\ success\ template|error { + resource isolated function get workflows\.stepFailed(map headers = {}, *Workflows_stepFailedQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/workflows.stepFailed`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function get workflows\.updateStep(map headers = {}, *Workflows_updateStepQueries queries) returns Default\ success\ template|error { + resource isolated function get workflows\.updateStep(map headers = {}, *Workflows_updateStepQueries queries) returns DefaultSuccessResponse|error { string resourcePath = string `/workflows.updateStep`; resourcePath = resourcePath + check getPathForQueryParam(queries); return self.clientEp->get(resourcePath, headers); } - resource isolated function post admin\.apps\.approve(admin_apps_approve_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.apps\.approve(admin_apps_approve_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.apps.approve`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -537,7 +537,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.apps\.restrict(admin_apps_restrict_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.apps\.restrict(admin_apps_restrict_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.apps.restrict`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -601,7 +601,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.conversations\.restrictAccess\.addGroup(admin_conversations_restrictAccess_addGroup_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.conversations\.restrictAccess\.addGroup(admin_conversations_restrictAccess_addGroup_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.conversations.restrictAccess.addGroup`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -609,7 +609,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.conversations\.restrictAccess\.removeGroup(admin_conversations_restrictAccess_removeGroup_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.conversations\.restrictAccess\.removeGroup(admin_conversations_restrictAccess_removeGroup_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.conversations.restrictAccess.removeGroup`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -625,7 +625,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.conversations\.setTeams(admin_conversations_setTeams_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.conversations\.setTeams(admin_conversations_setTeams_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.conversations.setTeams`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -641,7 +641,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.emoji\.add(admin_emoji_add_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.emoji\.add(admin_emoji_add_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.emoji.add`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -649,7 +649,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.emoji\.addAlias(admin_emoji_addAlias_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.emoji\.addAlias(admin_emoji_addAlias_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.emoji.addAlias`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -657,7 +657,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.emoji\.remove(admin_emoji_remove_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.emoji\.remove(admin_emoji_remove_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.emoji.remove`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -665,7 +665,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.emoji\.rename(admin_emoji_rename_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.emoji\.rename(admin_emoji_rename_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.emoji.rename`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -673,7 +673,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.inviteRequests\.approve(record {string invite_request_id; string team_id?;} payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.inviteRequests\.approve(record {string invite_request_id; string team_id?;} payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.inviteRequests.approve`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -681,7 +681,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.inviteRequests\.deny(record {string invite_request_id; string team_id?;} payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.inviteRequests\.deny(record {string invite_request_id; string team_id?;} payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.inviteRequests.deny`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -689,7 +689,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.create(admin_teams_create_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.create(admin_teams_create_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.create`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -697,7 +697,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.settings\.setDefaultChannels(admin_teams_settings_setDefaultChannels_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.settings\.setDefaultChannels(admin_teams_settings_setDefaultChannels_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.setDefaultChannels`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -705,7 +705,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.settings\.setDescription(admin_teams_settings_setDescription_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.settings\.setDescription(admin_teams_settings_setDescription_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.setDescription`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -713,7 +713,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.settings\.setDiscoverability(admin_teams_settings_setDiscoverability_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.settings\.setDiscoverability(admin_teams_settings_setDiscoverability_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.setDiscoverability`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -721,7 +721,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.settings\.setIcon(admin_teams_settings_setIcon_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.settings\.setIcon(admin_teams_settings_setIcon_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.setIcon`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -729,7 +729,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.teams\.settings\.setName(admin_teams_settings_setName_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.teams\.settings\.setName(admin_teams_settings_setName_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.teams.settings.setName`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -737,7 +737,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.usergroups\.addChannels(admin_usergroups_addChannels_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.usergroups\.addChannels(admin_usergroups_addChannels_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.usergroups.addChannels`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -745,7 +745,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.usergroups\.addTeams(admin_usergroups_addTeams_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.usergroups\.addTeams(admin_usergroups_addTeams_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.usergroups.addTeams`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -753,7 +753,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.usergroups\.removeChannels(admin_usergroups_removeChannels_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.usergroups\.removeChannels(admin_usergroups_removeChannels_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.usergroups.removeChannels`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -761,7 +761,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.assign(admin_users_assign_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.assign(admin_users_assign_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.assign`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -769,7 +769,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.invite(admin_users_invite_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.invite(admin_users_invite_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.invite`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -777,7 +777,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.remove(admin_users_remove_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.remove(admin_users_remove_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.remove`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -785,7 +785,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.session\.invalidate(admin_users_session_invalidate_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.session\.invalidate(admin_users_session_invalidate_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.session.invalidate`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -793,7 +793,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.session\.reset(admin_users_session_reset_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.session\.reset(admin_users_session_reset_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.session.reset`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -801,7 +801,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.setAdmin(admin_users_setAdmin_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.setAdmin(admin_users_setAdmin_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.setAdmin`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -809,7 +809,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.setExpiration(admin_users_setExpiration_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.setExpiration(admin_users_setExpiration_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.setExpiration`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -817,7 +817,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post admin\.users\.setOwner(admin_users_setOwner_body payload, Admin_users_setOwnerHeaders headers) returns Default\ success\ template|error { + resource isolated function post admin\.users\.setOwner(admin_users_setOwner_body payload, Admin_users_setOwnerHeaders headers) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.setOwner`; map httpHeaders = getMapForHeaders(headers); http:Request request = new; @@ -826,7 +826,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, httpHeaders); } - resource isolated function post admin\.users\.setRegular(admin_users_setRegular_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post admin\.users\.setRegular(admin_users_setRegular_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/admin.users.setRegular`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -834,7 +834,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post calls\.add(calls_add_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post calls\.add(calls_add_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.add`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -842,7 +842,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post calls\.end(calls_end_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post calls\.end(calls_end_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.end`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -850,7 +850,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post calls\.participants\.add(calls_participants_add_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post calls\.participants\.add(calls_participants_add_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.participants.add`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -858,7 +858,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post calls\.participants\.remove(calls_participants_remove_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post calls\.participants\.remove(calls_participants_remove_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.participants.remove`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -866,7 +866,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post calls\.update(calls_update_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post calls\.update(calls_update_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/calls.update`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -1078,7 +1078,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post files\.remote\.add(files_remote_add_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post files\.remote\.add(files_remote_add_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.add`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -1086,7 +1086,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post files\.remote\.remove(files_remote_remove_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post files\.remote\.remove(files_remote_remove_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.remove`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); @@ -1094,7 +1094,7 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - resource isolated function post files\.remote\.update(files_remote_update_body payload, map headers = {}) returns Default\ success\ template|error { + resource isolated function post files\.remote\.update(files_remote_update_body payload, map headers = {}) returns DefaultSuccessResponse|error { string resourcePath = string `/files.remote.update`; http:Request request = new; string encodedRequestBody = createFormURLEncodedRequestBody(payload); diff --git a/ballerina/types.bal b/ballerina/types.bal index 61a072b..7e21d20 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1651,6 +1651,11 @@ public type chat_delete_body record { decimal ts?; }; +# This method either only returns a brief _OK_ response or a verbose schema is not available for this method. +public type DefaultSuccessResponse record { + defs_ok_true ok; +}; + # Represents the Queries record for the operation: users_list public type Users_listQueries record { # Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. @@ -1721,10 +1726,6 @@ public type Views_publishQueries record { string hash?; }; -public type Default\ success\ template record { - defs_ok_true ok; -}; - # Represents the Queries record for the operation: admin_usergroups_listChannels public type Admin_usergroups_listChannelsQueries record { # Flag to include or exclude the count of members per channel. diff --git a/docs/spec/openapi.json b/docs/spec/openapi.json index 8dbeabc..0dae400 100644 --- a/docs/spec/openapi.json +++ b/docs/spec/openapi.json @@ -87,7 +87,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -244,7 +244,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -402,7 +402,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -506,7 +506,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -663,7 +663,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -1381,7 +1381,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2015,7 +2015,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2116,7 +2116,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2230,7 +2230,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2658,7 +2658,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2880,7 +2880,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -2989,7 +2989,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3119,7 +3119,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3223,7 +3223,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3332,7 +3332,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3415,7 +3415,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3521,7 +3521,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3627,7 +3627,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3710,7 +3710,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3816,7 +3816,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -3925,7 +3925,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4038,7 +4038,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4148,7 +4148,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4257,7 +4257,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4357,7 +4357,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4466,7 +4466,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4570,7 +4570,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4674,7 +4674,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4783,7 +4783,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4887,7 +4887,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -4995,7 +4995,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5103,7 +5103,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5235,7 +5235,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5339,7 +5339,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5455,7 +5455,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5588,7 +5588,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5707,7 +5707,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5811,7 +5811,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -5914,7 +5914,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6021,7 +6021,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6125,7 +6125,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6234,7 +6234,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6349,7 +6349,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6453,7 +6453,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -6663,7 +6663,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -7503,7 +7503,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -7612,7 +7612,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8312,7 +8312,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8414,7 +8414,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8504,7 +8504,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8607,7 +8607,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8711,7 +8711,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -8822,7 +8822,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -14623,7 +14623,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -14702,7 +14702,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -15576,7 +15576,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -15674,7 +15674,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -15796,7 +15796,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -15899,7 +15899,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -16005,7 +16005,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -16128,7 +16128,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -16898,7 +16898,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -17038,7 +17038,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -17171,7 +17171,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -19524,7 +19524,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -20433,7 +20433,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -24417,7 +24417,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -24560,7 +24560,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -24711,7 +24711,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -24877,7 +24877,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -24975,7 +24975,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -25074,7 +25074,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } @@ -25196,7 +25196,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "DefaultSuccessResponse", "type": "object" } } diff --git a/docs/spec/sanitations.md b/docs/spec/sanitations.md new file mode 100644 index 0000000..78d3227 --- /dev/null +++ b/docs/spec/sanitations.md @@ -0,0 +1,42 @@ +@@ -0,0 +1,24 @@ +_Author_: @Chilliwiddit \ +_Created_: 2024/06/25 \ +_Edition_: Swan Lake + +# Sanitation for OpenAPI specification + +This document records the sanitation done on top of the official OpenAPI specification from Slack. The OpenAPI specification is obtained from the [APIs Guru website](https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.json). +These changes are done in order to improve the overall usability, and to address some known language limitations. + +1. Removed the token requirement from the parameter section of each endpoint in which it appeared. Endpoints in which it did not appear are: + + * admin.conversations.restrictAccess.addGroup + * admin.conversations.restrictAccess.removeGroup + * admin.emoji.add + * admin.emoji.addAlias + * admin.emoji.remove + * admin.emoji.rename + * admin.teams.settings.setDefaultChannels + * admin.teams.settings.setIcon + * dnd.setSnooze + * files.remote.add + * files.remote.remove + * files.remote.update + * files.upload + * oauth.access + * oauth.token + * oauth.v2.access + * users.deletePhoto + * users.setPhoto + +2. Changed the schema name `Default success template` to `DefaultSuccessResponse` in the components section of the OpenAPI specification, to improve the usability of the counterpart Ballerina record name. + +## OpenAPI cli command + +The following command was used to generate the Ballerina client from the OpenAPI specification. The command should be executed from the repository root directory. + +```bash +bal openapi -i docs/spec/openapi.json --mode client --license docs/license.txt -o ballerina/ +``` + +Note: The license year is hardcoded to 2024, change if necessary. diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 28ec345..0000000 --- a/examples/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Examples - -This directory contains a collection of sample code examples written in Ballerina. These examples demonstrate various -use cases of the module. You can follow the instructions below to build and run these examples. - -## Running an Example - -Execute the following commands to build an example from the source. - -* To build an example - - `bal build ` - - -* To run an example - - `bal run ` - -## Building the Examples with the Local Module - -**Warning**: Because of the absence of support for reading local repositories for single Ballerina files, the bala of -the module is manually written to the central repository as a workaround. Consequently, the bash script may modify your -local Ballerina repositories. - -Execute the following commands to build all the examples against the changes you have made to the module locally. - -* To build all the examples - - `./build.sh build` - - -* To run all the examples - - `./build.sh run` \ No newline at end of file diff --git a/examples/archiveConversation.bal b/examples/archiveConversation.bal deleted file mode 100644 index bda45d0..0000000 --- a/examples/archiveConversation.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Archive conversation. - check slackClient->archiveConversation("channelName"); -} diff --git a/examples/build.sh b/examples/build.sh deleted file mode 100755 index a0a2729..0000000 --- a/examples/build.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -BAL_EXAMPLES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -BAL_CENTRAL_DIR="$HOME/.ballerina/repositories/central.ballerina.io/" -BAL_HOME_DIR="$BAL_EXAMPLES_DIR/../ballerina" - -set -e - -case "$1" in -build) - BAL_CMD="build" - ;; -run) - BAL_CMD="run" - ;; -*) - echo "Invalid command provided: '$1'. Please provide 'build' or 'run' as the command." - exit 1 - ;; -esac - -# Read Ballerina package name -slack=$(awk -F'"' '/^name/ {print $2}' "$BAL_HOME_DIR/Ballerina.toml") - -# Push the package to the local repository -cd "$BAL_HOME_DIR" && - bal pack && - bal push --repository=local - -# Remove the cache directories in the repositories -cacheDirs=($(ls -d "$BAL_CENTRAL_DIR"/cache-* 2>/dev/null)) -for dir in "${cacheDirs[@]}"; do - [ -d "$dir" ] && rm -r "$dir" -done -echo "Successfully cleaned the cache directories" - -# Update the central repository -BAL_DESTINATION_DIR="$HOME/.ballerina/repositories/central.ballerina.io/bala/ballerinax/$slack" -BAL_SOURCE_DIR="$HOME/.ballerina/repositories/local/bala/ballerinax/$slack" -[ -d "$BAL_DESTINATION_DIR" ] && rm -r "$BAL_DESTINATION_DIR" -[ -d "$BAL_SOURCE_DIR" ] && cp -r "$BAL_SOURCE_DIR" "$BAL_DESTINATION_DIR" -echo "Successfully updated the local central repositories" - -# Loop through examples in the examples directory -find "$BAL_EXAMPLES_DIR" -type f -name "*.bal" | while read -r BAL_EXAMPLE_FILE; do - bal "$BAL_CMD" --offline "$BAL_EXAMPLE_FILE" -done diff --git a/examples/deleteFile.bal b/examples/deleteFile.bal deleted file mode 100644 index 3346203..0000000 --- a/examples/deleteFile.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Delete file. - check slackClient->deleteFile("fileId"); -} diff --git a/examples/getConversationHistory.bal b/examples/getConversationHistory.bal deleted file mode 100644 index fabb7f9..0000000 --- a/examples/getConversationHistory.bal +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get conversation history. - stream resultStream = check slackClient->getConversationHistory("channelName", - "", ""); - check resultStream.forEach(isolated function(slack:MessageInfo messageInfo) { - log:printInfo(messageInfo.toString()); - }); -} diff --git a/examples/getConversationInfo.bal b/examples/getConversationInfo.bal deleted file mode 100644 index b0e2eb4..0000000 --- a/examples/getConversationInfo.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get conversation information. - slack:Channel conversationInfo = check slackClient->getConversationInfo("channelName"); - log:printInfo(conversationInfo.toString()); -} diff --git a/examples/getConversationMembers.bal b/examples/getConversationMembers.bal deleted file mode 100644 index 84662b1..0000000 --- a/examples/getConversationMembers.bal +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get members of a channel. - stream resultStream = check slackClient->getConversationMembers("channelName"); - check resultStream.forEach(isolated function(string memberId) { - log:printInfo(memberId); - }); -} diff --git a/examples/getFileInfo.bal b/examples/getFileInfo.bal deleted file mode 100644 index adb0e57..0000000 --- a/examples/getFileInfo.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get file information. - slack:FileInfo fileInfo = check slackClient->getFileInfo("fileId"); - log:printInfo(fileInfo.toString()); -} diff --git a/examples/getUserInfoByUserId.bal b/examples/getUserInfoByUserId.bal deleted file mode 100644 index 09c3ae0..0000000 --- a/examples/getUserInfoByUserId.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get user information by userId. - slack:User userInfo = check slackClient->getUserInfoByUserId("userId"); - log:printInfo(userInfo.toString()); -} diff --git a/examples/getUserInfoByUsername.bal b/examples/getUserInfoByUsername.bal deleted file mode 100644 index 67b9369..0000000 --- a/examples/getUserInfoByUsername.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Get user information by username. - slack:User userInfo = check slackClient->getUserInfoByUsername("username"); - log:printInfo(userInfo.toString()); -} diff --git a/examples/joinConversation.bal b/examples/joinConversation.bal deleted file mode 100644 index cc29637..0000000 --- a/examples/joinConversation.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Join conversation. - check slackClient->joinConversation("channelName"); -} diff --git a/examples/leaveConversation.bal b/examples/leaveConversation.bal deleted file mode 100644 index 6d23904..0000000 --- a/examples/leaveConversation.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Leave conversation. - check slackClient->leaveConversation("channelName"); -} diff --git a/examples/listConversations.bal b/examples/listConversations.bal deleted file mode 100644 index d17a93a..0000000 --- a/examples/listConversations.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // List all the conversations. - slack:Conversations listConvResponse = check slackClient->listConversations(); - log:printInfo(listConvResponse.toString()); -} diff --git a/examples/listFiles.bal b/examples/listFiles.bal deleted file mode 100644 index 2f289f0..0000000 --- a/examples/listFiles.bal +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // List files from a Channel. - slack:FileInfo[] fileList = check slackClient->listFiles("channelName"); - log:printInfo(fileList.toString()); - -} diff --git a/examples/listUserConversations.bal b/examples/listUserConversations.bal deleted file mode 100644 index 64627f3..0000000 --- a/examples/listUserConversations.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // List User Conversations. - slack:Conversations response = check slackClient->listUserConversations(noOfItems = 10, types = "public_channel", user = "user name"); - log:printInfo(response.toString()); -} diff --git a/examples/lookupUserByEmail.bal b/examples/lookupUserByEmail.bal deleted file mode 100644 index 9ddc921..0000000 --- a/examples/lookupUserByEmail.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Lookup user by email. - slack:User? userInfo = check slackClient->lookupUserByEmail("email"); - log:printInfo(userInfo.toString()); -} diff --git a/examples/postMessage.bal b/examples/postMessage.bal deleted file mode 100644 index f09c81c..0000000 --- a/examples/postMessage.bal +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - slack:Message messageParams = { - channelName: "channelName", - text: "Hello" - }; - - // Post a message to a channel. - string postResponse = check slackClient->postMessage(messageParams); - log:printInfo("Message sent" + postResponse); -} diff --git a/examples/removeUser.bal b/examples/removeUser.bal deleted file mode 100644 index f685f45..0000000 --- a/examples/removeUser.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Remove a user from a conversation. - check slackClient->removeUserFromConversation("Channel name", "User name"); -} diff --git a/examples/unarchiveConversation.bal b/examples/unarchiveConversation.bal deleted file mode 100644 index 390a253..0000000 --- a/examples/unarchiveConversation.bal +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Unarchive conversation. - check slackClient->unArchiveConversation("channelName"); -} diff --git a/examples/uploadFile.bal b/examples/uploadFile.bal deleted file mode 100644 index 3cc55aa..0000000 --- a/examples/uploadFile.bal +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import ballerina/log; -import ballerinax/slack; -import ballerina/os; - -slack:ConnectionConfig slackConfig = { - auth: { - token: os:getEnv("SLACK_TOKEN") - } -}; - -public function main() returns error? { - slack:Client slackClient = check new (slackConfig); - - // Upload a file to a channel. - slack:FileInfo fileResponse = check slackClient->uploadFile("filePath", "channelName"); - log:printInfo(fileResponse.toString()); -}