Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec371ec86b | ||
|
|
f4e2336771 | ||
|
|
6f9e112b72 | ||
|
|
7c21f243ed | ||
|
|
7db9914bc4 | ||
|
|
564a3936e3 | ||
|
|
44848fdffd | ||
|
|
e894925996 | ||
|
|
08f5938b79 |
@@ -25,7 +25,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Creating version"
|
echo "Creating version"
|
||||||
|
|
||||||
VERSION="0.0.13"
|
VERSION="0.1.6"
|
||||||
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
|
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
|
||||||
BRANCH_REF="${{ gitea.ref }}"
|
BRANCH_REF="${{ gitea.ref }}"
|
||||||
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
|
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package config
|
package auxiliary
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package event
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MessageEventResponse struct {
|
||||||
|
Id uuid.UUID `json:"id,omitempty"`
|
||||||
|
ScheduledMessageEventId uuid.UUID `json:"scheduled_message_event_id,omitempty"`
|
||||||
|
Response map[string]any `json:"response"`
|
||||||
|
UserId uuid.UUID `json:"user_id,omitempty"`
|
||||||
|
ContactId *uuid.UUID `json:"contact_id,omitempty"`
|
||||||
|
MessageId *uuid.UUID `json:"message_id,omitempty"`
|
||||||
|
Status string `json:"status"`
|
||||||
|
Sent time.Time `json:"sent"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package event
|
||||||
|
|
||||||
|
const (
|
||||||
|
Message_Event_Response_Status_Instant = "INSTANT"
|
||||||
|
Message_Event_Response_Status_Scheduled = "SCHEDULED"
|
||||||
|
)
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Message struct {
|
type Message struct {
|
||||||
Id uuid.UUID `json:"id"`
|
Id *uuid.UUID `json:"id,omitempty"`
|
||||||
Content string `json:"content,omitempty"`
|
Content string `json:"content"`
|
||||||
UserId uuid.UUID `json:"user_id"`
|
UserId *uuid.UUID `json:"user_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
package message
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/google/uuid"
|
|
||||||
|
|
||||||
"git.kundeng.us/phoenix/textsender-models/tx0/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MessageEventResponse struct {
|
|
||||||
Id uuid.UUID `json:"id,omitempty"`
|
|
||||||
ScheduledMessageEventId uuid.UUID `json:"scheduled_message_event_id,omitempty"`
|
|
||||||
Response types.JSONB `json:"response"`
|
|
||||||
UserId uuid.UUID `json:"user_id,omitempty"`
|
|
||||||
ContactId *uuid.UUID `json:"contact_id,omitempty"`
|
|
||||||
MessageId *uuid.UUID `json:"message_id,omitempty"`
|
|
||||||
Status string `json:"status"`
|
|
||||||
Sent time.Time `json:"sent"`
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
Message_Event_Response_Status_Instant = "INSTANT"
|
|
||||||
Message_Event_Response_Status_Scheduled = "SCHEDULED"
|
|
||||||
)
|
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
type ScheduledMessageEvent struct {
|
type ScheduledMessageEvent struct {
|
||||||
Id uuid.UUID `json:"id"`
|
Id uuid.UUID `json:"id"`
|
||||||
RecipientId uuid.UUID `json:"recipient_id"`
|
ContactId uuid.UUID `json:"contact_id"`
|
||||||
MessageId uuid.UUID `json:"message_id"`
|
MessageId uuid.UUID `json:"message_id"`
|
||||||
ScheduledMessageId uuid.UUID `json:"scheduled_message_id"`
|
ScheduledMessageId uuid.UUID `json:"scheduled_message_id"`
|
||||||
Created time.Time `json:"created"`
|
Created time.Time `json:"created"`
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ type LoginResult struct {
|
|||||||
AccessToken string `json:"access_token"`
|
AccessToken string `json:"access_token"`
|
||||||
TokenType string `json:"token_type"`
|
TokenType string `json:"token_type"`
|
||||||
ExpiresIn int64 `json:"expires_in"`
|
ExpiresIn int64 `json:"expires_in"`
|
||||||
|
IssuedAt int64 `json:"issued_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alias for LoginResult
|
// Alias for LoginResult
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NOTE: Might end up removing this
|
||||||
type JSONB json.RawMessage
|
type JSONB json.RawMessage
|
||||||
|
|
||||||
// Scan implements sql.Scanner
|
// Scan implements sql.Scanner
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ServiceUser struct {
|
type ServiceUser struct {
|
||||||
Id uuid.UUID `json:"id"`
|
Id uuid.UUID `json:"id"`
|
||||||
Username string `json:"username,omitempty"`
|
// TODO: Remove the omitempty tags at a later point
|
||||||
Passphrase string `json:"passphrase,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
Created time.Time `json:"date_created"`
|
Passphrase string `json:"passphrase,omitempty"`
|
||||||
|
Created time.Time `json:"created"`
|
||||||
|
LastLogin *time.Time `json:"last_login,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -13,6 +13,6 @@ type User struct {
|
|||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Firstname *string `json:"first_name,omitempty"`
|
Firstname *string `json:"first_name,omitempty"`
|
||||||
Lastname *string `json:"last_name,omitempty"`
|
Lastname *string `json:"last_name,omitempty"`
|
||||||
Created time.Time `json:"date_created"`
|
Created time.Time `json:"created"`
|
||||||
LastLogin *time.Time `json:"last_login,omitempty"`
|
LastLogin *time.Time `json:"last_login,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user