- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.5k
17539 components the official board #18498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
        
          
          
            49 changes: 49 additions & 0 deletions
          
          49 
        
  components/the_official_board/actions/create-orgchart-pdf-file/create-orgchart-pdf-file.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import fs from "fs"; | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-create-orgchart-pdf-file", | ||
| name: "Create Orgchart PDF File", | ||
| description: "Export organization chart as PDF file. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Companies/get_export_orgchart_pdf)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| companyId: { | ||
| propDefinition: [ | ||
| app, | ||
| "companyId", | ||
| ], | ||
| description: "The ID of the company to export orgchart for", | ||
| }, | ||
| filename: { | ||
| type: "string", | ||
| label: "Target Filename", | ||
| description: "The filename that will be used to save in /tmp", | ||
| }, | ||
| syncDir: { | ||
| type: "dir", | ||
| accessMode: "write", | ||
| sync: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.exportOrgchartPdf({ | ||
| $, | ||
| params: { | ||
| id: this.companyId, | ||
| }, | ||
| }); | ||
|  | ||
| const filePath = `/tmp/${this.filename}`; | ||
| fs.writeFileSync(filePath, response); | ||
|  | ||
| $.export("$summary", `Successfully exported orgchart for company with ID ${this.companyId}`); | ||
|  | ||
| return { | ||
| filename: this.filename, | ||
| filePath, | ||
| contentType: "application/pdf", | ||
| }; | ||
| }, | ||
|         
                  luancazarine marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }; | ||
        
          
          
            49 changes: 49 additions & 0 deletions
          
          49 
        
  ...onents/the_official_board/actions/create-orgchart-xlsx-file/create-orgchart-xlsx-file.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import fs from "fs"; | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-create-orgchart-xlsx-file", | ||
| name: "Create Orgchart XLSX File", | ||
| description: "Export organization chart as XLSX file. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Companies/get_export_orgchart_excel)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| companyId: { | ||
| propDefinition: [ | ||
| app, | ||
| "companyId", | ||
| ], | ||
| description: "The ID of the company to export orgchart for", | ||
| }, | ||
| filename: { | ||
| type: "string", | ||
| label: "Target Filename", | ||
| description: "The filename that will be used to save in /tmp", | ||
| }, | ||
| syncDir: { | ||
| type: "dir", | ||
| accessMode: "write", | ||
| sync: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.exportOrgchartExcel({ | ||
| $, | ||
| params: { | ||
| id: this.companyId, | ||
| }, | ||
| }); | ||
|  | ||
| const filePath = `/tmp/${this.filename}`; | ||
| fs.writeFileSync(filePath, response); | ||
|         
                  luancazarine marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
| $.export("$summary", `Successfully exported orgchart for company with ID ${this.companyId}`); | ||
|  | ||
| return { | ||
| filename: this.filename, | ||
| filePath, | ||
| contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
| }; | ||
| }, | ||
|         
                  luancazarine marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }; | ||
        
          
          
            29 changes: 29 additions & 0 deletions
          
          29 
        
  components/the_official_board/actions/get-executive-info/get-executive-info.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-get-executive-info", | ||
| name: "Get Executive Info", | ||
| description: "Get executive biography information. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Executives/get_executive_biography)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| executiveId: { | ||
| propDefinition: [ | ||
| app, | ||
| "executiveId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getExecutiveBiography({ | ||
| $, | ||
| params: { | ||
| bioID: this.executiveId, | ||
| }, | ||
| }); | ||
|  | ||
| $.export("$summary", `Successfully retrieved executive information for executive with ID ${this.executiveId}`); | ||
| return response; | ||
| }, | ||
| }; | 
        
          
          
            30 changes: 30 additions & 0 deletions
          
          30 
        
  components/the_official_board/actions/get-orgchart-info/get-orgchart-info.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-get-orgchart-info", | ||
| name: "Get Orgchart Info", | ||
| description: "Get organization chart information for a company. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Companies/get_company_orgchart)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| companyId: { | ||
| propDefinition: [ | ||
| app, | ||
| "companyId", | ||
| ], | ||
| description: "The ID of the company to get orgchart for", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getCompanyOrgchart({ | ||
| $, | ||
| params: { | ||
| id: this.companyId, | ||
| }, | ||
| }); | ||
|  | ||
| $.export("$summary", `Successfully retrieved orgchart information for company with ID ${this.companyId}`); | ||
| return response; | ||
| }, | ||
| }; | 
        
          
          
            35 changes: 35 additions & 0 deletions
          
          35 
        
  ...ts/the_official_board/actions/search-company-org-chart-id/search-company-org-chart-id.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-search-company-org-chart-id", | ||
| name: "Search Company Org Chart ID", | ||
| description: "Search for company org chart identifier. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Companies/get_company_search)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| companyName: { | ||
| type: "string", | ||
| label: "Company Name", | ||
| description: "The name of the company to search for", | ||
| }, | ||
| amount: { | ||
| type: "integer", | ||
| label: "Amount", | ||
| description: "Amount of search results", | ||
| max: 50, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getCompanySearch({ | ||
| $, | ||
| params: { | ||
| companyName: this.companyName, | ||
| amount: this.amount, | ||
| }, | ||
| }); | ||
|  | ||
| $.export("$summary", `Successfully retrieved ${response.length} companies with name ${this.companyName}`); | ||
| return response; | ||
| }, | ||
| }; | 
        
          
          
            28 changes: 28 additions & 0 deletions
          
          28 
        
  components/the_official_board/actions/search-executive-by-name/search-executive-by-name.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import app from "../../the_official_board.app.mjs"; | ||
|  | ||
| export default { | ||
| key: "the_official_board-search-executive-by-name", | ||
| name: "Search Executive", | ||
| description: "Search for executives by name. [See the documentation](https://rest.theofficialboard.com/rest/api/doc/#/Executives/get_executive_search)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the executive to search for", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.getExecutiveSearch({ | ||
| $, | ||
| params: { | ||
| name: this.name, | ||
| }, | ||
| }); | ||
|  | ||
| $.export("$summary", `Successfully retrieved ${response.length} executives with name ${this.name}`); | ||
| return response; | ||
| }, | ||
|         
                  luancazarine marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }; | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@pipedream/the_official_board", | ||
| "version": "0.0.1", | ||
| "version": "0.1.0", | ||
| "description": "Pipedream The Official Board Components", | ||
| "main": "the_official_board.app.mjs", | ||
| "keywords": [ | ||
|  | @@ -11,5 +11,8 @@ | |
| "author": "Pipedream <[email protected]> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.1.0" | ||
| } | ||
| } | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,11 +1,79 @@ | ||
| import { axios } from "@pipedream/platform"; | ||
|  | ||
| export default { | ||
| type: "app", | ||
| app: "the_official_board", | ||
| propDefinitions: {}, | ||
| propDefinitions: { | ||
| companyId: { | ||
| type: "string", | ||
| label: "Company ID", | ||
| description: "The ID of the company", | ||
| }, | ||
| executiveId: { | ||
| type: "string", | ||
| label: "Bio ID", | ||
| description: "The ID of the executive to get information for", | ||
| }, | ||
| }, | ||
| methods: { | ||
| // this.$auth contains connected account data | ||
| authKeys() { | ||
| console.log(Object.keys(this.$auth)); | ||
| _baseApiUrl() { | ||
| return "https://rest.theofficialboard.com/rest"; | ||
| }, | ||
| _headers(headers = {}) { | ||
| return { | ||
| "token": this.$auth.api_token, | ||
| "Accept": "application/json", | ||
| ...headers, | ||
| }; | ||
| }, | ||
| _makeRequest({ | ||
| $ = this, | ||
| path, | ||
| ...args | ||
| } = {}) { | ||
| return axios($, { | ||
| url: `${this._baseApiUrl()}${path}`, | ||
| headers: this._headers(), | ||
| ...args, | ||
| }); | ||
| }, | ||
| getExecutiveSearch(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/executive/search", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getCompanySearch(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/company/search", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getCompanyOrgchart(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/company/orgchart", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| exportOrgchartExcel(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/export/orgchart-excel", | ||
| responseType: "arraybuffer", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| exportOrgchartPdf(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/export/orgchart-pdf", | ||
| responseType: "arraybuffer", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getExecutiveBiography(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/executive/biography", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| }, | ||
| }; | 
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.