Skip to content

Commit

Permalink
feat: Update docs for spender/employees (#534)
Browse files Browse the repository at this point in the history
* feat: Update docs for spender/employees

* Auto generate API docs

* feat: Update docs

* Auto generate API docs

* feat: Update is_enabled description

* Auto generate API docs

---------

Co-authored-by: Siva <siva@fylehq.com>
  • Loading branch information
RoshanMhatre and snarayanank2 authored Aug 7, 2024
1 parent e559888 commit 49e5bc0
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 74 deletions.
75 changes: 50 additions & 25 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ components:
type: boolean
description: |
This indicates if the resource is enabled for use within the organisation.
default: true
example: true
restricted_spender_user_ids:
type: array
Expand Down Expand Up @@ -1636,6 +1635,11 @@ components:
example: Audi
code:
$ref: '#/components/schemas/code'
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by verifying his/her email or not.
example: true
bank_ifsc:
type: string
example: SBIN0007587
Expand Down Expand Up @@ -1707,12 +1711,42 @@ components:
The unique id of an user to which the object is associated.
readOnly: true
example: uswjwgnwwgo
user_full_name:
type: string
maxLength: 255
description: |
String denoting the full name of an employee.
example: Jon Snow
delegatees:
type: object
additionalProperties: false
properties:
id:
allOf:
- $ref: '#/components/schemas/id_integer'
description: |
Delegation id.
example: 100
type:
type: string
enum:
- SHORT_TERM
- PERMANENT
description: |
Type of delegation.
example: SHORT_TERM
user_id:
$ref: '#/components/schemas/user_id'
email:
allOf:
- $ref: '#/components/schemas/email'
description: |
Email of the delegatee.
full_name:
allOf:
- $ref: '#/components/schemas/user_full_name'
description: |
Full name of the delegatee.
start_at:
type: string
format: date-time
Expand Down Expand Up @@ -1792,7 +1826,10 @@ components:
department:
$ref: '#/components/schemas/department_out_embed'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
joined_at:
$ref: '#/components/schemas/joined_at'
level_id:
Expand Down Expand Up @@ -1908,11 +1945,7 @@ components:
description: |
List of users who are approvers for this employee.
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
branch_account:
type: string
nullable: true
Expand Down Expand Up @@ -3047,13 +3080,12 @@ components:
flattened_custom_field:
$ref: '#/components/schemas/flattened_custom_field'
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down Expand Up @@ -5332,13 +5364,12 @@ components:
nullable: true
example: Branch Manager
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down Expand Up @@ -10169,12 +10200,6 @@ components:
$ref: '#/components/schemas/spend_overview_percentage'
change_percentage:
$ref: '#/components/schemas/spend_overview_change_percentage'
user_full_name:
type: string
maxLength: 255
description: |
String denoting the full name of an employee.
example: Jon Snow
spend_overview_by_user_data_out:
type: object
nullable: false
Expand Down
28 changes: 15 additions & 13 deletions reference/approver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,15 @@ components:
- id
- name
- band
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by verifying his/her email or not.
example: true
is_enabled:
type: boolean
description: |
This indicates if the resource is enabled for use within the organisation.
default: true
example: true
phone_number:
type: string
Expand Down Expand Up @@ -318,13 +322,12 @@ components:
nullable: true
example: Branch Manager
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down Expand Up @@ -1332,13 +1335,12 @@ components:
flattened_custom_field:
$ref: '#/components/schemas/flattened_custom_field'
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down
1 change: 0 additions & 1 deletion reference/hod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ components:
type: boolean
description: |
This indicates if the resource is enabled for use within the organisation.
default: true
example: true
budget_out_embed:
type: object
Expand Down
1 change: 0 additions & 1 deletion reference/hop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ components:
type: boolean
description: |
This indicates if the resource is enabled for use within the organisation.
default: true
example: true
budget_out_embed:
type: object
Expand Down
108 changes: 95 additions & 13 deletions reference/spender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ components:
type: boolean
description: |
This indicates if the resource is enabled for use within the organisation.
default: true
example: true
project_out:
type: object
Expand Down Expand Up @@ -1101,6 +1100,11 @@ components:
example:
- v1
- v2
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by verifying his/her email or not.
example: true
phone_number:
type: string
example: '+12131234567'
Expand Down Expand Up @@ -1171,13 +1175,12 @@ components:
flattened_custom_field:
$ref: '#/components/schemas/flattened_custom_field'
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down Expand Up @@ -2564,13 +2567,12 @@ components:
nullable: true
example: Branch Manager
has_accepted_invite:
type: boolean
description: |
This boolean field represents whether the employee has accepted the current org's invite by veryfying his/her email or not.
default: true
example: true
$ref: '#/components/schemas/has_accepted_invite'
is_enabled:
$ref: '#/components/schemas/is_enabled'
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
mobile:
type: string
nullable: true
Expand Down Expand Up @@ -5880,6 +5882,56 @@ components:
- matched_expenses
- last_user_matched_at
- metadata
user_full_name:
type: string
maxLength: 255
description: |
String denoting the full name of an employee.
example: Jon Snow
delegatees:
type: object
additionalProperties: false
properties:
id:
allOf:
- $ref: '#/components/schemas/id_integer'
description: |
Delegation id.
example: 100
type:
type: string
enum:
- SHORT_TERM
- PERMANENT
description: |
Type of delegation.
example: SHORT_TERM
user_id:
$ref: '#/components/schemas/user_id'
email:
allOf:
- $ref: '#/components/schemas/email'
description: |
Email of the delegatee.
full_name:
allOf:
- $ref: '#/components/schemas/user_full_name'
description: |
Full name of the delegatee.
start_at:
type: string
format: date-time
example: '2020-06-11T13:14:55.201598+00:00'
description: |
Date and time from which the delegation is active.
nullable: false
end_at:
type: string
format: date-time
example: '2020-07-11T13:14:55.201598+00:00'
description: |
Date and time till which the delegation is active. If null, delegation is active indefinitely.
nullable: true
spender_employee_out:
type: object
additionalProperties: false
Expand Down Expand Up @@ -5917,6 +5969,21 @@ components:
description: |
Represents if opt out is done by web app or sms
example: WEB_APP
is_enabled:
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
has_accepted_invite:
$ref: '#/components/schemas/has_accepted_invite'
delegatees:
type: array
nullable: true
maxItems: 1
items:
$ref: '#/components/schemas/delegatees'
description: |
List of users who are delegatees for this employee.
commute_location_not_nullable:
type: object
nullable: false
Expand Down Expand Up @@ -6016,6 +6083,21 @@ components:
description: |
Represents if opt out is done by web app or sms
example: WEB_APP
is_enabled:
allOf:
- $ref: '#/components/schemas/is_enabled'
description: |
This field indicates whether the employee is enabled in the org.
has_accepted_invite:
$ref: '#/components/schemas/has_accepted_invite'
delegatees:
type: array
nullable: true
maxItems: 1
items:
$ref: '#/components/schemas/delegatees'
description: |
List of users who are delegatees for this employee.
virtual_card_out:
type: object
properties:
Expand Down
Loading

0 comments on commit 49e5bc0

Please sign in to comment.