diff --git a/api/openapi.json b/api/openapi.json index 650edf6..d1f7686 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -11327,6 +11327,18 @@ "nullable": true, "type": "string" }, + "reporter": { + "nullable": true, + "type": "string" + }, + "editor": { + "nullable": true, + "type": "string" + }, + "originalPublisher": { + "nullable": true, + "type": "string" + }, "publishedAt": { "nullable": true, "type": "string", @@ -11359,6 +11371,9 @@ "observedAt", "title", "author", + "reporter", + "editor", + "originalPublisher", "publishedAt", "updatedAtSource", "category", @@ -11414,6 +11429,15 @@ "altText": { "nullable": true, "type": "string" + }, + "filename": { + "nullable": true, + "type": "string" + }, + "sourceUrl": { + "nullable": true, + "type": "string", + "format": "uri" } }, "required": [ @@ -11424,7 +11448,9 @@ "status", "url", "sortOrder", - "altText" + "altText", + "filename", + "sourceUrl" ], "additionalProperties": false } @@ -15762,6 +15788,76 @@ "nullable": true, "type": "boolean" }, + "categoryCode": { + "nullable": true, + "type": "string" + }, + "moduleCode": { + "nullable": true, + "type": "string" + }, + "formCode": { + "nullable": true, + "type": "string" + }, + "activityLevelCode": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "string" + }, + "upstreamOrganizerIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "upstreamSponsorIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "tagIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "signupScopeCode": { + "nullable": true, + "type": "string" + }, + "signupDepartmentIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "requiresSignupInfo": { + "nullable": true, + "type": "boolean" + }, + "allowedAttachmentTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "isOnline": { + "nullable": true, + "type": "boolean" + }, + "onlineMeetingInfo": { + "nullable": true, + "type": "string" + }, + "externalSponsor": { + "nullable": true, + "type": "string" + }, "location": { "nullable": true, "type": "string" @@ -15949,6 +16045,21 @@ "activityStatusCode", "signupStatusCode", "requiresSignup", + "categoryCode", + "moduleCode", + "formCode", + "activityLevelCode", + "departmentId", + "upstreamOrganizerIds", + "upstreamSponsorIds", + "tagIds", + "signupScopeCode", + "signupDepartmentIds", + "requiresSignupInfo", + "allowedAttachmentTypes", + "isOnline", + "onlineMeetingInfo", + "externalSponsor", "location", "imageUrl", "hours", @@ -17875,6 +17986,18 @@ "nullable": true, "type": "string" }, + "reporter": { + "nullable": true, + "type": "string" + }, + "editor": { + "nullable": true, + "type": "string" + }, + "originalPublisher": { + "nullable": true, + "type": "string" + }, "publishedAt": { "nullable": true, "type": "string", @@ -17900,6 +18023,41 @@ "type": "string", "format": "uri" }, + "images": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "url": { + "type": "string", + "pattern": "^\\/api\\/publications\\/images\\/.*" + }, + "altText": { + "nullable": true, + "type": "string" + }, + "title": { + "nullable": true, + "type": "string" + }, + "caption": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "url", + "altText", + "title", + "caption" + ], + "additionalProperties": false + } + }, "bodyText": { "nullable": true, "type": "string" @@ -17963,6 +18121,15 @@ "altText": { "nullable": true, "type": "string" + }, + "filename": { + "nullable": true, + "type": "string" + }, + "sourceUrl": { + "nullable": true, + "type": "string", + "format": "uri" } }, "required": [ @@ -17973,7 +18140,9 @@ "status", "url", "sortOrder", - "altText" + "altText", + "filename", + "sourceUrl" ], "additionalProperties": false } @@ -17985,11 +18154,15 @@ "observedAt", "title", "author", + "reporter", + "editor", + "originalPublisher", "publishedAt", "updatedAtSource", "category", "summary", "sourcePageUrl", + "images", "bodyText", "bodyMarkdown", "extractionMethod", @@ -23705,6 +23878,76 @@ "nullable": true, "type": "boolean" }, + "categoryCode": { + "nullable": true, + "type": "string" + }, + "moduleCode": { + "nullable": true, + "type": "string" + }, + "formCode": { + "nullable": true, + "type": "string" + }, + "activityLevelCode": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "string" + }, + "upstreamOrganizerIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "upstreamSponsorIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "tagIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "signupScopeCode": { + "nullable": true, + "type": "string" + }, + "signupDepartmentIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "requiresSignupInfo": { + "nullable": true, + "type": "boolean" + }, + "allowedAttachmentTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "isOnline": { + "nullable": true, + "type": "boolean" + }, + "onlineMeetingInfo": { + "nullable": true, + "type": "string" + }, + "externalSponsor": { + "nullable": true, + "type": "string" + }, "location": { "nullable": true, "type": "string" @@ -23892,6 +24135,21 @@ "activityStatusCode", "signupStatusCode", "requiresSignup", + "categoryCode", + "moduleCode", + "formCode", + "activityLevelCode", + "departmentId", + "upstreamOrganizerIds", + "upstreamSponsorIds", + "tagIds", + "signupScopeCode", + "signupDepartmentIds", + "requiresSignupInfo", + "allowedAttachmentTypes", + "isOnline", + "onlineMeetingInfo", + "externalSponsor", "location", "imageUrl", "hours", @@ -29157,6 +29415,76 @@ "nullable": true, "type": "boolean" }, + "categoryCode": { + "nullable": true, + "type": "string" + }, + "moduleCode": { + "nullable": true, + "type": "string" + }, + "formCode": { + "nullable": true, + "type": "string" + }, + "activityLevelCode": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "string" + }, + "upstreamOrganizerIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "upstreamSponsorIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "tagIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "signupScopeCode": { + "nullable": true, + "type": "string" + }, + "signupDepartmentIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "requiresSignupInfo": { + "nullable": true, + "type": "boolean" + }, + "allowedAttachmentTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "isOnline": { + "nullable": true, + "type": "boolean" + }, + "onlineMeetingInfo": { + "nullable": true, + "type": "string" + }, + "externalSponsor": { + "nullable": true, + "type": "string" + }, "location": { "nullable": true, "type": "string" @@ -29353,6 +29681,21 @@ "activityStatusCode", "signupStatusCode", "requiresSignup", + "categoryCode", + "moduleCode", + "formCode", + "activityLevelCode", + "departmentId", + "upstreamOrganizerIds", + "upstreamSponsorIds", + "tagIds", + "signupScopeCode", + "signupDepartmentIds", + "requiresSignupInfo", + "allowedAttachmentTypes", + "isOnline", + "onlineMeetingInfo", + "externalSponsor", "location", "imageUrl", "hours", @@ -31417,6 +31760,21 @@ "type": "string", "maxLength": 500 }, + "reporter": { + "nullable": true, + "type": "string", + "maxLength": 500 + }, + "editor": { + "nullable": true, + "type": "string", + "maxLength": 500 + }, + "originalPublisher": { + "nullable": true, + "type": "string", + "maxLength": 500 + }, "publishedAt": { "nullable": true, "type": "string", @@ -31473,6 +31831,30 @@ "format": "uri" } }, + "imageMetadata": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "altText": { + "nullable": true, + "type": "string", + "maxLength": 1000 + }, + "title": { + "nullable": true, + "type": "string", + "maxLength": 1000 + }, + "caption": { + "nullable": true, + "type": "string", + "maxLength": 4000 + } + }, + "additionalProperties": false + } + }, "objects": { "default": [], "maxItems": 100, @@ -31513,6 +31895,16 @@ "altText": { "type": "string", "maxLength": 1000 + }, + "filename": { + "type": "string", + "minLength": 1, + "maxLength": 500 + }, + "sourceUrl": { + "type": "string", + "maxLength": 2048, + "format": "uri" } }, "required": [ diff --git a/api/openapi.provenance.json b/api/openapi.provenance.json index ca535df..4c0af82 100644 --- a/api/openapi.provenance.json +++ b/api/openapi.provenance.json @@ -1,5 +1,5 @@ { "repository": "Life-USTC/server", - "commit": "35b508432a35bcaa3f234ed58167d7f36707f981", - "sha256": "7bed8b549a3ecc39ba880b4d3182ae8de5be30b98f1be6d821b7622beba9376a" + "commit": "ab9b081321c23c2538686f05c11c9a7520160396", + "sha256": "fef8a123d58ad2a1a22bf1eb13cbff9a764408e59a1c6a65495157ffd60b4701" } diff --git a/internal/cmd/young_event/young_event.go b/internal/cmd/young_event/young_event.go index 0d3e2de..4cf0a72 100644 --- a/internal/cmd/young_event/young_event.go +++ b/internal/cmd/young_event/young_event.go @@ -8,6 +8,7 @@ import ( "strings" "time" + "github.com/PuerkitoBio/goquery" "github.com/spf13/cobra" "github.com/Life-USTC/CLI/internal/api" @@ -213,6 +214,9 @@ func newCmdGet() *cobra.Command { if err != nil { return err } + if !output.IsJSON() { + data = youngDetailDisplay(data) + } return output.OutputDetail(data, []output.FieldDef{ {Key: "youngId", Label: "Young ID"}, {Key: "name", Label: "Name"}, @@ -231,6 +235,30 @@ func newCmdGet() *cobra.Command { {Key: "activityStatusCode", Label: "Activity status code", SkipEmpty: true}, {Key: "signupStatusCode", Label: "Signup status code", SkipEmpty: true}, {Key: "requiresSignup", Label: "Requires signup", SkipEmpty: true}, + {Key: "categoryCode", Label: "Category code (upstream)", SkipEmpty: true}, + {Key: "moduleCode", Label: "Module code (upstream)", SkipEmpty: true}, + {Key: "formCode", Label: "Form code (upstream)", SkipEmpty: true}, + {Key: "activityLevelCode", Label: "Activity level code (upstream)", SkipEmpty: true}, + {Key: "departmentId", Label: "Department ID (upstream)", SkipEmpty: true}, + {Key: "upstreamOrganizerIds", Label: "Organizer IDs (upstream)", SkipEmpty: true}, + {Key: "upstreamSponsorIds", Label: "Sponsor IDs (upstream)", SkipEmpty: true}, + {Key: "tagIds", Label: "Tag IDs (upstream)", SkipEmpty: true}, + {Key: "signupScopeCode", Label: "Signup scope code (upstream)", SkipEmpty: true}, + {Key: "signupDepartmentIds", Label: "Signup department IDs (upstream)", SkipEmpty: true}, + {Key: "requiresSignupInfo", Label: "Additional signup information required", SkipEmpty: true}, + {Key: "allowedAttachmentTypes", Label: "Accepted attachment formats", SkipEmpty: true}, + {Key: "isOnline", Label: "Online meeting available", SkipEmpty: true}, + {Key: "onlineMeetingInfo", Label: "Online meeting information", SkipEmpty: true}, + {Key: "externalSponsor", Label: "External organizer", SkipEmpty: true}, + {Key: "activityLevel", Label: "Activity level", SkipEmpty: true}, + {Key: "module", Label: "Module", SkipEmpty: true}, + {Key: "form", Label: "Participation format", SkipEmpty: true}, + {Key: "grades", Label: "Eligible grades", SkipEmpty: true}, + {Key: "sponsor", Label: "Sponsor", SkipEmpty: true}, + {Key: "contactName", Label: "Contact", SkipEmpty: true}, + {Key: "contactTel", Label: "Phone", SkipEmpty: true}, + {Key: "description", Label: "Description", SkipEmpty: true}, + {Key: "participationNotes", Label: "Participation notes", SkipEmpty: true}, {Key: "status", Label: "Status", SkipEmpty: true}, {Key: "isActive", Label: "Active"}, {Key: "sourceMissing", Label: "Source missing", SkipEmpty: true}, @@ -363,3 +391,38 @@ func fetchDateEvents(ctx context.Context, client *api.Client, query url.Values) // timeNow is a variable for deterministic date-range tests. var timeNow = func() time.Time { return time.Now() } + +// Human-readable output uses plain text while JSON/JQ retain the server payload. +func youngDetailDisplay(raw any) any { + source, ok := raw.(map[string]any) + if !ok { + return raw + } + display := make(map[string]any, len(source)) + for key, value := range source { + switch v := value.(type) { + case []any: + parts := make([]string, 0, len(v)) + for _, item := range v { + parts = append(parts, fmt.Sprint(item)) + } + display[key] = strings.Join(parts, ", ") + default: + display[key] = value + } + } + for _, key := range []string{"description", "participationNotes"} { + html, ok := source[key].(string) + if !ok || html == "" { + continue + } + document, err := goquery.NewDocumentFromReader(strings.NewReader(html)) + if err != nil { + continue + } + document.Find("script,style,iframe").Remove() + document.Find("p,div,li,br").AfterHtml("\n") + display[key] = strings.TrimSpace(document.Text()) + } + return display +} diff --git a/internal/cmd/young_event/young_event_test.go b/internal/cmd/young_event/young_event_test.go index 6efbfc7..e6454ba 100644 --- a/internal/cmd/young_event/young_event_test.go +++ b/internal/cmd/young_event/young_event_test.go @@ -93,3 +93,20 @@ func TestDateRegistrationUsesRegistrationColumns(t *testing.T) { t.Fatalf("activity start key = %q", got) } } + +func TestYoungDetailDisplayKeepsRawPayloadAndKnownZero(t *testing.T) { + raw := map[string]any{"description": "
First & second
Next
", "allowedAttachmentTypes": []any{"pdf", "docx"}, "tagIds": []any{}, "requiresSignupInfo": false, "appliedCount": 0} + shown := youngDetailDisplay(raw).(map[string]any) + if shown["description"] != "First & second\nNext" { + t.Fatalf("description: %q", shown["description"]) + } + if shown["allowedAttachmentTypes"] != "pdf, docx" || shown["tagIds"] != "" { + t.Fatal(shown) + } + if shown["requiresSignupInfo"] != false || shown["appliedCount"] != 0 { + t.Fatal("lost false or zero") + } + if raw["description"] != "First & second
Next
" { + t.Fatal("mutated raw payload") + } +} diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index 112f7fd..cbb85f5 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -7268,51 +7268,66 @@ type PaginatedTeacherResponseSchema struct { // PaginatedYoungEventResponseSchema defines model for paginatedYoungEventResponseSchema. type PaginatedYoungEventResponseSchema struct { Data []struct { - ActivityLevel *string `json:"activityLevel"` - ActivityStatusCode *string `json:"activityStatusCode"` - AppliedCount *int `json:"appliedCount"` - ApplyEndAt *time.Time `json:"applyEndAt"` - ApplyStartAt *time.Time `json:"applyStartAt"` - AuditedAt *time.Time `json:"auditedAt"` - Capacity *int `json:"capacity"` - Category *string `json:"category"` - ContactName *string `json:"contactName"` - ContactTel *string `json:"contactTel"` - CreatedAt *time.Time `json:"createdAt"` - CreatedAtUpstream *time.Time `json:"createdAtUpstream"` - Department *string `json:"department"` - Duration *float32 `json:"duration"` - EndAt *time.Time `json:"endAt"` - FavCount *int `json:"favCount"` - Form *string `json:"form"` - Grades *string `json:"grades"` - Hours *float32 `json:"hours"` - ImageUrl *string `json:"imageUrl"` - IsActive bool `json:"isActive"` - LastSeenAt *time.Time `json:"lastSeenAt"` - LimitNum *int `json:"limitNum"` - Location *string `json:"location"` - Module *string `json:"module"` - Name string `json:"name"` - Organizer *string `json:"organizer"` - OrganizerId *string `json:"organizerId"` - PartakeNum *int `json:"partakeNum"` - Places *[]struct { + ActivityLevel *string `json:"activityLevel"` + ActivityLevelCode *string `json:"activityLevelCode"` + ActivityStatusCode *string `json:"activityStatusCode"` + AllowedAttachmentTypes []string `json:"allowedAttachmentTypes"` + AppliedCount *int `json:"appliedCount"` + ApplyEndAt *time.Time `json:"applyEndAt"` + ApplyStartAt *time.Time `json:"applyStartAt"` + AuditedAt *time.Time `json:"auditedAt"` + Capacity *int `json:"capacity"` + Category *string `json:"category"` + CategoryCode *string `json:"categoryCode"` + ContactName *string `json:"contactName"` + ContactTel *string `json:"contactTel"` + CreatedAt *time.Time `json:"createdAt"` + CreatedAtUpstream *time.Time `json:"createdAtUpstream"` + Department *string `json:"department"` + DepartmentId *string `json:"departmentId"` + Duration *float32 `json:"duration"` + EndAt *time.Time `json:"endAt"` + ExternalSponsor *string `json:"externalSponsor"` + FavCount *int `json:"favCount"` + Form *string `json:"form"` + FormCode *string `json:"formCode"` + Grades *string `json:"grades"` + Hours *float32 `json:"hours"` + ImageUrl *string `json:"imageUrl"` + IsActive bool `json:"isActive"` + IsOnline *bool `json:"isOnline"` + LastSeenAt *time.Time `json:"lastSeenAt"` + LimitNum *int `json:"limitNum"` + Location *string `json:"location"` + Module *string `json:"module"` + ModuleCode *string `json:"moduleCode"` + Name string `json:"name"` + OnlineMeetingInfo *string `json:"onlineMeetingInfo"` + Organizer *string `json:"organizer"` + OrganizerId *string `json:"organizerId"` + PartakeNum *int `json:"partakeNum"` + Places *[]struct { PlaceEt *string `json:"placeEt"` PlaceInfo *string `json:"placeInfo"` PlaceSt *string `json:"placeSt"` } `json:"places"` - RequiresSignup *bool `json:"requiresSignup"` - ServiceHour *float32 `json:"serviceHour"` - SignupStatusCode *string `json:"signupStatusCode"` - SourceMissing bool `json:"sourceMissing"` - Sponsor *string `json:"sponsor"` - StartAt *time.Time `json:"startAt"` - Status *string `json:"status"` - SumHours *float32 `json:"sumHours"` - SumPersons *int `json:"sumPersons"` - UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` - YoungId string `json:"youngId"` + RequiresSignup *bool `json:"requiresSignup"` + RequiresSignupInfo *bool `json:"requiresSignupInfo"` + ServiceHour *float32 `json:"serviceHour"` + SignupDepartmentIds []string `json:"signupDepartmentIds"` + SignupScopeCode *string `json:"signupScopeCode"` + SignupStatusCode *string `json:"signupStatusCode"` + SourceMissing bool `json:"sourceMissing"` + Sponsor *string `json:"sponsor"` + StartAt *time.Time `json:"startAt"` + Status *string `json:"status"` + SumHours *float32 `json:"sumHours"` + SumPersons *int `json:"sumPersons"` + TagIds []string `json:"tagIds"` + UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` + UpstreamOrganizerIds []string `json:"upstreamOrganizerIds"` + UpstreamSponsorIds []string `json:"upstreamSponsorIds"` + YoungId string `json:"youngId"` } `json:"data"` Pagination struct { Page int `json:"page"` @@ -7387,25 +7402,37 @@ type PublicPublicationDetailSchema struct { BodyText *string `json:"bodyText"` Category *string `json:"category"` ClassifierVersion *string `json:"classifierVersion"` + Editor *string `json:"editor"` ExtractionMethod *string `json:"extractionMethod"` Id string `json:"id"` - Objects []struct { + Images []struct { + AltText *string `json:"altText"` + Caption *string `json:"caption"` + Id string `json:"id"` + Title *string `json:"title"` + Url string `json:"url"` + } `json:"images"` + Objects []struct { AltText *string `json:"altText"` ContentType string `json:"contentType"` + Filename *string `json:"filename"` Kind PublicPublicationDetailSchemaRevisionObjectsKind `json:"kind"` Sha256 string `json:"sha256"` Size int `json:"size"` SortOrder *int `json:"sortOrder"` + SourceUrl *string `json:"sourceUrl"` Status PublicPublicationDetailSchemaRevisionObjectsStatus `json:"status"` Url string `json:"url"` } `json:"objects"` - ObservedAt time.Time `json:"observedAt"` - PublishedAt *time.Time `json:"publishedAt"` - RevisionHash string `json:"revisionHash"` - SourcePageUrl *string `json:"sourcePageUrl"` - Summary *string `json:"summary"` - Title string `json:"title"` - UpdatedAtSource *time.Time `json:"updatedAtSource"` + ObservedAt time.Time `json:"observedAt"` + OriginalPublisher *string `json:"originalPublisher"` + PublishedAt *time.Time `json:"publishedAt"` + Reporter *string `json:"reporter"` + RevisionHash string `json:"revisionHash"` + SourcePageUrl *string `json:"sourcePageUrl"` + Summary *string `json:"summary"` + Title string `json:"title"` + UpdatedAtSource *time.Time `json:"updatedAtSource"` } `json:"revision"` Source struct { Id string `json:"id"` @@ -7463,25 +7490,30 @@ type PublicPublicationsResponseSchema struct { Objects []struct { AltText *string `json:"altText"` ContentType string `json:"contentType"` + Filename *string `json:"filename"` Kind PublicPublicationsResponseSchemaDataObjectsKind `json:"kind"` Sha256 string `json:"sha256"` Size int `json:"size"` SortOrder *int `json:"sortOrder"` + SourceUrl *string `json:"sourceUrl"` Status PublicPublicationsResponseSchemaDataObjectsStatus `json:"status"` Url string `json:"url"` } `json:"objects"` PublicationType PublicPublicationsResponseSchemaDataPublicationType `json:"publicationType"` Revision struct { - Author *string `json:"author"` - Category *string `json:"category"` - Id string `json:"id"` - ObservedAt time.Time `json:"observedAt"` - PublishedAt *time.Time `json:"publishedAt"` - RevisionHash string `json:"revisionHash"` - SourcePageUrl *string `json:"sourcePageUrl"` - Summary *string `json:"summary"` - Title string `json:"title"` - UpdatedAtSource *time.Time `json:"updatedAtSource"` + Author *string `json:"author"` + Category *string `json:"category"` + Editor *string `json:"editor"` + Id string `json:"id"` + ObservedAt time.Time `json:"observedAt"` + OriginalPublisher *string `json:"originalPublisher"` + PublishedAt *time.Time `json:"publishedAt"` + Reporter *string `json:"reporter"` + RevisionHash string `json:"revisionHash"` + SourcePageUrl *string `json:"sourcePageUrl"` + Summary *string `json:"summary"` + Title string `json:"title"` + UpdatedAtSource *time.Time `json:"updatedAtSource"` } `json:"revision"` Source struct { Id string `json:"id"` @@ -7554,32 +7586,42 @@ type PublicationIngestionBatchRequestSchema struct { // PublicationIngestionBatchRequestSchemaItems0 defines model for . type PublicationIngestionBatchRequestSchemaItems0 struct { - Author *string `json:"author,omitempty"` - BodyText *string `json:"bodyText,omitempty"` - CanonicalUrl string `json:"canonicalUrl"` - Category *string `json:"category,omitempty"` - ClassifierVersion *string `json:"classifierVersion,omitempty"` - ExtractionMethod *string `json:"extractionMethod,omitempty"` - ImageSources map[string]string `json:"imageSources"` - Objects []struct { + Author *string `json:"author,omitempty"` + BodyText *string `json:"bodyText,omitempty"` + CanonicalUrl string `json:"canonicalUrl"` + Category *string `json:"category,omitempty"` + ClassifierVersion *string `json:"classifierVersion,omitempty"` + Editor *string `json:"editor,omitempty"` + ExtractionMethod *string `json:"extractionMethod,omitempty"` + ImageMetadata *map[string]struct { + AltText *string `json:"altText,omitempty"` + Caption *string `json:"caption,omitempty"` + Title *string `json:"title,omitempty"` + } `json:"imageMetadata,omitempty"` + ImageSources map[string]string `json:"imageSources"` + Objects []struct { AltText *string `json:"altText,omitempty"` ContentType string `json:"contentType"` + Filename *string `json:"filename,omitempty"` Kind PublicationIngestionBatchRequestSchemaItems0ObjectsKind `json:"kind"` Sha256 string `json:"sha256"` Size int `json:"size"` SortOrder *int `json:"sortOrder,omitempty"` + SourceUrl *string `json:"sourceUrl,omitempty"` } `json:"objects"` - ObservedAt string `json:"observedAt"` - PublicationType PublicationIngestionBatchRequestSchemaItems0PublicationType `json:"publicationType"` - PublishedAt *string `json:"publishedAt,omitempty"` - RawMetadata *map[string]interface{} `json:"rawMetadata,omitempty"` - RevisionHash string `json:"revisionHash"` - SourceId string `json:"sourceId"` - SourcePageUrl *string `json:"sourcePageUrl,omitempty"` - Summary *string `json:"summary,omitempty"` - Title string `json:"title"` - Tombstone PublicationIngestionBatchRequestSchemaItems0Tombstone `json:"tombstone"` - UpdatedAtSource *string `json:"updatedAtSource,omitempty"` + ObservedAt string `json:"observedAt"` + OriginalPublisher *string `json:"originalPublisher,omitempty"` + PublicationType PublicationIngestionBatchRequestSchemaItems0PublicationType `json:"publicationType"` + PublishedAt *string `json:"publishedAt,omitempty"` + RawMetadata *map[string]interface{} `json:"rawMetadata,omitempty"` + Reporter *string `json:"reporter,omitempty"` + RevisionHash string `json:"revisionHash"` + SourceId string `json:"sourceId"` + SourcePageUrl *string `json:"sourcePageUrl,omitempty"` + Summary *string `json:"summary,omitempty"` + Title string `json:"title"` + Tombstone PublicationIngestionBatchRequestSchemaItems0Tombstone `json:"tombstone"` + UpdatedAtSource *string `json:"updatedAtSource,omitempty"` } // PublicationIngestionBatchRequestSchemaItems0ObjectsKind defines model for PublicationIngestionBatchRequestSchema.Items.0.Objects.Kind. @@ -8767,54 +8809,69 @@ type WorkspaceLinkPinResponseSchema struct { // YoungEventDetailSchema defines model for youngEventDetailSchema. type YoungEventDetailSchema struct { - ActivityLevel *string `json:"activityLevel"` - ActivityStatusCode *string `json:"activityStatusCode"` - AppliedCount *int `json:"appliedCount"` - ApplyEndAt *time.Time `json:"applyEndAt"` - ApplyStartAt *time.Time `json:"applyStartAt"` - AuditedAt *time.Time `json:"auditedAt"` - Capacity *int `json:"capacity"` - Category *string `json:"category"` - ContactName *string `json:"contactName"` - ContactTel *string `json:"contactTel"` - CreatedAt *time.Time `json:"createdAt"` - CreatedAtUpstream *time.Time `json:"createdAtUpstream"` - Department *string `json:"department"` - Description *string `json:"description"` - Duration *float32 `json:"duration"` - EndAt *time.Time `json:"endAt"` - FavCount *int `json:"favCount"` - Form *string `json:"form"` - Grades *string `json:"grades"` - Hours *float32 `json:"hours"` - ImageUrl *string `json:"imageUrl"` - IsActive bool `json:"isActive"` - LastSeenAt *time.Time `json:"lastSeenAt"` - LimitNum *int `json:"limitNum"` - Location *string `json:"location"` - Module *string `json:"module"` - Name string `json:"name"` - Organizer *string `json:"organizer"` - OrganizerId *string `json:"organizerId"` - PartakeNum *int `json:"partakeNum"` - ParticipationNotes *string `json:"participationNotes"` - Places *[]struct { + ActivityLevel *string `json:"activityLevel"` + ActivityLevelCode *string `json:"activityLevelCode"` + ActivityStatusCode *string `json:"activityStatusCode"` + AllowedAttachmentTypes []string `json:"allowedAttachmentTypes"` + AppliedCount *int `json:"appliedCount"` + ApplyEndAt *time.Time `json:"applyEndAt"` + ApplyStartAt *time.Time `json:"applyStartAt"` + AuditedAt *time.Time `json:"auditedAt"` + Capacity *int `json:"capacity"` + Category *string `json:"category"` + CategoryCode *string `json:"categoryCode"` + ContactName *string `json:"contactName"` + ContactTel *string `json:"contactTel"` + CreatedAt *time.Time `json:"createdAt"` + CreatedAtUpstream *time.Time `json:"createdAtUpstream"` + Department *string `json:"department"` + DepartmentId *string `json:"departmentId"` + Description *string `json:"description"` + Duration *float32 `json:"duration"` + EndAt *time.Time `json:"endAt"` + ExternalSponsor *string `json:"externalSponsor"` + FavCount *int `json:"favCount"` + Form *string `json:"form"` + FormCode *string `json:"formCode"` + Grades *string `json:"grades"` + Hours *float32 `json:"hours"` + ImageUrl *string `json:"imageUrl"` + IsActive bool `json:"isActive"` + IsOnline *bool `json:"isOnline"` + LastSeenAt *time.Time `json:"lastSeenAt"` + LimitNum *int `json:"limitNum"` + Location *string `json:"location"` + Module *string `json:"module"` + ModuleCode *string `json:"moduleCode"` + Name string `json:"name"` + OnlineMeetingInfo *string `json:"onlineMeetingInfo"` + Organizer *string `json:"organizer"` + OrganizerId *string `json:"organizerId"` + PartakeNum *int `json:"partakeNum"` + ParticipationNotes *string `json:"participationNotes"` + Places *[]struct { PlaceEt *string `json:"placeEt"` PlaceInfo *string `json:"placeInfo"` PlaceSt *string `json:"placeSt"` } `json:"places"` - RawJson interface{} `json:"rawJson"` - RequiresSignup *bool `json:"requiresSignup"` - ServiceHour *float32 `json:"serviceHour"` - SignupStatusCode *string `json:"signupStatusCode"` - SourceMissing bool `json:"sourceMissing"` - Sponsor *string `json:"sponsor"` - StartAt *time.Time `json:"startAt"` - Status *string `json:"status"` - SumHours *float32 `json:"sumHours"` - SumPersons *int `json:"sumPersons"` - UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` - YoungId string `json:"youngId"` + RawJson interface{} `json:"rawJson"` + RequiresSignup *bool `json:"requiresSignup"` + RequiresSignupInfo *bool `json:"requiresSignupInfo"` + ServiceHour *float32 `json:"serviceHour"` + SignupDepartmentIds []string `json:"signupDepartmentIds"` + SignupScopeCode *string `json:"signupScopeCode"` + SignupStatusCode *string `json:"signupStatusCode"` + SourceMissing bool `json:"sourceMissing"` + Sponsor *string `json:"sponsor"` + StartAt *time.Time `json:"startAt"` + Status *string `json:"status"` + SumHours *float32 `json:"sumHours"` + SumPersons *int `json:"sumPersons"` + TagIds []string `json:"tagIds"` + UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` + UpstreamOrganizerIds []string `json:"upstreamOrganizerIds"` + UpstreamSponsorIds []string `json:"upstreamSponsorIds"` + YoungId string `json:"youngId"` } // YoungEventSubscriptionListSchema defines model for youngEventSubscriptionListSchema. @@ -8822,51 +8879,66 @@ type YoungEventSubscriptionListSchema struct { Data []struct { CreatedAt time.Time `json:"createdAt"` Event struct { - ActivityLevel *string `json:"activityLevel"` - ActivityStatusCode *string `json:"activityStatusCode"` - AppliedCount *int `json:"appliedCount"` - ApplyEndAt *time.Time `json:"applyEndAt"` - ApplyStartAt *time.Time `json:"applyStartAt"` - AuditedAt *time.Time `json:"auditedAt"` - Capacity *int `json:"capacity"` - Category *string `json:"category"` - ContactName *string `json:"contactName"` - ContactTel *string `json:"contactTel"` - CreatedAt *time.Time `json:"createdAt"` - CreatedAtUpstream *time.Time `json:"createdAtUpstream"` - Department *string `json:"department"` - Duration *float32 `json:"duration"` - EndAt *time.Time `json:"endAt"` - FavCount *int `json:"favCount"` - Form *string `json:"form"` - Grades *string `json:"grades"` - Hours *float32 `json:"hours"` - ImageUrl *string `json:"imageUrl"` - IsActive bool `json:"isActive"` - LastSeenAt *time.Time `json:"lastSeenAt"` - LimitNum *int `json:"limitNum"` - Location *string `json:"location"` - Module *string `json:"module"` - Name string `json:"name"` - Organizer *string `json:"organizer"` - OrganizerId *string `json:"organizerId"` - PartakeNum *int `json:"partakeNum"` - Places *[]struct { + ActivityLevel *string `json:"activityLevel"` + ActivityLevelCode *string `json:"activityLevelCode"` + ActivityStatusCode *string `json:"activityStatusCode"` + AllowedAttachmentTypes []string `json:"allowedAttachmentTypes"` + AppliedCount *int `json:"appliedCount"` + ApplyEndAt *time.Time `json:"applyEndAt"` + ApplyStartAt *time.Time `json:"applyStartAt"` + AuditedAt *time.Time `json:"auditedAt"` + Capacity *int `json:"capacity"` + Category *string `json:"category"` + CategoryCode *string `json:"categoryCode"` + ContactName *string `json:"contactName"` + ContactTel *string `json:"contactTel"` + CreatedAt *time.Time `json:"createdAt"` + CreatedAtUpstream *time.Time `json:"createdAtUpstream"` + Department *string `json:"department"` + DepartmentId *string `json:"departmentId"` + Duration *float32 `json:"duration"` + EndAt *time.Time `json:"endAt"` + ExternalSponsor *string `json:"externalSponsor"` + FavCount *int `json:"favCount"` + Form *string `json:"form"` + FormCode *string `json:"formCode"` + Grades *string `json:"grades"` + Hours *float32 `json:"hours"` + ImageUrl *string `json:"imageUrl"` + IsActive bool `json:"isActive"` + IsOnline *bool `json:"isOnline"` + LastSeenAt *time.Time `json:"lastSeenAt"` + LimitNum *int `json:"limitNum"` + Location *string `json:"location"` + Module *string `json:"module"` + ModuleCode *string `json:"moduleCode"` + Name string `json:"name"` + OnlineMeetingInfo *string `json:"onlineMeetingInfo"` + Organizer *string `json:"organizer"` + OrganizerId *string `json:"organizerId"` + PartakeNum *int `json:"partakeNum"` + Places *[]struct { PlaceEt *string `json:"placeEt"` PlaceInfo *string `json:"placeInfo"` PlaceSt *string `json:"placeSt"` } `json:"places"` - RequiresSignup *bool `json:"requiresSignup"` - ServiceHour *float32 `json:"serviceHour"` - SignupStatusCode *string `json:"signupStatusCode"` - SourceMissing bool `json:"sourceMissing"` - Sponsor *string `json:"sponsor"` - StartAt *time.Time `json:"startAt"` - Status *string `json:"status"` - SumHours *float32 `json:"sumHours"` - SumPersons *int `json:"sumPersons"` - UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` - YoungId string `json:"youngId"` + RequiresSignup *bool `json:"requiresSignup"` + RequiresSignupInfo *bool `json:"requiresSignupInfo"` + ServiceHour *float32 `json:"serviceHour"` + SignupDepartmentIds []string `json:"signupDepartmentIds"` + SignupScopeCode *string `json:"signupScopeCode"` + SignupStatusCode *string `json:"signupStatusCode"` + SourceMissing bool `json:"sourceMissing"` + Sponsor *string `json:"sponsor"` + StartAt *time.Time `json:"startAt"` + Status *string `json:"status"` + SumHours *float32 `json:"sumHours"` + SumPersons *int `json:"sumPersons"` + TagIds []string `json:"tagIds"` + UpdatedAtUpstream *time.Time `json:"updatedAtUpstream"` + UpstreamOrganizerIds []string `json:"upstreamOrganizerIds"` + UpstreamSponsorIds []string `json:"upstreamSponsorIds"` + YoungId string `json:"youngId"` } `json:"event"` RemindDeadline bool `json:"remindDeadline"` RemindSignup bool `json:"remindSignup"`