feat: resource rows batch operations, drop removed domains, regenerated models

This commit is contained in:
edmand46
2026-09-17 12:08:03 +03:00
parent a217f255b8
commit f3eda1e8b7
46 changed files with 197 additions and 590 deletions
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type AdminListQuestsResponse struct {
Items []QuestDefinition `json:"items,omitempty"`
NextCursor string `json:"nextCursor,omitempty"`
}
-1
View File
@@ -4,7 +4,6 @@ package models
type AdminPlayerDetails struct {
Identities []PlayerIdentity `json:"identities,omitempty"`
Inventory []InventoryItem `json:"inventory,omitempty"`
Player AdminPlayer `json:"player,omitempty"`
Storages []PlayerStorage `json:"storages,omitempty"`
WalletTransactions []WalletAudit `json:"walletTransactions,omitempty"`
-10
View File
@@ -1,10 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type AdminPlayerQuest struct {
Name string `json:"name,omitempty"`
Objectives []AdminPlayerQuestObjective `json:"objectives,omitempty"`
QuestSlug string `json:"questSlug,omitempty"`
Status string `json:"status,omitempty"`
}
-9
View File
@@ -1,9 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type AdminPlayerQuestObjective struct {
Current int64 `json:"current,omitempty"`
ObjectiveID string `json:"objectiveId,omitempty"`
Target int64 `json:"target,omitempty"`
}
@@ -1,10 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchAdjustPlayerInventoryItemsItem struct {
Amount int64 `json:"amount,omitempty"`
PlayerID string `json:"playerId,omitempty"`
Reason string `json:"reason,omitempty"`
Slug string `json:"slug,omitempty"`
}
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchAdjustPlayerInventoryItemsRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
Items []BatchAdjustPlayerInventoryItemsItem `json:"items,omitempty"`
}
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchAdjustPlayerInventoryItemsResponse struct {
Items []InventoryItem `json:"items,omitempty"`
}
+11
View File
@@ -0,0 +1,11 @@
// Code generated by apigen. DO NOT EDIT.
package models
import "encoding/json"
type BatchCreateResourceRowItem struct {
Data json.RawMessage `json:"data,omitempty"`
ID string `json:"id,omitempty"`
PlayerID string `json:"playerId,omitempty"`
}
+8
View File
@@ -0,0 +1,8 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchCreateResourceRowsRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
Items []BatchCreateResourceRowItem `json:"items,omitempty"`
}
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchDeleteLeaderboardEntriesRequest struct {
PlayerIds []string `json:"playerIds,omitempty"`
}
+8
View File
@@ -0,0 +1,8 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchDeleteResourceRowItem struct {
ID string `json:"id,omitempty"`
PlayerID string `json:"playerId,omitempty"`
}
+8
View File
@@ -0,0 +1,8 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchDeleteResourceRowsRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
Items []BatchDeleteResourceRowItem `json:"items,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchLeaderboardEntry struct {
PlayerID string `json:"playerId,omitempty"`
Score float64 `json:"score,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchPlayerQuestsItem struct {
PlayerID string `json:"playerId,omitempty"`
QuestSlug string `json:"questSlug,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchPlayerQuestsRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
Items []BatchPlayerQuestsItem `json:"items,omitempty"`
}
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchSubmitLeaderboardEntriesRequest struct {
Items []BatchLeaderboardEntry `json:"items,omitempty"`
}
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchUpdateLeaderboardEntriesRequest struct {
Items []BatchLeaderboardEntry `json:"items,omitempty"`
}
+12
View File
@@ -0,0 +1,12 @@
// Code generated by apigen. DO NOT EDIT.
package models
import "encoding/json"
type BatchUpdateResourceRowItem struct {
Data json.RawMessage `json:"data,omitempty"`
ID string `json:"id,omitempty"`
PlayerID string `json:"playerId,omitempty"`
Version int64 `json:"version,omitempty"`
}
+8
View File
@@ -0,0 +1,8 @@
// Code generated by apigen. DO NOT EDIT.
package models
type BatchUpdateResourceRowsRequest struct {
IdempotencyKey string `json:"idempotencyKey,omitempty"`
Items []BatchUpdateResourceRowItem `json:"items,omitempty"`
}
+2 -9
View File
@@ -3,13 +3,6 @@
package models
const (
ErrorCodeEarlyCompletion = "early_completion"
ErrorCodeForbidden = "forbidden"
ErrorCodeLevelNotReached = "level_not_reached"
ErrorCodeNodeNotActive = "node_not_active"
ErrorCodeObjectivesIncomplete = "objectives_incomplete"
ErrorCodeRunExpired = "run_expired"
ErrorCodeRunNotActive = "run_not_active"
ErrorCodeScenarioNotActive = "scenario_not_active"
ErrorCodeUnknownRun = "unknown_run"
ErrorCodeForbidden = "forbidden"
ErrorCodeRowReferenced = "row_referenced"
)
+7 -5
View File
@@ -3,9 +3,11 @@
package models
type ErrorResponse struct {
Code string `json:"code,omitempty"`
Error string `json:"error,omitempty"`
Index int `json:"index,omitempty"`
PlayerID string `json:"playerId,omitempty"`
RequestID string `json:"requestId,omitempty"`
Code string `json:"code,omitempty"`
Error string `json:"error,omitempty"`
Index int `json:"index,omitempty"`
Path string `json:"path,omitempty"`
PlayerID string `json:"playerId,omitempty"`
RequestID string `json:"requestId,omitempty"`
Usages []ResourceRowUsage `json:"usages,omitempty"`
}
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type GetLeaderboardEntryAroundResponse struct {
Entries []RankEntry `json:"entries,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type GetPlayerInventoryResponse struct {
Items []InventoryItem `json:"items,omitempty"`
NextCursor string `json:"nextCursor,omitempty"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type InventoryItem struct {
Amount int64 `json:"amount,omitempty"`
ID string `json:"id,omitempty"`
Slug string `json:"slug,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
}
-12
View File
@@ -1,12 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type LeaderboardDefinition struct {
MaxEntries int64 `json:"maxEntries,omitempty"`
Metric string `json:"metric,omitempty"`
Name string `json:"name,omitempty"`
ResetPeriod string `json:"resetPeriod,omitempty"`
Slug string `json:"slug,omitempty"`
SortingOrder string `json:"sortingOrder,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type ListLeaderboardEntriesResponse struct {
Entries []RankEntry `json:"entries,omitempty"`
NextCursor string `json:"nextCursor,omitempty"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type ListLeaderboardsResponse struct {
Items []LeaderboardDefinition `json:"items,omitempty"`
NextCursor string `json:"nextCursor,omitempty"`
}
-7
View File
@@ -1,7 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type ListPlayerQuestsResponse struct {
Quests []AdminPlayerQuest `json:"quests,omitempty"`
}
+8
View File
@@ -0,0 +1,8 @@
// Code generated by apigen. DO NOT EDIT.
package models
type ListResourceRowsResponse struct {
Items []ResourceRow `json:"items,omitempty"`
Total int `json:"total,omitempty"`
}
-13
View File
@@ -1,13 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type QuestDefinition struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
NextQuestID string `json:"nextQuestId,omitempty"`
Objectives []QuestObjective `json:"objectives,omitempty"`
Rewards []QuestRewardDefinition `json:"rewards,omitempty"`
Slug string `json:"slug,omitempty"`
Status string `json:"status,omitempty"`
}
-9
View File
@@ -1,9 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type QuestObjective struct {
ID string `json:"id,omitempty"`
Metric string `json:"metric,omitempty"`
Target int64 `json:"target,omitempty"`
}
-9
View File
@@ -1,9 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type QuestRewardDefinition struct {
Amount int64 `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
ItemID string `json:"itemId,omitempty"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated by apigen. DO NOT EDIT.
package models
type RankEntry struct {
PlayerID string `json:"playerId,omitempty"`
PlayerName string `json:"playerName,omitempty"`
Rank int64 `json:"rank,omitempty"`
Score float64 `json:"score,omitempty"`
}
+15
View File
@@ -0,0 +1,15 @@
// Code generated by apigen. DO NOT EDIT.
package models
import "encoding/json"
type ResourceRow struct {
CreatedAt string `json:"createdAt,omitempty"`
Data json.RawMessage `json:"data,omitempty"`
ID string `json:"id,omitempty"`
PlayerID string `json:"playerId,omitempty"`
Rank int64 `json:"rank,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Version int64 `json:"version,omitempty"`
}
+10
View File
@@ -0,0 +1,10 @@
// Code generated by apigen. DO NOT EDIT.
package models
type ResourceRowUsage struct {
DefinitionSlug string `json:"definitionSlug,omitempty"`
Field string `json:"field,omitempty"`
ModuleSlug string `json:"moduleSlug,omitempty"`
RowID string `json:"rowId,omitempty"`
}