Skip to content

Commit

Permalink
Merge pull request #254 from effectivemade/backendApp/feature/updateD…
Browse files Browse the repository at this point in the history
…ocumentation

Backend app/feature/update documentation
  • Loading branch information
zavyalov-daniil authored Apr 28, 2024
2 parents b025d04 + 01bc039 commit de1346e
Show file tree
Hide file tree
Showing 249 changed files with 1,859 additions and 858 deletions.
11 changes: 4 additions & 7 deletions effectiveOfficeBackend/.env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
POSTGRES_PASSWORD=1234567890test
POSTGRES_DB=effectiveOfficeBackendDB
POSTGRES_USER=postgres
DATABASE_PASSWORD=1234567890test
GOOGLE_CLIENT_ID=random
GOOGLE_CLIENT_SECRET=random
VERIFICATION_PLUGIN_ENABLE=false
DATABASE_HOST=0.0.0.0
DATABASE_PORT=15432
DATABASE_NAME=effectiveOfficeBackendDB
DATABASE_USERNAME=postgres
MIGRATIONS_ENABLE=true
DATABASE_PASSWORD=1234567890test
VERIFICATION_PLUGIN_ENABLE=false
MIGRATIONS_ENABLE=false
SERVICE_ACCOUNT_KEY_PATH={your firebase service account credentials json}
JSON_CREDENTIALS={your google calendar service account credentials json}
APPLICATION_URL=https://deployed.app.example.yandexcloud.net
LOG_LEVEL=debug
LOG_LEVEL=trace
DEFAULT_CALENDAR=effective.office@effective.band
WORKSPACE_CALENDAR=c_46707d19c716de0d5d28b52082edfeb03376269e7da5fea78e43fcb15afda57e@group.calendar.google.com
1 change: 0 additions & 1 deletion effectiveOfficeBackend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ services:
SERVICE_ACCOUNT_KEY_PATH: ${SERVICE_ACCOUNT_KEY_PATH}
JSON_GOOGLE_CREDENTIALS: ${JSON_GOOGLE_CREDENTIALS}
FIREBASE_SA_JSON: ${FIREBASE_SA_JSON}
APPLICATION_URL: ${APPLICATION_URL}

db_postgres:
container_name: postgresForKtor
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ data class [RecurrenceDTO](index.md)(val interval: [Int](https://kotlinlang.org/

| Name | Summary |
|---|---|
| [toRecurrence](../-recurrence/-companion/to-recurrence.md) | [jvm]<br>fun [RecurrenceDTO](index.md).[toRecurrence](../-recurrence/-companion/to-recurrence.md)(): [Recurrence](../-recurrence/index.md) |
| [toRecurrence](../../office.effective.model/-recurrence/-companion/to-recurrence.md) | [jvm]<br>fun [RecurrenceDTO](index.md).[toRecurrence](../../office.effective.model/-recurrence/-companion/to-recurrence.md)(): [Recurrence](../../office.effective.model/-recurrence/index.md) |

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@

| Name | Summary |
|---|---|
| [Ending](-ending/index.md) | [jvm]<br>sealed class [Ending](-ending/index.md) |
| [Freq](-freq/index.md) | [jvm]<br>enum [Freq](-freq/index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)&lt;[Freq](-freq/index.md)&gt; |
| [Recurrence](-recurrence/index.md) | [jvm]<br>data class [Recurrence](-recurrence/index.md)(val interval: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), val freq: [Freq](-freq/index.md), val ending: [Ending](-ending/index.md), val byDay: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt;, val byMonth: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt;, val byYearDay: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt;, val byHour: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt;) |
| [RecurrenceDTO](-recurrence-d-t-o/index.md) | [jvm]<br>@Serializable<br>data class [RecurrenceDTO](-recurrence-d-t-o/index.md)(val interval: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? = null, val freq: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val count: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? = null, val until: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)? = null, val byDay: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt; = listOf(), val byMonth: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt; = listOf(), val byYearDay: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt; = listOf(), val byHour: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt; = listOf()) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.constants](../index.md)/[BookingConstants](index.md)/[DEFAULT_CALENDAR](-d-e-f-a-u-l-t_-c-a-l-e-n-d-a-r.md)

# DEFAULT_CALENDAR

[jvm]\
val [DEFAULT_CALENDAR](-d-e-f-a-u-l-t_-c-a-l-e-n-d-a-r.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.constants](../index.md)/[BookingConstants](index.md)/[DEFAULT_TIMEZONE_ID](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-i-d.md)

# DEFAULT_TIMEZONE_ID

[jvm]\
val [DEFAULT_TIMEZONE_ID](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-i-d.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.constants](../index.md)/[BookingConstants](index.md)/[DEFAULT_TIMEZONE_OFFSET_MILLIS](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-o-f-f-s-e-t_-m-i-l-l-i-s.md)

# DEFAULT_TIMEZONE_OFFSET_MILLIS

[jvm]\
val [DEFAULT_TIMEZONE_OFFSET_MILLIS](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-o-f-f-s-e-t_-m-i-l-l-i-s.md): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.constants](../index.md)/[BookingConstants](index.md)/[REGULAR_WORKSPACES_CALENDAR](-r-e-g-u-l-a-r_-w-o-r-k-s-p-a-c-e-s_-c-a-l-e-n-d-a-r.md)

# REGULAR_WORKSPACES_CALENDAR

[jvm]\
val [REGULAR_WORKSPACES_CALENDAR](-r-e-g-u-l-a-r_-w-o-r-k-s-p-a-c-e-s_-c-a-l-e-n-d-a-r.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.constants](../index.md)/[BookingConstants](index.md)/[UNTIL_FORMAT](-u-n-t-i-l_-f-o-r-m-a-t.md)

# UNTIL_FORMAT

[jvm]\
const val [UNTIL_FORMAT](-u-n-t-i-l_-f-o-r-m-a-t.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ Constants for booking

| Name | Summary |
|---|---|
| [DEFAULT_CALENDAR](-d-e-f-a-u-l-t_-c-a-l-e-n-d-a-r.md) | [jvm]<br>val [DEFAULT_CALENDAR](-d-e-f-a-u-l-t_-c-a-l-e-n-d-a-r.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [DEFAULT_TIMEZONE_ID](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-i-d.md) | [jvm]<br>val [DEFAULT_TIMEZONE_ID](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-i-d.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [DEFAULT_TIMEZONE_OFFSET_MILLIS](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-o-f-f-s-e-t_-m-i-l-l-i-s.md) | [jvm]<br>val [DEFAULT_TIMEZONE_OFFSET_MILLIS](-d-e-f-a-u-l-t_-t-i-m-e-z-o-n-e_-o-f-f-s-e-t_-m-i-l-l-i-s.md): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) |
| [MIN_SEARCH_START_TIME](-m-i-n_-s-e-a-r-c-h_-s-t-a-r-t_-t-i-m-e.md) | [jvm]<br>val [MIN_SEARCH_START_TIME](-m-i-n_-s-e-a-r-c-h_-s-t-a-r-t_-t-i-m-e.md): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)<br>Minimum booking start time. Bookings that started earlier should be filtered out in requests. |
| [REGULAR_WORKSPACES_CALENDAR](-r-e-g-u-l-a-r_-w-o-r-k-s-p-a-c-e-s_-c-a-l-e-n-d-a-r.md) | [jvm]<br>val [REGULAR_WORKSPACES_CALENDAR](-r-e-g-u-l-a-r_-w-o-r-k-s-p-a-c-e-s_-c-a-l-e-n-d-a-r.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [UNTIL_FORMAT](-u-n-t-i-l_-f-o-r-m-a-t.md) | [jvm]<br>const val [UNTIL_FORMAT](-u-n-t-i-l_-f-o-r-m-a-t.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.utils.impl](../index.md)/[DatabaseTransactionManagerImpl](index.md)/[DatabaseTransactionManagerImpl](-database-transaction-manager-impl.md)

# DatabaseTransactionManagerImpl

[jvm]\
constructor(database: Database)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.utils.impl](../index.md)/[DatabaseTransactionManagerImpl](index.md)

# DatabaseTransactionManagerImpl

[jvm]\
class [DatabaseTransactionManagerImpl](index.md)(database: Database) : [DatabaseTransactionManager](../../office.effective.common.utils/-database-transaction-manager/index.md)

Class used for creation database transaction on the facade layer

## Constructors

| | |
|---|---|
| [DatabaseTransactionManagerImpl](-database-transaction-manager-impl.md) | [jvm]<br>constructor(database: Database) |

## Functions

| Name | Summary |
|---|---|
| [useTransaction](use-transaction.md) | [jvm]<br>open override fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation): [T](use-transaction.md)<br>Executes code in a database transaction. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.common.utils.impl](../index.md)/[DatabaseTransactionManagerImpl](index.md)/[useTransaction](use-transaction.md)

# useTransaction

[jvm]\
open override fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation): [T](use-transaction.md)

Executes code in a database transaction.

Rollbacks the transaction if an exception was thrown.

#### Parameters

jvm

| | |
|---|---|
| serviceCall | lambda function to be executed |
| isolation | transaction isolation |
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//[com.backend.effectiveoffice](../../index.md)/[office.effective.common.utils.impl](index.md)

# Package-level declarations

## Types

| Name | Summary |
|---|---|
| [DatabaseTransactionManagerImpl](-database-transaction-manager-impl/index.md) | [jvm]<br>class [DatabaseTransactionManagerImpl](-database-transaction-manager-impl/index.md)(database: Database) : [DatabaseTransactionManager](../office.effective.common.utils/-database-transaction-manager/index.md)<br>Class used for creation database transaction on the facade layer |

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

# DatabaseTransactionManager

[jvm]\
class [DatabaseTransactionManager](index.md)(database: Database)
interface [DatabaseTransactionManager](index.md)

Class used for creation database transaction on the facade layer
Interface for classes used for creation database transaction on the facade layer

## Constructors
#### Inheritors

| | |
|---|---|
| [DatabaseTransactionManager](-database-transaction-manager.md) | [jvm]<br>constructor(database: Database) |
| |
|---|
| [DatabaseTransactionManagerImpl](../../office.effective.common.utils.impl/-database-transaction-manager-impl/index.md) |

## Functions

| Name | Summary |
|---|---|
| [useTransaction](use-transaction.md) | [jvm]<br>fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation = TransactionIsolation.READ_COMMITTED): [T](use-transaction.md)<br>Executes code in a database transaction. |
| [useTransaction](use-transaction.md) | [jvm]<br>abstract fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation = TransactionIsolation.READ_COMMITTED): [T](use-transaction.md)<br>Executes code in a database transaction. |
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# useTransaction

[jvm]\
fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation = TransactionIsolation.READ_COMMITTED): [T](use-transaction.md)
abstract fun &lt;[T](use-transaction.md)&gt; [useTransaction](use-transaction.md)(serviceCall: () -&gt; [T](use-transaction.md), isolation: TransactionIsolation = TransactionIsolation.READ_COMMITTED): [T](use-transaction.md)

Executes code in a database transaction.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

| Name | Summary |
|---|---|
| [DatabaseTransactionManager](-database-transaction-manager/index.md) | [jvm]<br>class [DatabaseTransactionManager](-database-transaction-manager/index.md)(database: Database)<br>Class used for creation database transaction on the facade layer |
| [DatabaseTransactionManager](-database-transaction-manager/index.md) | [jvm]<br>interface [DatabaseTransactionManager](-database-transaction-manager/index.md)<br>Interface for classes used for creation database transaction on the facade layer |
| [UserSession](-user-session/index.md) | [jvm]<br>data class [UserSession](-user-session/index.md)(val token: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), val email: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?) |
| [UuidValidator](-uuid-validator/index.md) | [jvm]<br>class [UuidValidator](-uuid-validator/index.md)<br>Class for UUID validation and conversion |
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@
[jvm]\
@Serializable

data class [BookingDTO](index.md)(val owner: [UserDTO](../-user-d-t-o/index.md), val participants: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[UserDTO](../-user-d-t-o/index.md)&gt;, val workspace: [WorkspaceDTO](../-workspace-d-t-o/index.md), val id: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?, val beginBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), val endBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), val recurrence: [RecurrenceDTO](../../model/-recurrence-d-t-o/index.md)? = null)
data class [~~BookingDTO~~](index.md)(val owner: [UserDTO](../-user-d-t-o/index.md), val participants: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[UserDTO](../-user-d-t-o/index.md)&gt;, val workspace: [WorkspaceDTO](../-workspace-d-t-o/index.md), val id: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?, val beginBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), val endBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), val recurrence: [RecurrenceDTO](../../model/-recurrence-d-t-o/index.md)? = null)---

### Deprecated

Deprecated since 1.0 api version

#### Replace with

```kotlin
import office.effective.dto.BookingRequestDTO

```
```kotlin
BookingRequestDTO or BookingResponseDTO
```
---

## Constructors

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.dto](../index.md)/[BookingRequestDTO](index.md)/[BookingRequestDTO](-booking-request-d-t-o.md)

# BookingRequestDTO

[jvm]\
constructor(ownerEmail: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?, participantEmails: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt;, workspaceId: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), beginBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), endBooking: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), recurrence: [RecurrenceDTO](../../model/-recurrence-d-t-o/index.md)? = null)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.dto](../index.md)/[BookingRequestDTO](index.md)/[beginBooking](begin-booking.md)

# beginBooking

[jvm]\
val [beginBooking](begin-booking.md): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[com.backend.effectiveoffice](../../../index.md)/[office.effective.dto](../index.md)/[BookingRequestDTO](index.md)/[endBooking](end-booking.md)

# endBooking

[jvm]\
val [endBooking](end-booking.md): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
Loading

0 comments on commit de1346e

Please sign in to comment.