{ "openapi": "3.1.1", "info": { "version": "1.0.0", "title": "AWorld API - v1 Dashboard Endpoints", "description": "The Dashboard context provides APIs for administration and management functions, enabling account owners and administrators to configure and monitor their AWorld environments. These APIs are designed for use in administrative interfaces and management tools." }, "servers": [], "paths": { "/activities": { "get": { "operationId": "activities/list", "summary": "List activities", "description": "Retrieves a paginated list of activities available in the workspace", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of activities retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListActivitiesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Activities" ] }, "post": { "operationId": "activities/create", "summary": "Create activity", "description": "Creates a new activity with the specified ID.", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "description": "Translated label for the Activity", "type": "string", "minLength": 1 }, "description": { "description": "Translated description for the Activity", "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Activity created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "409": { "description": "Activity ID already exists" } }, "tags": [ "Activities" ] } }, "/activities/{activityId}": { "get": { "operationId": "activities/get", "summary": "Get activity by ID", "description": "Retrieves a specific activity by its unique identifier", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } ], "responses": { "200": { "description": "Activity retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetActivityResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities" ] }, "put": { "operationId": "activities/update", "summary": "Update activity", "description": "Updates an existing activity identified by its ID", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "description": "Translated label for the Activity", "type": "string", "minLength": 1 }, "description": { "description": "Translated description for the Activity", "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "activityId", "name", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Activity updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateActivityResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities" ] } }, "/activities/{activityId}/publish": { "post": { "operationId": "activities/publish", "summary": "Publish an activity", "description": "Publishes an activity, making it available for use in the application", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } ], "responses": { "200": { "description": "Activity published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishActivityResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities" ] } }, "/activities/{activityId}/tags": { "get": { "operationId": "activities/listTags", "summary": "List activity tag assignments", "description": "Retrieves a list of tag assignments for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListActivityTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities/Tags" ] }, "post": { "operationId": "activities/createTags", "summary": "Create multiple activity tag assignments", "description": "Creates multiple tag assignments for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag not found" } }, "tags": [ "Activities/Tags" ] }, "patch": { "operationId": "activities/updateTags", "summary": "Update multiple activity tag assignments", "description": "Updates multiple tag assignments for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateActivityTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag not found" } }, "tags": [ "Activities/Tags" ] }, "delete": { "operationId": "activities/deleteTags", "summary": "Delete multiple activity tag assignments", "description": "Deletes multiple tag assignments for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "204": { "description": "Tag assignments deleted successfully" }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities/Tags" ] } }, "/activities/{activityId}/tags/{tagId}": { "get": { "operationId": "activities/getTag", "summary": "Get activity tag assignment", "description": "Retrieves a specific tag assignment for an activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetActivityTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag assignment not found" } }, "tags": [ "Activities/Tags" ] }, "post": { "operationId": "activities/createTag", "summary": "Create activity tag assignment", "description": "Creates a tag assignment for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateActivityTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag not found" } }, "tags": [ "Activities/Tags" ] }, "patch": { "operationId": "activities/updateTag", "summary": "Update activity tag assignment", "description": "Updates a tag assignment for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateActivityTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag not found" } }, "tags": [ "Activities/Tags" ] }, "delete": { "operationId": "activities/deleteTag", "summary": "Delete activity tag assignment", "description": "Deletes a tag assignment for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "204": { "description": "Tag assignment deleted successfully" }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity or tag assignment not found" } }, "tags": [ "Activities/Tags" ] } }, "/activities/{activityId}/translations": { "get": { "operationId": "activities/listTranslations", "summary": "List activity translations", "description": "Retrieves a list of translations for a specific activity", "parameters": [ { "name": "activityId", "in": "path", "description": "The unique ID of the activity. Should be a nanoid", "required": true, "schema": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListActivityTranslationsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Activity not found" } }, "tags": [ "Activities/Translations" ] } }, "/mission-configurations": { "get": { "operationId": "missionConfigurations/list", "summary": "List mission configurations", "description": "Retrieves a list of mission configurations with optional filtering and pagination", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Mission configurations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionConfigurationsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "MissionConfigurations" ] }, "post": { "operationId": "missionConfigurations/create", "summary": "Create mission configuration", "description": "Creates a new mission configuration with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Mission configuration created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionConfigurationResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "MissionConfigurations" ] } }, "/mission-configurations/{missionConfigurationId}": { "get": { "operationId": "missionConfigurations/get", "summary": "Get mission configuration by ID", "description": "Retrieves a specific mission configuration by its unique identifier", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } ], "responses": { "200": { "description": "Mission configuration retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMissionConfigurationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations" ] }, "put": { "operationId": "missionConfigurations/update", "summary": "Update mission configuration", "description": "Updates an existing mission configuration with the provided data", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "translations" ] } } } }, "responses": { "200": { "description": "Mission configuration updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionConfigurationResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations" ] } }, "/mission-configurations/{missionConfigurationId}/publish": { "post": { "operationId": "missionConfigurations/publish", "summary": "Publish mission configuration", "description": "Publishes a mission configuration, making it available for use", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } ], "responses": { "200": { "description": "Mission configuration published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishMissionConfigurationResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations" ] } }, "/mission-configurations/{missionConfigurationId}/tags": { "get": { "operationId": "missionConfigurations/listTags", "summary": "List mission configuration tag assignments", "description": "Retrieves a list of tag assignments for a specific mission configuration", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionConfigurationTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations/Tags" ] }, "post": { "operationId": "missionConfigurations/createTags", "summary": "Create multiple mission configuration tag assignments", "description": "Creates multiple tag assignments for a specific mission configuration", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration or tag not found" } }, "tags": [ "MissionConfigurations/Tags" ] }, "patch": { "operationId": "missionConfigurations/updateTags", "summary": "Update multiple mission configuration tag assignments", "description": "Updates multiple tag assignments for a specific mission configuration", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration or tag not found" } }, "tags": [ "MissionConfigurations/Tags" ] }, "delete": { "operationId": "missionConfigurations/deleteTags", "summary": "Delete multiple mission configuration tag assignments", "description": "Deletes multiple tag assignments for a specific mission configuration", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteMissionConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations/Tags" ] } }, "/mission-configurations/{missionConfigurationId}/tags/{tagId}": { "post": { "operationId": "missionConfigurations/createTag", "summary": "Create mission configuration tag assignment", "description": "Creates a tag assignment for a specific mission configuration and tag", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionConfigurationTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration or tag not found" }, "409": { "description": "Tag assignment already exists" } }, "tags": [ "MissionConfigurations/Tags" ] }, "patch": { "operationId": "missionConfigurations/updateTag", "summary": "Update mission configuration tag assignment", "description": "Updates a tag assignment for a specific mission configuration and tag", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionConfigurationTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration, tag, or tag assignment not found" } }, "tags": [ "MissionConfigurations/Tags" ] }, "delete": { "operationId": "missionConfigurations/deleteTag", "summary": "Delete mission configuration tag assignment", "description": "Deletes a tag assignment for a specific mission configuration and tag", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteMissionConfigurationTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration or tag assignment not found" } }, "tags": [ "MissionConfigurations/Tags" ] }, "get": { "operationId": "missionConfigurations/getTag", "summary": "Get mission configuration tag assignment", "description": "Retrieves a specific tag assignment for a mission configuration", "parameters": [ { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMissionConfigurationTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration or tag assignment not found" } }, "tags": [ "MissionConfigurations/Tags" ] } }, "/mission-configurations/{missionConfigurationId}/translations": { "get": { "operationId": "missionConfigurations/listTranslations", "summary": "List mission configuration translations", "description": "Retrieves a list of translations for a specific mission configuration", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "missionConfigurationId", "in": "path", "description": "Unique identifier for the mission configuration (NanoID).", "required": true, "schema": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionConfigurationTranslationsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission configuration not found" } }, "tags": [ "MissionConfigurations/Translations" ] } }, "/mission-rules": { "get": { "operationId": "missionRules/list", "summary": "List mission rules", "description": "Retrieves a list of mission rules with optional filtering and pagination", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Mission rules retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionRulesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "MissionRules" ] }, "post": { "operationId": "missionRules/create", "summary": "Create mission rule", "description": "Creates a new mission rule with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "missionRuleCatalogId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionRuleId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Mission rule created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "MissionRules" ] } }, "/mission-rules/{missionRuleId}": { "get": { "operationId": "missionRules/get", "summary": "Get mission rule by ID", "description": "Retrieves a specific mission rule by its unique identifier", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Mission rule retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMissionRuleResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules" ] }, "put": { "operationId": "missionRules/update", "summary": "Update mission rule", "description": "Updates an existing mission rule with the provided data", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "name": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "missionRuleId", "name", "defaultLang", "missionType", "missionsMatchCondition", "assignmentMode", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "translations" ] } } } }, "responses": { "200": { "description": "Mission rule updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules" ] } }, "/mission-rules/{missionRuleId}/publish": { "post": { "operationId": "missionRules/publish", "summary": "Publish mission rule", "description": "Publishes a mission rule, making it available for use", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Mission rule published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishMissionRuleResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules" ] } }, "/mission-rules/{missionRuleId}/tags": { "get": { "operationId": "missionRules/listTags", "summary": "List mission rule tag assignments", "description": "Retrieves a list of tag assignments for a specific mission rule", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionRuleTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules/Tags" ] }, "post": { "operationId": "missionRules/createTags", "summary": "Create multiple mission rule tag assignments", "description": "Creates multiple tag assignments for a specific mission rule", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionRuleTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule or tag not found" } }, "tags": [ "MissionRules/Tags" ] }, "patch": { "operationId": "missionRules/updateTags", "summary": "Update multiple mission rule tag assignments", "description": "Updates multiple tag assignments for a specific mission rule", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionRuleTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule or tag not found" } }, "tags": [ "MissionRules/Tags" ] }, "delete": { "operationId": "missionRules/deleteTags", "summary": "Delete multiple mission rule tag assignments", "description": "Deletes multiple tag assignments for a specific mission rule", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteMissionRuleTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules/Tags" ] } }, "/mission-rules/{missionRuleId}/tags/{tagId}": { "get": { "operationId": "missionRules/getTag", "summary": "Get mission rule tag assignment", "description": "Retrieves a specific tag assignment for a mission rule", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMissionRuleTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule or tag assignment not found" } }, "tags": [ "MissionRules/Tags" ] }, "post": { "operationId": "missionRules/createTag", "summary": "Create mission rule tag assignment", "description": "Creates a tag assignment for a specific mission rule and tag", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMissionRuleTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule or tag not found" }, "409": { "description": "Tag assignment already exists" } }, "tags": [ "MissionRules/Tags" ] }, "patch": { "operationId": "missionRules/updateTag", "summary": "Update mission rule tag assignment", "description": "Updates a tag assignment for a specific mission rule and tag", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMissionRuleTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule, tag, or tag assignment not found" } }, "tags": [ "MissionRules/Tags" ] }, "delete": { "operationId": "missionRules/deleteTag", "summary": "Delete mission rule tag assignment", "description": "Deletes a tag assignment for a specific mission rule and tag", "parameters": [ { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteMissionRuleTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule or tag assignment not found" } }, "tags": [ "MissionRules/Tags" ] } }, "/mission-rules/{missionRuleId}/translations": { "get": { "operationId": "missionRules/listTranslations", "summary": "List mission rule translations", "description": "Retrieves a list of translations for a specific mission rule", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "missionRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMissionRuleTranslationsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mission rule not found" } }, "tags": [ "MissionRules/Translations" ] } }, "/missions": { "post": { "operationId": "missions/create", "summary": "Create mission (manual)", "description": "Manually assigns a mission to a user or a group. This is typically used for specific cases not covered by mission rules.", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "startsAt": { "type": "string", "format": "date-time" }, "endsAt": { "type": "string", "format": "date-time" }, "currentAmount": { "type": "number", "default": 0 }, "targetAmount": { "type": "number" }, "timeframeType": { "type": "string", "enum": [ "RANGE", "PERMANENT" ] } }, "required": [ "missionType", "missionConfigurationId", "startsAt", "timeframeType" ] } } } }, "responses": { "201": { "description": "Mission assignment created successfully.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CreateMissionResponse" }, { "properties": { "userId": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "missionId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "missionRuleId": { "type": "string" }, "periodId": { "type": "string", "minLength": 1 }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "startsAt": { "type": "string", "format": "date-time" }, "endsAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "isCompleted": { "type": "boolean" }, "state": { "type": "string", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "incrementExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "targetAmountExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "currentAmount": { "type": "number" }, "targetAmount": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } } } ] } } } }, "400": { "description": "Invalid input. Check request body for missing fields or incorrect values." }, "401": { "description": "Unauthorized." }, "404": { "description": "Referenced mission, user, or groupTagId not found." }, "409": { "description": "Conflict. The mission might already be assigned to the user/group for the specified period." } }, "deprecated": false, "tags": [ "Missions" ] } }, "/mobility/activation": { "get": { "operationId": "mobilityActivation/get", "summary": "Get mobility activation", "description": "Retrieves current mobility tracking activation status", "responses": { "200": { "description": "Mobility activation retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMobilityActivationResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] }, "put": { "operationId": "mobilityActivation/update", "summary": "Update mobility activation", "description": "Updates mobility tracking activation status", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "on", "off" ] } }, "required": [ "status" ] } } } }, "responses": { "200": { "description": "Mobility activation updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMobilityActivationResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] } }, "/mobility/milestones": { "get": { "operationId": "mobilityMilestones/list", "summary": "List mobility milestones", "description": "Retrieves a paginated list of mobility milestones", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Mobility milestones retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMobilityMilestonesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] } }, "/mobility/milestones/{mobilityMilestoneId}": { "get": { "operationId": "mobilityMilestones/get", "summary": "Get mobility milestone", "description": "Retrieves a specific mobility milestone by its ID", "parameters": [ { "name": "mobilityMilestoneId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Mobility milestone retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMobilityMilestoneResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mobility milestone not found" } }, "tags": [ "Mobility" ] } }, "/mobility/milestones/{mobilityMilestoneId}/redeem": { "post": { "operationId": "mobilityMilestones/redeem", "summary": "Redeem mobility milestone", "description": "Redeems a mobility milestone for rewards", "parameters": [ { "name": "mobilityMilestoneId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Mobility milestone redeemed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RedeemMobilityMilestoneResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Mobility milestone not found" } }, "tags": [ "Mobility" ] } }, "/mobility/motiontag/status": { "get": { "operationId": "mobilityMotiontag/getStatus", "summary": "Get MotionTag status", "description": "Retrieves current activation status of MotionTag tracking", "responses": { "200": { "description": "MotionTag status retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMotionTagStatusResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] } }, "/mobility/motiontag/token": { "get": { "operationId": "mobilityMotiontag/getToken", "summary": "Get MotionTag token", "description": "Retrieves authentication token for MotionTag integration", "responses": { "200": { "description": "MotionTag token retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetMotionTagTokenResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] } }, "/mobility/trackings": { "get": { "operationId": "mobilityTrackings/list", "summary": "List mobility trackings", "description": "Retrieves a list of mobility tracking data with optional date filtering", "parameters": [ { "name": "date", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" } }, { "name": "dateEnd", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" } }, { "name": "dateStart", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Mobility trackings retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMobilityTrackingsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Mobility" ] } }, "/quiz/{quizId}/translations": { "get": { "operationId": "quizzesTranslations/list", "summary": "List quiz translations", "description": "Retrieve a list of all translations for a specific quiz", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of quiz translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuizTranslationsResponse" } } } } }, "tags": [ "Quizzes/Translations" ] } }, "/quizzes": { "get": { "operationId": "quizzes/list", "summary": "List quizzes", "description": "Retrieves a list of quizzes with optional filtering and pagination", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Quizzes retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuizzesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Quizzes" ] }, "post": { "operationId": "quizzes/create", "summary": "Create quiz", "description": "Creates a new quiz with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "quizCatalogId": { "type": "string" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "quizId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "explanation": { "type": "string", "minLength": 1 } }, "required": [ "lang", "opt1", "opt2", "opt3", "opt4", "question" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "difficulty", "correctAnswer", "placement", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Quiz created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateQuizResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}": { "get": { "operationId": "quizzes/get", "summary": "Get quiz by ID", "description": "Retrieves a specific quiz by its unique identifier", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Quiz retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuizResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes" ] }, "put": { "operationId": "quizzes/update", "summary": "Update quiz", "description": "Updates an existing quiz with the provided data", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "explanation": { "type": "string", "minLength": 1 } }, "required": [ "lang", "opt1", "opt2", "opt3", "opt4", "question" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Quiz updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateQuizResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}/publish": { "post": { "operationId": "quizzes/publish", "summary": "Publish quiz", "description": "Publishes a quiz, making it available for use", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Quiz published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishQuizResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes" ] } }, "/quizzes/{quizId}/tags": { "get": { "operationId": "quizzes/listTags", "summary": "List quiz tag assignments", "description": "Retrieves a list of tag assignments for a specific quiz", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuizTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes/Tags" ] }, "post": { "operationId": "quizzes/createTags", "summary": "Create multiple quiz tag assignments", "description": "Creates multiple tag assignments for a specific quiz", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateQuizTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag not found" } }, "tags": [ "Quizzes/Tags" ] }, "patch": { "operationId": "quizzes/updateTags", "summary": "Update multiple quiz tag assignments", "description": "Updates multiple tag assignments for a specific quiz", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateQuizTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag not found" } }, "tags": [ "Quizzes/Tags" ] }, "delete": { "operationId": "quizzes/deleteTags", "summary": "Delete multiple quiz tag assignments", "description": "Deletes multiple tag assignments for a specific quiz", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteQuizTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz not found" } }, "tags": [ "Quizzes/Tags" ] } }, "/quizzes/{quizId}/tags/{tagId}": { "get": { "operationId": "quizzes/getTag", "summary": "Get quiz tag assignment", "description": "Retrieves a specific tag assignment for a quiz", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuizTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag assignment not found" } }, "tags": [ "Quizzes/Tags" ] }, "post": { "operationId": "quizzes/createTag", "summary": "Create quiz tag assignment", "description": "Creates a tag assignment for a specific quiz and tag", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateQuizTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag not found" }, "409": { "description": "Tag assignment already exists" } }, "tags": [ "Quizzes/Tags" ] }, "patch": { "operationId": "quizzes/updateTag", "summary": "Update quiz tag assignment", "description": "Updates a tag assignment for a specific quiz and tag", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateQuizTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz, tag, or tag assignment not found" } }, "tags": [ "Quizzes/Tags" ] }, "delete": { "operationId": "quizzes/deleteTag", "summary": "Delete quiz tag assignment", "description": "Deletes a tag assignment for a specific quiz and tag", "parameters": [ { "name": "quizId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteQuizTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Quiz or tag assignment not found" } }, "tags": [ "Quizzes/Tags" ] } }, "/reward-rules": { "get": { "operationId": "rewardRules/list", "summary": "List reward rules", "description": "Retrieves a paginated list of reward rules available in the workspace", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of reward rules retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListRewardRulesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "RewardRules" ] }, "post": { "operationId": "rewardRules/create", "summary": "Create reward rule", "description": "Creates a new reward rule with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "rewardRuleCatalogId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "defaultLang", "rewards", "translations" ] } } } }, "responses": { "201": { "description": "Reward rule created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRewardRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "RewardRules" ] } }, "/reward-rules/{rewardRuleId}": { "get": { "operationId": "rewardRules/get", "summary": "Get reward rule by ID", "description": "Retrieves a specific reward rule by its unique identifier", "parameters": [ { "name": "rewardRuleId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Reward rule retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetRewardRuleResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Reward rule not found" } }, "tags": [ "RewardRules" ] }, "put": { "operationId": "rewardRules/update", "summary": "Update reward rule", "description": "Updates an existing reward rule with the provided data", "parameters": [ { "name": "rewardRuleId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "defaultLang", "ruleType", "applicationMode", "matchEntity", "matchCondition", "rewards", "translations" ] } } } }, "responses": { "200": { "description": "Reward rule updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRewardRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Reward rule not found" } }, "tags": [ "RewardRules" ] } }, "/reward-rules/{rewardRuleId}/publish": { "post": { "operationId": "rewardRules/publish", "summary": "Publish reward rule", "description": "Publishes a reward rule, making it active and available for use", "parameters": [ { "name": "rewardRuleId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Reward rule published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishRewardRuleResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Reward rule not found" } }, "tags": [ "RewardRules" ] } }, "/stories": { "get": { "operationId": "stories/list", "summary": "List stories", "description": "Retrieves a list of stories with optional filtering and pagination", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Stories retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStoriesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Stories" ] }, "post": { "operationId": "stories/create", "summary": "Create story", "description": "Creates a new story with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "storyCatalogId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } } }, "required": [ "lang", "title", "image", "slides" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "defaultLang", "langs", "translations" ] } } } }, "responses": { "201": { "description": "Story created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStoryResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}": { "get": { "operationId": "stories/get", "summary": "Get story by ID", "description": "Retrieves a specific story by its unique identifier", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Story retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStoryResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories" ] }, "put": { "operationId": "stories/update", "summary": "Update story", "description": "Updates an existing story with the provided data", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "defaultStoryLayoutId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } } }, "required": [ "lang", "title", "image", "slides" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "storyId", "origin", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Story updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStoryResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}/publish": { "post": { "operationId": "stories/publish", "summary": "Publish story", "description": "Publishes a story, making it available for use", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Story published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishStoryResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories" ] } }, "/stories/{storyId}/tags": { "get": { "operationId": "stories/listTags", "summary": "List story tag assignments", "description": "Retrieves a list of tag assignments for a specific story", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStoryTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories/Tags" ] }, "post": { "operationId": "stories/createTags", "summary": "Create multiple story tag assignments", "description": "Creates multiple tag assignments for a specific story", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStoryTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag not found" } }, "tags": [ "Stories/Tags" ] }, "patch": { "operationId": "stories/updateTags", "summary": "Update multiple story tag assignments", "description": "Updates multiple tag assignments for a specific story", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStoryTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag not found" } }, "tags": [ "Stories/Tags" ] }, "delete": { "operationId": "stories/deleteTags", "summary": "Delete multiple story tag assignments", "description": "Deletes multiple tag assignments for a specific story", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteStoryTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories/Tags" ] } }, "/stories/{storyId}/tags/{tagId}": { "get": { "operationId": "stories/getTag", "summary": "Get story tag assignment", "description": "Retrieves a specific tag assignment for a story", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStoryTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag assignment not found" } }, "tags": [ "Stories/Tags" ] }, "post": { "operationId": "stories/createTag", "summary": "Create story tag assignment", "description": "Creates a tag assignment for a specific story and tag", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStoryTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag not found" }, "409": { "description": "Tag assignment already exists" } }, "tags": [ "Stories/Tags" ] }, "patch": { "operationId": "stories/updateTag", "summary": "Update story tag assignment", "description": "Updates a tag assignment for a specific story and tag", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStoryTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Story, tag, or tag assignment not found" } }, "tags": [ "Stories/Tags" ] }, "delete": { "operationId": "stories/deleteTag", "summary": "Delete story tag assignment", "description": "Deletes a tag assignment for a specific story and tag", "parameters": [ { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteStoryTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story or tag assignment not found" } }, "tags": [ "Stories/Tags" ] } }, "/story/{storyId}/translations": { "get": { "operationId": "storiesTranslations/list", "summary": "List story translations", "description": "Retrieve a list of all translations for a specific story", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "storyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of story translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStoryTranslationsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Story not found" } }, "tags": [ "Stories/Translations" ] } }, "/streak-configurations": { "get": { "operationId": "streakConfigurations/list", "summary": "List streak configurations", "description": "Retrieves a paginated list of streak configurations available in the workspace", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of streak configurations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreakConfigurationsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "StreakConfigurations" ] }, "post": { "operationId": "streakConfigurations/create", "summary": "Create streak configuration", "description": "Creates a new streak configuration with the provided data", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "streakConfigurationCatalogId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "streakConfigurationId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "matchType", "matchEntity", "matchCondition", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Streak configuration created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStreakConfigurationResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "StreakConfigurations" ] } }, "/streak-configurations/{streakConfigurationId}": { "get": { "operationId": "streakConfigurations/get", "summary": "Get streak configuration by ID", "description": "Retrieves a specific streak configuration by its unique identifier", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations" ] } } }, { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Streak configuration retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStreakConfigurationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations" ] }, "put": { "operationId": "streakConfigurations/update", "summary": "Update streak configuration", "description": "Updates an existing streak configuration with the provided data", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "matchType", "matchEntity", "matchCondition", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Streak configuration updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStreakConfigurationResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations" ] } }, "/streak-configurations/{streakConfigurationId}/publish": { "post": { "operationId": "streakConfigurations/publish", "summary": "Publish streak configuration", "description": "Publishes a streak configuration, making it active and available for use", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Streak configuration published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishStreakConfigurationResponse" } } } }, "400": { "description": "Invalid request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations" ] } }, "/streak-configurations/{streakConfigurationId}/tags": { "get": { "operationId": "streakConfigurations/listTags", "summary": "List streak configuration tag assignments", "description": "Retrieve all tag assignments for a specific streak configuration", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreakConfigurationTagAssignmentsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] }, "post": { "operationId": "streakConfigurations/createTags", "summary": "Create multiple streak configuration tag assignments", "description": "Create multiple tag assignments for a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "201": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStreakConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] }, "patch": { "operationId": "streakConfigurations/updateTags", "summary": "Update multiple streak configuration tag assignments", "description": "Update multiple tag assignments for a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStreakConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] }, "delete": { "operationId": "streakConfigurations/deleteTags", "summary": "Delete multiple streak configuration tag assignments", "description": "Delete multiple tag assignments from a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteStreakConfigurationTagAssignmentsResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] } }, "/streak-configurations/{streakConfigurationId}/tags/{tagId}": { "get": { "operationId": "streakConfigurations/getTag", "summary": "Get streak configuration tag assignment", "description": "Retrieve a specific tag assignment for a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStreakConfigurationTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag assignment or streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] }, "post": { "operationId": "streakConfigurations/createTag", "summary": "Create streak configuration tag assignment", "description": "Create a tag assignment for a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "201": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStreakConfigurationTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration or tag not found" }, "409": { "description": "Tag assignment already exists" } }, "tags": [ "StreakConfigurations/Tags" ] }, "patch": { "operationId": "streakConfigurations/updateTag", "summary": "Update streak configuration tag assignment", "description": "Update a specific tag assignment for a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStreakConfigurationTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag assignment or streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] }, "delete": { "operationId": "streakConfigurations/deleteTag", "summary": "Delete streak configuration tag assignment", "description": "Delete a specific tag assignment from a streak configuration", "parameters": [ { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteStreakConfigurationTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag assignment or streak configuration not found" } }, "tags": [ "StreakConfigurations/Tags" ] } }, "/streak-configurations/{streakConfigurationId}/translations": { "get": { "operationId": "streakConfigurations/listTranslations", "summary": "List streak configuration translations", "description": "Retrieve a list of all translations for a specific streak configuration", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "streakConfigurationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of streak configuration translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreakConfigurationTranslationsResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak configuration not found" } }, "tags": [ "StreakConfigurations/Translations" ] } }, "/streak-rules": { "post": { "operationId": "streakRules/create", "summary": "Create streak rule", "description": "Creates a new streak rule with the specified configurations", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "streakRuleCatalogId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "streakRuleId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "lang", "name" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Streak rule created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateStreakRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "StreakRules" ] }, "get": { "operationId": "streakRules/list", "summary": "List streak rules", "description": "Retrieves a paginated list of streak rules available in the workspace", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "PENDING", "ACTIVE", "ENDED" ] } } ], "responses": { "200": { "description": "List of streak rules retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreakRulesResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "StreakRules" ] } }, "/streak-rules/{streakRuleId}": { "get": { "operationId": "streakRules/get", "summary": "Get streak rule by ID", "description": "Retrieves a specific streak rule by its unique identifier", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "translations" ] } } }, { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Streak rule retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStreakRuleResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules" ] }, "put": { "operationId": "streakRules/update", "summary": "Update streak rule", "description": "Updates an existing streak rule identified by its ID", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "lang", "name" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Streak rule updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStreakRuleResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules" ] } }, "/streak-rules/{streakRuleId}/publish": { "post": { "operationId": "streakRules/publish", "summary": "Publish streak rule", "description": "Publishes a streak rule, making it available for use", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Streak rule published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishStreakRuleResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules" ] } }, "/streak-rules/{streakRuleId}/tags": { "get": { "operationId": "streakRules/listTags", "summary": "List streak rule tag assignments", "description": "Retrieves a list of tag assignments for a specific streak rule", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreakRuleTagAssignmentsList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules/Tags" ] }, "post": { "operationId": "streakRules/createTags", "summary": "Create multiple streak rule tag assignments", "description": "Creates multiple tag assignments for a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreakRuleTagAssignmentsCollection" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules/Tags" ] }, "patch": { "operationId": "streakRules/updateTags", "summary": "Update multiple streak rule tag assignments", "description": "Updates multiple tag assignments for a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatedStreakRuleTagAssignmentsCollection" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules/Tags" ] }, "delete": { "operationId": "streakRules/deleteTags", "summary": "Delete multiple streak rule tag assignments", "description": "Deletes multiple tag assignments from a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "204": { "description": "Tag assignments deleted successfully" }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules/Tags" ] } }, "/streak-rules/{streakRuleId}/tags/{tagId}": { "get": { "operationId": "streakRules/getTag", "summary": "Get streak rule tag assignment", "description": "Retrieves a specific tag assignment for a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetStreakRuleTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule or tag assignment not found" } }, "tags": [ "StreakRules/Tags" ] }, "post": { "operationId": "streakRules/createTag", "summary": "Create streak rule tag assignment", "description": "Creates a tag assignment for a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakRuleId" ] } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule or tag not found" } }, "tags": [ "StreakRules/Tags" ] }, "patch": { "operationId": "streakRules/updateTag", "summary": "Update streak rule tag assignment", "description": "Updates a tag assignment for a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStreakRuleTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule or tag assignment not found" } }, "tags": [ "StreakRules/Tags" ] }, "delete": { "operationId": "streakRules/deleteTag", "summary": "Delete streak rule tag assignment", "description": "Deletes a tag assignment from a streak rule", "parameters": [ { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "204": { "description": "Tag assignment deleted successfully" }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule or tag assignment not found" } }, "tags": [ "StreakRules/Tags" ] } }, "/streak-rules/{streakRuleId}/translations": { "get": { "operationId": "streakRules/listTranslations", "summary": "List streak rule translations", "description": "Retrieves a list of translations for a specific streak rule", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "streakRuleId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListStreakRuleTranslationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "StreakRules/Translations" ] } }, "/streak-rules/{virtualCurrencyId}/translations": { "get": { "operationId": "virtualCurrencies/listTranslations", "summary": "List streak rule translations", "description": "Retrieves a list of translations for a specific streak rule", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "virtualCurrencyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of translations retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListVirtualCurrencyTranslationResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Streak rule not found" } }, "tags": [ "VirtualCurrencies/Translations" ] } }, "/tags": { "post": { "operationId": "tags/create", "summary": "Create tag", "description": "Creates a new tag with translations", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "namespace", "variant", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Tag created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTagResponse" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" } }, "tags": [ "Tags" ] }, "get": { "operationId": "tags/list", "summary": "List all tags", "description": "Retrieves a paginated list of tags", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Tags retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTagsResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Tags" ] } }, "/tags/{tagId}": { "get": { "operationId": "tags/get", "summary": "Get tag by ID", "description": "Retrieves a specific tag by its unique identifier", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTagResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag not found" } }, "tags": [ "Tags" ] }, "put": { "operationId": "tags/update", "summary": "Update tag", "description": "Updates an existing tag with new data", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "namespace", "variant", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Tag updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTagResponse" } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag not found" } }, "tags": [ "Tags" ] } }, "/tags/{tagId}/publish": { "post": { "operationId": "tags/publish", "summary": "Publish tag", "description": "Publishes a tag, making it available for use", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } } ], "responses": { "200": { "description": "Tag published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishTagResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Tag not found" } }, "tags": [ "Tags" ] } }, "/users": { "post": { "operationId": "users/create", "summary": "Create user", "description": "Creates a new user with the specified configurations", "parameters": [ { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/Timezone" }, { "default": "UTC" } ] }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" } }, "required": [ "email" ] } } } }, "responses": { "201": { "description": "User created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" } }, "tags": [ "Users" ] }, "get": { "operationId": "users/list", "summary": "List users", "description": "Retrieves a paginated list of users available in the workspace", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags", "principal" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "List of users retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListUsersResponse" } } } }, "401": { "description": "Unauthorized" } }, "tags": [ "Users" ] } }, "/users/by-external-id/{externalId}": { "get": { "operationId": "users/getByExternalId", "summary": "Get user by external ID", "description": "Retrieves a specific user by its external identifier", "parameters": [ { "name": "externalId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "tags" ] } } } ], "responses": { "200": { "description": "User retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetUserByExternalIdResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users" ] } }, "/users/{userId}": { "get": { "operationId": "users/delete", "summary": "Delete (anonymise) user by ID", "description": "Deletes a specific user by its unique identifier.\n\n**Important details:**\n- This operation does **not** permanently remove the user from the platform. Instead, the user is **anonymised** — any activities, contributions, or records associated with the user remain available for analytics, auditing, or reporting purposes, but they can no longer be traced back to the individual.\n- All user-specific and identifying data within the workspace — such as the **profile image**, **nickname**, and other non-essential user attributes — are **wiped out** during anonymisation.\n- The deletion process affects only the **workspace-level user**. The user's **principal** entity — which represents a higher-level identity spanning multiple workspaces — is **not deleted**. \n The principal contains personally identifiable information (PII) such as **first name**, **last name**, and **email**, and remains intact to preserve cross-workspace identity integrity.\n\nThis ensures that user data within a specific workspace is anonymised while maintaining system consistency and historical integrity across the platform.", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "User deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteUserResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users" ] } }, "/users/{userId}/tags": { "get": { "operationId": "users/listTags", "summary": "List user tag assignments", "description": "Retrieves a list of tag assignments for a specific user", "parameters": [ { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of tag assignments retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserTagAssignmentsList" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users/Tags" ] }, "post": { "operationId": "users/createTags", "summary": "Create multiple user tag assignments", "description": "Creates multiple tag assignments for a user", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserTagAssignmentsCollection" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users/Tags" ] }, "patch": { "operationId": "users/updateTags", "summary": "Update multiple user tag assignments", "description": "Updates multiple tag assignments for a user", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "200": { "description": "Tag assignments updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatedUserTagAssignmentsCollection" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users/Tags" ] }, "delete": { "operationId": "users/deleteTags", "summary": "Delete multiple user tag assignments", "description": "Deletes multiple tag assignments from a user", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 } }, "required": [ "tagId" ] }, "maxItems": 25, "minItems": 1 } }, "required": [ "assignments" ] } } } }, "responses": { "204": { "description": "Tag assignments deleted successfully" }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "User not found" } }, "tags": [ "Users/Tags" ] } }, "/users/{userId}/tags/{tagId}": { "get": { "operationId": "users/getTag", "summary": "Get user tag assignment", "description": "Retrieves a specific tag assignment for a user", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Tag assignment retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetUserTagAssignmentResponse" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "User or tag assignment not found" } }, "tags": [ "Users/Tags" ] }, "post": { "operationId": "users/createTag", "summary": "Create user tag assignment", "description": "Creates a tag assignment for a user", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "userId" ] } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "User or tag not found" } }, "tags": [ "Users/Tags" ] }, "patch": { "operationId": "users/updateTag", "summary": "Update user tag assignment", "description": "Updates a tag assignment for a user", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "x-idempotency-key", "in": "header", "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "required": false, "schema": { "description": "Optional (but recommended) idempotency key to prevent duplicate processing of the same request. Any string can be used (e.g., a UUID or a nanoid).", "type": "string", "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "integer", "default": 0, "minimum": 0 } } } } } }, "responses": { "200": { "description": "Tag assignment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserTagAssignmentResponse" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "Unauthorized" }, "404": { "description": "User or tag assignment not found" } }, "tags": [ "Users/Tags" ] }, "delete": { "operationId": "users/deleteTag", "summary": "Delete user tag assignment", "description": "Deletes a tag assignment from a user", "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1 } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Tag assignment deleted successfully" }, "401": { "description": "Unauthorized" }, "404": { "description": "User or tag assignment not found" } }, "tags": [ "Users/Tags" ] } }, "/virtual-currencies": { "post": { "operationId": "virtualCurrencies/create", "summary": "Create virtual currency", "description": "Create a new virtual currency", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "virtualCurrencyId": { "type": "string" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "defaultLang", "translations" ] } } } }, "responses": { "201": { "description": "Virtual currency created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVirtualCurrencyResponse" } } } } }, "tags": [ "VirtualCurrencies" ] }, "get": { "operationId": "virtualCurrencies/list", "summary": "List virtual currencies", "description": "List virtual currencies with optional pagination and field selection", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "translations" ] } } }, { "name": "limit", "in": "query", "description": "Size of the page", "required": false, "schema": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 } }, { "name": "nextToken", "in": "query", "description": "Pagination cursor for fetching the next set of results", "required": false, "schema": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } ], "responses": { "200": { "description": "Virtual currencies retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListVirtualCurrenciesResponse" } } } } }, "tags": [ "VirtualCurrencies" ] } }, "/virtual-currencies/{virtualCurrencyId}": { "get": { "operationId": "virtualCurrencies/get", "summary": "Get virtual currency", "description": "Get a virtual currency by ID", "parameters": [ { "name": "fields", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "translations" ] } } }, { "name": "virtualCurrencyId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "virtualCurrencyId", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Virtual currency retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetVirtualCurrencyResponse" } } } } }, "tags": [ "VirtualCurrencies" ] }, "put": { "operationId": "virtualCurrencies/update", "summary": "Update virtual currency", "description": "Update a virtual currency", "parameters": [ { "name": "virtualCurrencyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": [ "lang", "label" ] }, "maxItems": 10, "minItems": 1 } }, "required": [ "name", "defaultLang", "translations" ] } } } }, "responses": { "200": { "description": "Virtual currency updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateVirtualCurrencyResponse" } } } } }, "tags": [ "VirtualCurrencies" ] } }, "/virtual-currencies/{virtualCurrencyId}/publish": { "post": { "operationId": "virtualCurrencies/publish", "summary": "Publish virtual currency", "description": "Publish a virtual currency", "parameters": [ { "name": "virtualCurrencyId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Virtual currency published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishVirtualCurrencyResponse" } } } } }, "tags": [ "VirtualCurrencies" ] } }, "/virtual-transactions": { "post": { "operationId": "virtualTransactions/create", "summary": "Create Virtual Transaction", "description": "Create a new Virtual Transaction", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "sourceUserId": { "type": "string" }, "destinationUserId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" } }, "required": [ "virtualCurrencyId", "redemptionMode", "amount", "destinationUserId" ], "additionalProperties": false }, "maxItems": 20, "minItems": 1 } }, "required": [ "transactions" ] } } } }, "responses": { "201": { "description": "Virtual Transaction created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVirtualTransactionResponse" } } } } }, "tags": [ "VirtualTransactions" ] } } }, "components": { "parameters": {}, "schemas": { "ActivityTranslation": { "description": "Translated data for the Activity", "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "description": "Translated label for the Activity", "type": "string", "minLength": 1 }, "description": { "description": "Translated description for the Activity", "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "activityId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] }, "ActivityWithResolvedFields": { "description": "Activity entity representing a custom task or action that users can complete, including resolved fields", "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "origin": { "description": "Whether the activity comes from a central catalog or is custom-created", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "syncWithCatalog": { "description": "Whether the activity should be synced with catalog updates", "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "description": "List of language codes available for this activity", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "$ref": "#/components/schemas/ActivityTranslation" } } }, "required": [ "activityId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateActivityResponse": { "description": "Activity entity representing a task or action that users can complete", "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "origin": { "description": "Whether the activity comes from a central catalog or is custom-created", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "syncWithCatalog": { "description": "Whether the activity should be synced with catalog updates", "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "description": "List of language codes available for this activity", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "activityId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateActivityTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "activityId" ] }, "CreateActivityTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "activityId" ] } } }, "required": [ "assignments" ] }, "CreateMissionConfigurationResponse": { "description": "Mission configuration entity that defines which entities contribute to mission progress. It should be used in conjunction with Mission Rules to create complex mission logic, such as 'New users should perform an Activity each day for 7 consecutive days'.", "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateMissionConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionConfigurationId" ] }, "CreateMissionConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionConfigurationId" ] } } }, "required": [ "assignments" ] }, "CreateMissionResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "missionId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "missionRuleId": { "type": "string" }, "periodId": { "type": "string", "minLength": 1 }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "startsAt": { "type": "string", "format": "date-time" }, "endsAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "isCompleted": { "type": "boolean" }, "state": { "type": "string", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "$ref": "#/components/schemas/JsonLogicExpression" }, "incrementExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "targetAmountExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "currentAmount": { "type": "number" }, "targetAmount": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "missionId", "missionType", "missionConfigurationId", "periodId", "timeframeType", "startsAt", "state", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "currentAmount", "targetAmount", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateMissionRuleResponse": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "missionRuleId", "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateMissionRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionRuleId" ] }, "CreateMissionRuleTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionRuleId" ] } } }, "required": [ "assignments" ] }, "CreateQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateQuizTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "quizId" ] }, "CreateQuizTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "quizId" ] } } }, "required": [ "assignments" ] }, "CreateRewardRuleResponse": { "type": "object", "properties": { "rewardRuleId": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "rewardRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "rewardRuleId", "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "origin", "defaultLang", "langs", "rewards", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "storyId", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateStoryTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "storyId" ] }, "CreateStoryTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "storyId" ] } } }, "required": [ "assignments" ] }, "CreateStreakConfigurationResponse": { "type": "object", "properties": { "streakConfigurationId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakConfigurationCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "streakConfigurationId", "name", "matchType", "matchEntity", "matchCondition", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateStreakConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakConfigurationId" ] }, "CreateStreakConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakConfigurationId" ] } } }, "required": [ "assignments" ] }, "CreateStreakRuleResponse": { "type": "object", "properties": { "streakRuleId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "streakRuleId", "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "tagCatalogId": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "namespace", "variant", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "CreateUserResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "principalId": { "type": "string" }, "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/Timezone" }, { "default": "UTC" } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "principalId", "accountId", "workspaceId", "createdAt", "updatedAt" ] }, "CreateVirtualCurrencyResponse": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "virtualCurrencyId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "CreateVirtualTransactionResponse": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "virtualCurrencyId": { "type": "string" }, "virtualTransactionId": { "type": "string" }, "virtualTransactionGroupId": { "type": "string" }, "redemptionGroupId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "state": { "type": "string", "enum": [ "PENDING", "COMPLETED", "EXPIRED", "REJECTED" ] }, "direction": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] }, "initiatorType": { "type": "string", "enum": [ "USER", "REWARD_RULE", "SYSTEM", "ADMIN" ] }, "initiator": { "type": "string", "minLength": 1 }, "counterpartType": { "type": "string", "enum": [ "USER", "SYSTEM" ] }, "counterpart": { "type": "string", "minLength": 1 }, "additionalData": { "type": "object", "additionalProperties": {} }, "amount": { "type": "number" }, "expiresAt": { "type": "string", "format": "date-time" }, "redeemedAt": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "userId", "virtualCurrencyId", "virtualTransactionId", "virtualTransactionGroupId", "redemptionMode", "state", "direction", "initiatorType", "initiator", "counterpartType", "counterpart", "amount", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "transactions" ] }, "DeleteMissionConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "additionalProperties": {}, "required": [ "tagId", "entityType", "entityId", "deleted", "missionConfigurationId" ] }, "DeleteMissionConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "deleted", "missionConfigurationId" ], "additionalProperties": {} } } }, "required": [ "assignments" ] }, "DeleteMissionRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "missionRuleId": { "type": "string" } }, "additionalProperties": {}, "required": [ "tagId", "entityType", "entityId", "deleted", "missionRuleId" ] }, "DeleteMissionRuleTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "missionRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "deleted", "missionRuleId" ], "additionalProperties": {} } } }, "required": [ "assignments" ] }, "DeleteQuizTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "quizId": { "type": "string" } }, "additionalProperties": {}, "required": [ "tagId", "entityType", "entityId", "deleted", "quizId" ] }, "DeleteQuizTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "deleted", "quizId" ], "additionalProperties": {} } } }, "required": [ "assignments" ] }, "DeleteStoryTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "storyId": { "type": "string" } }, "additionalProperties": {}, "required": [ "tagId", "entityType", "entityId", "deleted", "storyId" ] }, "DeleteStoryTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "storyId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "deleted", "storyId" ], "additionalProperties": {} } } }, "required": [ "assignments" ] }, "DeleteStreakConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "streakConfigurationId": { "type": "string" } }, "additionalProperties": {}, "required": [ "tagId", "entityType", "entityId", "deleted", "streakConfigurationId" ] }, "DeleteStreakConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "deleted": { "type": "boolean", "enum": [ true ] }, "streakConfigurationId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "deleted", "streakConfigurationId" ], "additionalProperties": {} } } }, "required": [ "assignments" ] }, "DeleteUserResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "deleted": { "type": "boolean" } }, "required": [ "userId", "deleted" ] }, "GetActivityResponse": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "origin": { "description": "Whether the activity comes from a central catalog or is custom-created", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "syncWithCatalog": { "description": "Whether the activity should be synced with catalog updates", "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "description": "List of language codes available for this activity", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "$ref": "#/components/schemas/ActivityTranslation" } } }, "required": [ "activityId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetActivityTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "activityId" ] }, "GetMissionConfigurationResponse": { "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetMissionConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionConfigurationId" ] }, "GetMissionRuleResponse": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionRuleId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionRuleId", "lang", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "missionRuleId", "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetMissionRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionRuleId" ] }, "GetMobilityActivationResponse": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "on", "off" ] }, "provider": { "type": "string" }, "userId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "status", "provider", "userId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetMobilityMilestoneResponse": { "type": "object", "properties": { "mobilityMilestoneId": { "type": "string" }, "date": { "type": "string", "format": "date" }, "userId": { "type": "string" }, "userTimezone": { "type": "string" }, "metric": { "type": "string", "enum": [ "minutes", "km", "co2" ] }, "target": { "type": "string", "enum": [ "target0", "target1", "target2", "target3", "target4", "target5", "target6", "target7", "target8", "target9" ] }, "transportTypes": { "type": "array", "items": { "type": "string", "enum": [ "walk", "bicycle", "tram", "train", "subway", "bus" ] } }, "goal": { "type": "number" }, "userAmount": { "type": "number" }, "reached": { "type": "boolean" }, "reachedAt": { "type": "string", "format": "date-time" }, "reachedAtT": { "type": "integer" }, "redeemed": { "type": "boolean" }, "redeemedAt": { "type": "string", "format": "date-time" }, "redeemedAtT": { "type": "integer" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "mobilityMilestoneId", "date", "userId", "userTimezone", "metric", "target", "transportTypes", "goal", "reached", "redeemed", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetMotionTagStatusResponse": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ] }, "GetMotionTagTokenResponse": { "type": "object", "properties": { "token": { "type": [ "string", "null" ] } } }, "GetQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "quizId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "explanation": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "quizId", "lang", "opt1", "opt2", "opt3", "opt4", "question", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetQuizTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "quizId" ] }, "GetRewardRuleResponse": { "type": "object", "properties": { "rewardRuleId": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "rewardRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "rewardRuleId", "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "origin", "defaultLang", "langs", "rewards", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "storyId", "lang", "title", "image", "slides", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "quizzes": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "storyId", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetStoryTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "storyId" ] }, "GetStreakConfigurationResponse": { "type": "object", "properties": { "streakConfigurationId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakConfigurationCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "streakConfigurationId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "streakConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "streakConfigurationId", "name", "matchType", "matchEntity", "matchCondition", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetStreakConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakConfigurationId" ] }, "GetStreakRuleResponse": { "type": "object", "properties": { "streakRuleId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "streakRuleId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "name": { "type": "string" }, "description": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "streakRuleId", "lang", "name", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "streakRuleId", "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetStreakRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakRuleId" ] }, "GetTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "tagCatalogId": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "namespace", "variant", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "GetUserByExternalIdResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "principalId": { "type": "string" }, "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/Timezone" }, { "default": "UTC" } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } } }, "required": [ "userId", "principalId", "accountId", "workspaceId", "createdAt", "updatedAt" ] }, "GetUserResponse": { "type": "object", "properties": { "userId": { "type": "string" }, "principalId": { "type": "string" }, "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/Timezone" }, { "default": "UTC" } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "principal": { "anyOf": [ { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "principalId", "sub", "email", "firstName", "lastName", "createdAt", "updatedAt" ] }, { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" } }, "required": [ "principalId", "sub", "email" ] } ] } }, "required": [ "userId", "principalId", "accountId", "workspaceId", "createdAt", "updatedAt" ] }, "GetUserTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "userId" ] }, "GetVirtualCurrencyResponse": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "virtualCurrencyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "virtualCurrencyId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "virtualCurrencyId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "JsonLogicExpression": { "description": "A JSON Logic expression used to define conditional rules in a declarative way.\n\nJSON Logic is a lightweight way to express rules, conditions, and decision trees in JSON format.\nThis schema only validates that the input is valid JSON; it does not validate the correctness of\nthe JSON Logic operators or semantics.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "Lang": { "description": "Supported Locale", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "ListActivitiesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ActivityWithResolvedFields" } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListActivityTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListActivityTranslationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "limit": { "description": "Size of the page", "type": "integer", "example": 10, "exclusiveMinimum": 0 }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "activityId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionConfigurationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionConfigurationId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionConfigurationTranslationsResponse": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "ListMissionRulesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionRuleId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionRuleId", "lang", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "missionRuleId", "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionRuleTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "missionRuleId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMissionRuleTranslationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "missionRuleId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "missionRuleId", "lang", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMobilityMilestonesResponse": { "type": "object", "properties": { "items": { "type": "object", "properties": { "mobilityMilestoneId": { "type": "string" }, "date": { "type": "string", "format": "date" }, "userId": { "type": "string" }, "userTimezone": { "type": "string" }, "metric": { "type": "string", "enum": [ "minutes", "km", "co2" ] }, "target": { "type": "string", "enum": [ "target0", "target1", "target2", "target3", "target4", "target5", "target6", "target7", "target8", "target9" ] }, "transportTypes": { "type": "array", "items": { "type": "string", "enum": [ "walk", "bicycle", "tram", "train", "subway", "bus" ] } }, "goal": { "type": "number" }, "userAmount": { "type": "number" }, "reached": { "type": "boolean" }, "reachedAt": { "type": "string", "format": "date-time" }, "reachedAtT": { "type": "integer" }, "redeemed": { "type": "boolean" }, "redeemedAt": { "type": "string", "format": "date-time" }, "redeemedAtT": { "type": "integer" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "mobilityMilestoneId", "date", "userId", "userTimezone", "metric", "target", "transportTypes", "goal", "reached", "redeemed", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListMobilityTrackingsResponse": { "type": "object", "properties": { "items": { "type": "object", "properties": { "mobilityTrackingId": { "type": "string" }, "date": { "type": "string", "format": "date" }, "userId": { "type": "string" }, "userTimezone": { "type": "string" }, "provider": { "type": "string" }, "status": { "type": "string", "enum": [ "track", "stay" ] }, "type": { "type": "string", "enum": [ "airplane", "bicycle", "bus", "cablecar", "car", "ferry", "light_rail", "other", "regional_train", "subway", "train", "tram", "walk" ] }, "length": { "type": "number" }, "misdetectedCompletely": { "type": "boolean" }, "suspicious": { "type": "boolean" }, "startsAt": { "type": "string", "format": "date-time" }, "startsAtTimezone": { "type": "string" }, "endsAt": { "type": "string", "format": "date-time" }, "endsAtTimezone": { "type": "string" }, "co2Emitted": { "type": "number" }, "co2Avoided": { "type": "number" }, "geometry": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "mobilityTrackingId", "date", "userId", "userTimezone", "provider", "status", "misdetectedCompletely", "suspicious", "startsAt", "startsAtTimezone", "endsAt", "endsAtTimezone", "co2Emitted", "co2Avoided", "geometry", "accountId", "workspaceId", "sourceRegion" ] }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListQuizTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "quizId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListQuizTranslationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "quizId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "explanation": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "quizId", "lang", "opt1", "opt2", "opt3", "opt4", "question", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListQuizzesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "quizId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "opt1": { "type": "string", "minLength": 1 }, "opt2": { "type": "string", "minLength": 1 }, "opt3": { "type": "string", "minLength": 1 }, "opt4": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "explanation": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "quizId", "lang", "opt1", "opt2", "opt3", "opt4", "question", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListRewardRulesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "rewardRuleId": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "rewardRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "rewardRuleId", "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "origin", "defaultLang", "langs", "rewards", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStoriesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "storyId", "lang", "title", "image", "slides", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "quizzes": { "type": "array", "items": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "storyId", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStoryTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "storyId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStoryTranslationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "storyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "title": { "type": "string", "minLength": 1 }, "image": { "type": "string", "format": "uri" }, "slides": { "type": "array", "items": { "type": "object", "properties": { "background": { "type": "string" }, "textColor": { "type": "string" }, "boxColor": { "type": "string" }, "contents": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "slide", "media" ] }, "text": { "type": "string" }, "media": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "decor", "image", "video" ] }, "url": { "type": "string", "format": "uri" } }, "required": [ "type", "url" ] } }, "required": [ "type" ] } } }, "required": [ "background", "textColor", "boxColor", "contents" ] } }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "storyId", "lang", "title", "image", "slides", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreakConfigurationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "streakConfigurationId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakConfigurationCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "streakConfigurationId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "streakConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "streakConfigurationId", "name", "matchType", "matchEntity", "matchCondition", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreakConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakConfigurationId" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreakConfigurationTranslationsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "streakConfigurationId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "streakConfigurationId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreakRulesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "items": { "description": "List of returned items" }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } } } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListStreakRuleTranslationResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "streakRuleId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "name": { "type": "string" }, "description": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "streakRuleId", "lang", "name", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListTagsResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "tagCatalogId": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "namespace", "variant", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListUsersResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "principalId": { "type": "string" }, "externalId": { "type": "string", "minLength": 1 }, "nickname": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^(?!.*[_.\\- ]{2,})[\\p{L}\\p{M}\\p{N}\\p{S}_ .-]{2,30}$/u" }, "profileImage": { "type": "string", "format": "uri" }, "lang": { "allOf": [ { "$ref": "#/components/schemas/Lang" }, { "default": "en" } ] }, "timezone": { "allOf": [ { "$ref": "#/components/schemas/Timezone" }, { "default": "UTC" } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "tagId", "createdAt", "updatedAt" ] } }, "principal": { "anyOf": [ { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "principalId", "sub", "email", "firstName", "lastName", "createdAt", "updatedAt" ] }, { "type": "object", "properties": { "principalId": { "type": "string" }, "sub": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "firstName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" }, "lastName": { "type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[\\p{L}\\p{M}' -]+$/u" } }, "required": [ "principalId", "sub", "email" ] } ] } }, "required": [ "userId", "principalId", "accountId", "workspaceId", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListVirtualCurrenciesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "translations": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "virtualCurrencyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "virtualCurrencyId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } } }, "required": [ "virtualCurrencyId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "ListVirtualCurrencyTranslationResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "virtualCurrencyId": { "type": "string" }, "lang": { "$ref": "#/components/schemas/Lang" }, "label": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "workspaceId", "virtualCurrencyId", "lang", "label", "accountId", "sourceRegion", "createdAt", "updatedAt" ] } }, "nextToken": { "description": "Pagination cursor for fetching the next set of results", "type": [ "string", "null" ], "example": "eyJwayI6IndvcmtzcGFjZUlkI3pPR0JndVctQWoiLCJxdWl6SWQiOiItRktBdDZfbXM4M3RvSUZaLWVjeFQifQ==" } }, "required": [ "items" ] }, "PublishActivityResponse": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "origin": { "description": "Whether the activity comes from a central catalog or is custom-created", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "syncWithCatalog": { "description": "Whether the activity should be synced with catalog updates", "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "description": "List of language codes available for this activity", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "activityId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishMissionConfigurationResponse": { "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishMissionRuleResponse": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "missionRuleId", "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishRewardRuleResponse": { "type": "object", "properties": { "rewardRuleId": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "rewardRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "rewardRuleId", "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "origin", "defaultLang", "langs", "rewards", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "storyId", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishStreakConfigurationResponse": { "type": "object", "properties": { "streakConfigurationId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakConfigurationCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "streakConfigurationId", "name", "matchType", "matchEntity", "matchCondition", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishStreakRuleResponse": { "type": "object", "properties": { "streakRuleId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "streakRuleId", "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "tagCatalogId": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "tagId", "namespace", "variant", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "PublishVirtualCurrencyResponse": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "virtualCurrencyId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "RedeemMobilityMilestoneResponse": { "type": "object", "properties": { "mobilityMilestoneId": { "type": "string" }, "date": { "type": "string", "format": "date" }, "userId": { "type": "string" }, "userTimezone": { "type": "string" }, "metric": { "type": "string", "enum": [ "minutes", "km", "co2" ] }, "target": { "type": "string", "enum": [ "target0", "target1", "target2", "target3", "target4", "target5", "target6", "target7", "target8", "target9" ] }, "transportTypes": { "type": "array", "items": { "type": "string", "enum": [ "walk", "bicycle", "tram", "train", "subway", "bus" ] } }, "goal": { "type": "number" }, "userAmount": { "type": "number" }, "reached": { "type": "boolean" }, "reachedAt": { "type": "string", "format": "date-time" }, "reachedAtT": { "type": "integer" }, "redeemed": { "type": "boolean" }, "redeemedAt": { "type": "string", "format": "date-time" }, "redeemedAtT": { "type": "integer" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "mobilityMilestoneId", "date", "userId", "userTimezone", "metric", "target", "transportTypes", "goal", "reached", "redeemed", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "SourceRegion": { "description": "Geographic Region where the entry was originally generated", "type": "string", "enum": [ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ca-central-1", "ca-west-1", "eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-1", "eu-south-2", "eu-north-1", "me-central-1", "me-south-1", "sa-east-1" ] }, "StreakRuleTagAssignmentsCollection": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakRuleId" ] } } }, "required": [ "assignments" ] }, "StreakRuleTagAssignmentsList": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "streakRuleId" ] }, "Timezone": { "description": "Supported timezones", "type": "string", "enum": [ "Europe/Andorra", "Asia/Dubai", "Asia/Kabul", "America/Antigua", "America/Anguilla", "Europe/Tirane", "Asia/Yerevan", "Africa/Luanda", "Antarctica/McMurdo", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Mawson", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "America/Argentina/Buenos_Aires", "America/Argentina/Cordoba", "America/Argentina/Salta", "America/Argentina/Jujuy", "America/Argentina/Tucuman", "America/Argentina/Catamarca", "America/Argentina/La_Rioja", "America/Argentina/San_Juan", "America/Argentina/Mendoza", "America/Argentina/San_Luis", "America/Argentina/Rio_Gallegos", "America/Argentina/Ushuaia", "Pacific/Pago_Pago", "Europe/Vienna", "Australia/Lord_Howe", "Antarctica/Macquarie", "Australia/Hobart", "Australia/Melbourne", "Australia/Sydney", "Australia/Broken_Hill", "Australia/Brisbane", "Australia/Lindeman", "Australia/Adelaide", "Australia/Darwin", "Australia/Perth", "Australia/Eucla", "America/Aruba", "Europe/Mariehamn", "Asia/Baku", "Europe/Sarajevo", "America/Barbados", "Asia/Dhaka", "Europe/Brussels", "Africa/Ouagadougou", "Europe/Sofia", "Asia/Bahrain", "Africa/Bujumbura", "Africa/Porto-Novo", "America/St_Barthelemy", "Atlantic/Bermuda", "Asia/Brunei", "America/La_Paz", "America/Kralendijk", "America/Noronha", "America/Belem", "America/Fortaleza", "America/Recife", "America/Araguaina", "America/Maceio", "America/Bahia", "America/Sao_Paulo", "America/Campo_Grande", "America/Cuiaba", "America/Santarem", "America/Porto_Velho", "America/Boa_Vista", "America/Manaus", "America/Eirunepe", "America/Rio_Branco", "America/Nassau", "Asia/Thimphu", "Africa/Gaborone", "Europe/Minsk", "America/Belize", "America/St_Johns", "America/Halifax", "America/Glace_Bay", "America/Moncton", "America/Goose_Bay", "America/Blanc-Sablon", "America/Toronto", "America/Iqaluit", "America/Atikokan", "America/Winnipeg", "America/Resolute", "America/Rankin_Inlet", "America/Regina", "America/Swift_Current", "America/Edmonton", "America/Cambridge_Bay", "America/Inuvik", "America/Creston", "America/Dawson_Creek", "America/Fort_Nelson", "America/Whitehorse", "America/Dawson", "America/Vancouver", "Indian/Cocos", "Africa/Kinshasa", "Africa/Lubumbashi", "Africa/Bangui", "Africa/Brazzaville", "Europe/Zurich", "Africa/Abidjan", "Pacific/Rarotonga", "America/Santiago", "America/Punta_Arenas", "Pacific/Easter", "Africa/Douala", "Asia/Shanghai", "Asia/Urumqi", "America/Bogota", "America/Costa_Rica", "America/Havana", "Atlantic/Cape_Verde", "America/Curacao", "Indian/Christmas", "Asia/Nicosia", "Asia/Famagusta", "Europe/Prague", "Europe/Berlin", "Europe/Busingen", "Africa/Djibouti", "Europe/Copenhagen", "America/Dominica", "America/Santo_Domingo", "Africa/Algiers", "America/Guayaquil", "Pacific/Galapagos", "Europe/Tallinn", "Africa/Cairo", "Africa/El_Aaiun", "Africa/Asmara", "Europe/Madrid", "Africa/Ceuta", "Atlantic/Canary", "Africa/Addis_Ababa", "Europe/Helsinki", "Pacific/Fiji", "Atlantic/Stanley", "Pacific/Chuuk", "Pacific/Pohnpei", "Pacific/Kosrae", "Atlantic/Faroe", "Europe/Paris", "Africa/Libreville", "Europe/London", "America/Grenada", "Asia/Tbilisi", "America/Cayenne", "Europe/Guernsey", "Africa/Accra", "Europe/Gibraltar", "America/Nuuk", "America/Danmarkshavn", "America/Scoresbysund", "America/Thule", "Africa/Banjul", "Africa/Conakry", "America/Guadeloupe", "Africa/Malabo", "Europe/Athens", "Atlantic/South_Georgia", "America/Guatemala", "Pacific/Guam", "Africa/Bissau", "America/Guyana", "Asia/Hong_Kong", "America/Tegucigalpa", "Europe/Zagreb", "America/Port-au-Prince", "Europe/Budapest", "Asia/Jakarta", "Asia/Pontianak", "Asia/Makassar", "Asia/Jayapura", "Europe/Dublin", "Asia/Jerusalem", "Europe/Isle_of_Man", "Asia/Kolkata", "Indian/Chagos", "Asia/Baghdad", "Asia/Tehran", "Atlantic/Reykjavik", "Europe/Rome", "Europe/Jersey", "America/Jamaica", "Asia/Amman", "Asia/Tokyo", "Africa/Nairobi", "Asia/Bishkek", "Asia/Phnom_Penh", "Pacific/Tarawa", "Pacific/Kanton", "Pacific/Kiritimati", "Indian/Comoro", "America/St_Kitts", "Asia/Pyongyang", "Asia/Seoul", "Asia/Kuwait", "America/Cayman", "Asia/Almaty", "Asia/Qyzylorda", "Asia/Qostanay", "Asia/Aqtobe", "Asia/Aqtau", "Asia/Atyrau", "Asia/Oral", "Asia/Vientiane", "Asia/Beirut", "America/St_Lucia", "Europe/Vaduz", "Asia/Colombo", "Africa/Monrovia", "Africa/Maseru", "Europe/Vilnius", "Europe/Luxembourg", "Europe/Riga", "Africa/Tripoli", "Africa/Casablanca", "Europe/Monaco", "Europe/Chisinau", "Europe/Podgorica", "America/Marigot", "Indian/Antananarivo", "Pacific/Majuro", "Pacific/Kwajalein", "Europe/Skopje", "Africa/Bamako", "Asia/Yangon", "Asia/Ulaanbaatar", "Asia/Hovd", "Asia/Macau", "Pacific/Saipan", "America/Martinique", "Africa/Nouakchott", "America/Montserrat", "Europe/Malta", "Indian/Mauritius", "Indian/Maldives", "Africa/Blantyre", "America/Mexico_City", "America/Cancun", "America/Merida", "America/Monterrey", "America/Matamoros", "America/Chihuahua", "America/Ciudad_Juarez", "America/Ojinaga", "America/Mazatlan", "America/Bahia_Banderas", "America/Hermosillo", "America/Tijuana", "Asia/Kuala_Lumpur", "Asia/Kuching", "Africa/Maputo", "Africa/Windhoek", "Pacific/Noumea", "Africa/Niamey", "Pacific/Norfolk", "Africa/Lagos", "America/Managua", "Europe/Amsterdam", "Europe/Oslo", "Asia/Kathmandu", "Pacific/Nauru", "Pacific/Niue", "Pacific/Auckland", "Pacific/Chatham", "Asia/Muscat", "America/Panama", "America/Lima", "Pacific/Tahiti", "Pacific/Marquesas", "Pacific/Gambier", "Pacific/Port_Moresby", "Pacific/Bougainville", "Asia/Manila", "Asia/Karachi", "Europe/Warsaw", "America/Miquelon", "Pacific/Pitcairn", "America/Puerto_Rico", "Asia/Gaza", "Asia/Hebron", "Europe/Lisbon", "Atlantic/Madeira", "Atlantic/Azores", "Pacific/Palau", "America/Asuncion", "Asia/Qatar", "Indian/Reunion", "Europe/Bucharest", "Europe/Belgrade", "Europe/Kaliningrad", "Europe/Moscow", "Europe/Simferopol", "Europe/Kirov", "Europe/Volgograd", "Europe/Astrakhan", "Europe/Saratov", "Europe/Ulyanovsk", "Europe/Samara", "Asia/Yekaterinburg", "Asia/Omsk", "Asia/Novosibirsk", "Asia/Barnaul", "Asia/Tomsk", "Asia/Novokuznetsk", "Asia/Krasnoyarsk", "Asia/Irkutsk", "Asia/Chita", "Asia/Yakutsk", "Asia/Khandyga", "Asia/Vladivostok", "Asia/Ust-Nera", "Asia/Magadan", "Asia/Sakhalin", "Asia/Srednekolymsk", "Asia/Kamchatka", "Asia/Anadyr", "Africa/Kigali", "Asia/Riyadh", "Pacific/Guadalcanal", "Indian/Mahe", "Africa/Khartoum", "Europe/Stockholm", "Asia/Singapore", "Atlantic/St_Helena", "Europe/Ljubljana", "Arctic/Longyearbyen", "Europe/Bratislava", "Africa/Freetown", "Europe/San_Marino", "Africa/Dakar", "Africa/Mogadishu", "America/Paramaribo", "Africa/Juba", "Africa/Sao_Tome", "America/El_Salvador", "America/Lower_Princes", "Asia/Damascus", "Africa/Mbabane", "America/Grand_Turk", "Africa/Ndjamena", "Indian/Kerguelen", "Africa/Lome", "Asia/Bangkok", "Asia/Dushanbe", "Pacific/Fakaofo", "Asia/Dili", "Asia/Ashgabat", "Africa/Tunis", "Pacific/Tongatapu", "Europe/Istanbul", "America/Port_of_Spain", "Pacific/Funafuti", "Asia/Taipei", "Africa/Dar_es_Salaam", "Europe/Kyiv", "Africa/Kampala", "Pacific/Midway", "Pacific/Wake", "America/New_York", "America/Detroit", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Indiana/Indianapolis", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Vevay", "America/Chicago", "America/Indiana/Tell_City", "America/Indiana/Knox", "America/Menominee", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/North_Dakota/Beulah", "America/Denver", "America/Boise", "America/Phoenix", "America/Los_Angeles", "America/Anchorage", "America/Juneau", "America/Sitka", "America/Metlakatla", "America/Yakutat", "America/Nome", "America/Adak", "Pacific/Honolulu", "America/Montevideo", "Asia/Samarkand", "Asia/Tashkent", "Europe/Vatican", "America/St_Vincent", "America/Caracas", "America/Tortola", "America/St_Thomas", "Asia/Ho_Chi_Minh", "Pacific/Efate", "Pacific/Wallis", "Pacific/Apia", "Asia/Aden", "Indian/Mayotte", "Africa/Johannesburg", "Africa/Lusaka", "Africa/Harare", "UTC" ] }, "UpdateActivityResponse": { "type": "object", "properties": { "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" }, "name": { "description": "Name of the activity", "type": "string", "minLength": 1 }, "origin": { "description": "Whether the activity comes from a central catalog or is custom-created", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "activityCatalogId": { "description": "ID reference to the original activity in the catalog if applicable", "type": "string" }, "syncWithCatalog": { "description": "Whether the activity should be synced with catalog updates", "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "description": "List of language codes available for this activity", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "activityId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateActivityTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } }, "UpdateActivityTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "activityId": { "description": "The unique ID of the activity. Should be a nanoid", "type": "string", "example": "FUMzPf00hz_kcj2R2Hlzq" } } } } }, "required": [ "assignments" ] }, "UpdatedStreakRuleTagAssignmentsCollection": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdatedUserTagAssignmentsCollection": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateMissionConfigurationResponse": { "type": "object", "properties": { "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" }, "name": { "description": "Name of the mission configuration. Used only as a human-readable reference", "type": "string", "examples": [ "Answer to 10 Quizzes Correctly", "Make an Activity" ], "minLength": 1 }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "matchType": { "description": "Determines how the mission's conditions are matched. When set to INSTANCE, a specific entity ID must be provided in matchEntityId. When set to ENTITY, all instances of the specified entity type are considered. When set to TAG, all entities associated with the specified tag ID are considered.", "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "description": "The entity type the mission's conditions apply to. When matchType is set to TAG, matchEntity must be set to Tag.", "type": "string", "enum": [ "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "description": "Specific entity ID for matching, when matchType is INSTANCE or TAG.", "type": "string" }, "matchCondition": { "description": "JSON Logic expression defining the refining conditions that defines if the matched entity contributes to mission progress. Evaluated against: `{ mission }`.", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "incrementExpression": { "description": "JSON Logic expression defining how progress is incremented. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }`", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "targetAmountExpression": { "description": "JSON Logic expression defining the target amount for mission completion. This will be copied to mission assignments and evaluated at runtime against: `{ mission, user? }` (user is optional and only present for INDIVIDUAL missions).", "type": "object", "additionalProperties": true, "examples": [ { "==": [ 1, 1 ] }, { ">": [ { "var": "temperature" }, 100 ] }, { "and": [ { "==": [ { "var": "country" }, "IT" ] }, { "<": [ { "var": "age" }, 65 ] } ] } ], "externalDocs": { "description": "JSON Logic documentation", "url": "https://jsonlogic.com/" }, "notes": [ "This schema ensures only that the value is valid JSON.", "JSON Logic supports a wide variety of operators such as `==`, `and`, `or`, `>`, `<`, etc.", "Consumers should validate semantics at runtime." ] }, "origin": { "description": "Indicates if the mission is from a catalog or custom-created.", "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionConfigurationCatalogId": { "description": "ID of the mission configuration in the catalog (if applicable).", "type": "string" }, "syncWithCatalog": { "description": "Whether the mission configuration should sync with catalog updates.", "type": "boolean", "x-status": "notImplemented" }, "defaultLang": { "description": "Default language code for the mission's content.", "type": "string", "enum": [ "aa", "ab", "af", "agq", "ak", "am", "an", "ann", "apc", "ar", "arn", "as", "asa", "ast", "az", "ba", "bal", "bas", "be", "bem", "bew", "bez", "bg", "bgc", "bgn", "bho", "blo", "blt", "bm", "bn", "bo", "br", "brx", "bs", "bss", "byn", "ca", "cad", "cch", "ccp", "ce", "ceb", "cgg", "cho", "chr", "cic", "ckb", "co", "cs", "csw", "cu", "cv", "cy", "da", "dav", "de", "dje", "doi", "dsb", "dua", "dv", "dyo", "dz", "ebu", "ee", "el", "en", "eo", "es", "et", "eu", "ewo", "fa", "ff", "fi", "fil", "fo", "fr", "frr", "fur", "fy", "ga", "gaa", "gd", "gez", "gl", "gn", "gsw", "gu", "guz", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ie", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "ka", "kaa", "kab", "kaj", "kam", "kcg", "kde", "kea", "ken", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "kok", "kpe", "ks", "ksb", "ksf", "ksh", "ku", "kw", "kxv", "ky", "la", "lag", "lb", "lg", "lij", "lkt", "lld", "lmo", "ln", "lo", "lrc", "lt", "ltg", "lu", "luo", "luy", "lv", "mai", "mas", "mdf", "mer", "mfe", "mg", "mgh", "mgo", "mhn", "mi", "mic", "mk", "ml", "mn", "mni", "moh", "mr", "ms", "mt", "mua", "mus", "my", "myv", "mzn", "naq", "nb", "nd", "nds", "ne", "nl", "nmg", "nn", "nnh", "no", "nqo", "nr", "nso", "nus", "nv", "ny", "nyn", "oc", "om", "or", "os", "osa", "pa", "pap", "pcm", "pis", "pl", "prg", "ps", "pt", "qu", "quc", "raj", "rhg", "rif", "rm", "rn", "ro", "rof", "root", "ru", "rw", "rwk", "sa", "sah", "saq", "sat", "sbp", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "shi", "shn", "si", "sid", "sk", "skr", "sl", "sma", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "szl", "ta", "te", "teo", "tg", "th", "ti", "tig", "tk", "tn", "to", "tok", "tpi", "tr", "trv", "trw", "ts", "tt", "twq", "tyv", "tzm", "ug", "uk", "ur", "uz", "vai", "ve", "vec", "vi", "vmw", "vo", "vun", "wa", "wae", "wal", "wbp", "wo", "xh", "xnr", "xog", "yav", "yi", "yo", "yrl", "yue", "za", "zgh", "zh-CN", "zh-TW", "zu" ] }, "langs": { "description": "List of available language codes for this mission.", "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "missionConfigurationId", "name", "missionType", "matchType", "matchEntity", "matchCondition", "incrementExpression", "targetAmountExpression", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateMissionConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } }, "UpdateMissionConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionConfigurationId": { "description": "Unique identifier for the mission configuration (NanoID).", "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateMissionRuleResponse": { "type": "object", "properties": { "missionRuleId": { "type": "string" }, "missionType": { "description": "Type of mission (individual or group-based). When set to GROUP, progress is tracked collectively for all users associated with the same tag, according to the mission rules or manual assignment.", "type": "string", "enum": [ "INDIVIDUAL", "GROUP" ] }, "name": { "type": "string" }, "groupTagId": { "type": "string", "minLength": 1 }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "missionConfigurationsPool": { "type": "array", "items": { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." } }, "missionsMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE", "RECURRING" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "recurrence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "CUSTOM" ] }, "scheduleCron": { "type": "string" }, "assignmentMode": { "type": "string", "enum": [ "LAZY", "SCHEDULED_PUSH", "EVENT", "DISABLED" ] }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "missionRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "eventMatchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "eventMatchEntity": { "type": "string", "enum": [ "Activity", "Quiz", "Tag", "User" ] }, "eventMatchEntityId": { "type": "string", "minLength": 1 }, "eventMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "missionRuleId", "missionType", "name", "missionsMatchCondition", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "assignmentMode", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateMissionRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } } }, "UpdateMissionRuleTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "missionRuleId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateMobilityActivationResponse": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "on", "off" ] }, "provider": { "type": "string" }, "userId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" } }, "required": [ "status", "provider", "userId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt" ] }, "UpdateQuizResponse": { "type": "object", "properties": { "quizId": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "EASY", "MEDIUM", "HARD" ] }, "correctAnswer": { "type": "string", "enum": [ "opt1", "opt2", "opt3", "opt4" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM", "AI" ] }, "quizCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "placement": { "type": "string", "enum": [ "STANDALONE", "STORY", "NEWS" ] }, "storyId": { "type": "string" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "quizId", "difficulty", "correctAnswer", "origin", "placement", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateQuizTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } } }, "UpdateQuizTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "quizId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateRewardRuleResponse": { "type": "object", "properties": { "rewardRuleId": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "ruleType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string", "minLength": 1 }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "applicationMode": { "type": "string", "enum": [ "ALWAYS", "FALLBACK", "DISABLED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "rewardRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "rewards": { "type": "array", "items": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "redemptionMode": { "type": "string", "enum": [ "AUTO", "MANUAL" ] }, "expression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] } }, "required": [ "virtualCurrencyId", "redemptionMode", "expression" ] }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "rewardRuleId", "name", "ruleType", "matchEntity", "matchCondition", "applicationMode", "origin", "defaultLang", "langs", "rewards", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateStoryResponse": { "type": "object", "properties": { "storyId": { "type": "string" }, "legacyStoryId": { "type": "string" }, "origin": { "type": "string", "enum": [ "CATALOG", "AI", "CUSTOM" ] }, "storyCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "defaultStoryLayoutId": { "type": "string" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "storyId", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateStoryTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } } }, "UpdateStoryTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "storyId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateStreakConfigurationResponse": { "type": "object", "properties": { "streakConfigurationId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "matchType": { "type": "string", "enum": [ "INSTANCE", "ENTITY", "TAG" ] }, "matchEntity": { "type": "string", "enum": [ "Mission", "Activity", "Quiz", "Tag" ] }, "matchEntityId": { "type": "string" }, "matchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakConfigurationCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "streakConfigurationId", "name", "matchType", "matchEntity", "matchCondition", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateStreakConfigurationTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } } }, "UpdateStreakConfigurationTagAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakConfigurationId": { "type": "string" } } } } }, "required": [ "assignments" ] }, "UpdateStreakRuleResponse": { "type": "object", "properties": { "streakRuleId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "streakConfigurationId": { "type": "string" }, "usersMatchCondition": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "timeframeType": { "type": "string", "enum": [ "PERMANENT", "RANGE" ] }, "timeframeTimezoneType": { "type": "string", "enum": [ "FIXED", "USER" ] }, "timeframeTimezone": { "$ref": "#/components/schemas/Timezone" }, "timeframeStartsAt": { "type": "string", "format": "date-time" }, "timeframeEndsAt": { "type": "string", "format": "date-time" }, "cadence": { "type": "string", "enum": [ "DAY", "WEEK" ] }, "perfectWeekEnabled": { "type": "boolean", "default": false }, "perfectMonthEnabled": { "type": "boolean", "default": false }, "perfectYearEnabled": { "type": "boolean", "default": false }, "freezeEnabled": { "type": "boolean", "default": true }, "freezeVirtualCurrencyId": { "type": "string" }, "freezeCostExpression": { "allOf": [ { "$ref": "#/components/schemas/JsonLogicExpression" }, { "type": [ "object", "null" ] } ] }, "goalTargets": { "type": "array", "items": { "type": "integer", "exclusiveMinimum": 0 } }, "state": { "type": "string", "default": "PENDING", "enum": [ "PENDING", "ACTIVE", "ENDED" ] }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "streakRuleCatalogId": { "type": "string" }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "streakRuleId", "name", "streakConfigurationId", "timeframeType", "timeframeTimezoneType", "timeframeStartsAt", "cadence", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateStreakRuleTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "streakRuleId": { "type": "string" } } }, "UpdateTagResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "namespace": { "type": "string", "minLength": 1 }, "variant": { "type": "string", "minLength": 1 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "tagCatalogId": { "type": "string", "minLength": 1 }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "tagId", "namespace", "variant", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UpdateUserTagAssignmentResponse": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } } }, "UpdateVirtualCurrencyResponse": { "type": "object", "properties": { "virtualCurrencyId": { "type": "string" }, "name": { "type": "string", "minLength": 1 }, "virtualCurrencyCatalogId": { "type": "string", "maxLength": 30, "minLength": 2 }, "origin": { "type": "string", "enum": [ "CATALOG", "CUSTOM" ] }, "syncWithCatalog": { "type": "boolean" }, "defaultLang": { "$ref": "#/components/schemas/Lang" }, "langs": { "type": "array", "items": { "$ref": "#/components/schemas/Lang" }, "maxItems": 10, "minItems": 1 }, "minAllowedBalance": { "type": "number" }, "maxAllowedBalance": { "type": "number" }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "stage": { "type": "string", "enum": [ "DRAFT", "PUBLISHED", "ARCHIVED" ] } }, "required": [ "virtualCurrencyId", "name", "origin", "defaultLang", "langs", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "stage" ] }, "UserTagAssignmentsCollection": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "userId" ] } } }, "required": [ "assignments" ] }, "UserTagAssignmentsList": { "type": "object", "properties": { "tagId": { "type": "string", "minLength": 1 }, "entityType": { "type": "string", "enum": [ "Activity", "Quiz", "MissionConfiguration", "MissionRule", "User", "StreakRule", "StreakConfiguration", "Story" ] }, "entityId": { "anyOf": [ { "type": "string", "description": "The unique ID of the activity. Should be a nanoid", "example": "FUMzPf00hz_kcj2R2Hlzq" }, { "type": "string" }, { "type": "string", "description": "Unique identifier for the mission configuration (NanoID)." }, { "type": "string" }, { "type": "string" } ] }, "priority": { "type": "integer", "default": 0, "minimum": 0 }, "accountId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "workspaceId": { "type": "string", "maxLength": 10, "minLength": 10, "pattern": "^[A-Za-z0-9_-]{10}$" }, "sourceRegion": { "$ref": "#/components/schemas/SourceRegion" }, "createdAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "updatedAt": { "description": "Creation date in ISO format (UTC Timezone)", "type": "string", "format": "date-time" }, "userId": { "type": "string" } }, "required": [ "tagId", "entityType", "entityId", "accountId", "workspaceId", "sourceRegion", "createdAt", "updatedAt", "userId" ] } }, "securitySchemes": { "oAuth2": { "type": "oauth2", "description": "(DEPRECATED) This API uses OAuth 2 with the authorizationCode or clientCredentials flows.", "flows": { "authorizationCode": { "tokenUrl": "https://aworld.cloud/oauth2/token", "refreshUrl": "https://aworld.cloud/oauth2/refresh", "authorizationUrl": "https://aworld.cloud/oauth2/authorize", "scopes": {} }, "clientCredentials": { "tokenUrl": "https://aworld.cloud/oauth2/token", "refreshUrl": "https://aworld.cloud/oauth2/refresh", "scopes": {} } } } } }, "tags": [ { "name": "Activities" }, { "name": "Activities/Tags" }, { "name": "Activities/Translations" }, { "name": "MissionConfigurations" }, { "name": "MissionConfigurations/Tags" }, { "name": "MissionConfigurations/Translations" }, { "name": "MissionRules" }, { "name": "MissionRules/Tags" }, { "name": "MissionRules/Translations" }, { "name": "Missions" }, { "name": "Mobility" }, { "name": "Quizzes" }, { "name": "Quizzes/Tags" }, { "name": "Quizzes/Translations" }, { "name": "RewardRules" }, { "name": "StreakConfigurations" }, { "name": "StreakConfigurations/Tags" }, { "name": "StreakConfigurations/Translations" }, { "name": "StreakRules" }, { "name": "StreakRules/Tags" }, { "name": "StreakRules/Translations" }, { "name": "Tags" }, { "name": "Users" }, { "name": "Users/Tags" }, { "name": "VirtualCurrencies" }, { "name": "VirtualCurrencies/Translations" }, { "name": "VirtualTransactions" } ], "security": [ { "oAuth2": [] } ], "webhooks": {} }