Skip to content

Commit

Permalink
added the config lookup and set method implementation (#1676)
Browse files Browse the repository at this point in the history
Co-authored-by: Filip Maj <[email protected]>
  • Loading branch information
adebay8 and Filip Maj authored Oct 6, 2023
1 parent 4a8eeac commit 5c52029
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/web-api/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ import {
AdminWorkflowsCollaboratorsAddResponse,
AdminWorkflowsCollaboratorsRemoveResponse,
AdminWorkflowsPermissionsLookupResponse,
AdminAppsConfigLookupResponse,
AdminAppsConfigSetResponse,
} from './response';

// NOTE: could create a named type alias like data types like `SlackUserID: string`
Expand Down Expand Up @@ -296,6 +298,10 @@ export abstract class Methods extends EventEmitter<WebClientEvent> {
activities: {
list: bindApiCall<AdminAppsActivitiesListArguments, AdminAppsActivitiesListResponse>(this, 'admin.apps.activities.list'),
},
config: {
lookup: bindApiCall<AdminAppsConfigLookupArguments, AdminAppsConfigLookupResponse>(this, 'admin.apps.config.lookup'),
set: bindApiCall<AdminAppsConfigSetArguments, AdminAppsConfigSetResponse>(this, 'admin.apps.config.set'),
},
},
auth: {
policy: {
Expand Down Expand Up @@ -1037,8 +1043,11 @@ export interface AdminAppsConfigLookupArguments extends WebAPICallOptions, Token
}
export interface AdminAppsConfigSetArguments extends WebAPICallOptions, TokenOverridable {
app_id: string;
domain_restrictions?: Record<string, unknown>;
workflow_auth_strategy?: string;
domain_restrictions?: {
urls?: string[];
emails?: string[];
};
workflow_auth_strategy?: 'builder_choice' | 'end_user_strategy';
}
export interface AdminAuthPolicyAssignEntitiesArguments extends WebAPICallOptions, TokenOverridable {
entity_ids: string[];
Expand Down

0 comments on commit 5c52029

Please sign in to comment.