diff --git a/api/members/members_client/prompt_contract_test.go b/api/members/members_client/prompt_contract_test.go new file mode 100644 index 0000000..5814eeb --- /dev/null +++ b/api/members/members_client/prompt_contract_test.go @@ -0,0 +1,442 @@ +package members_client_test + +import ( + "bytes" + "context" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "os" + "path/filepath" + "reflect" + "regexp" + "runtime" + "strings" + "testing" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_client/prompts" + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" + openapiruntime "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +const membersPromptProviderSpecSHA256 = "ea2c06f8551555ecf3d36e4d728ba34beeae8731370a64535e194686b16ad07f" + +var promptTestAuth = openapiruntime.ClientAuthInfoWriterFunc(func(openapiruntime.ClientRequest, strfmt.Registry) error { + return nil +}) + +type promptCaptureTransport struct { + operation *openapiruntime.ClientOperation +} + +func (transport *promptCaptureTransport) Submit(operation *openapiruntime.ClientOperation) (any, error) { + return transport.SubmitContext(context.Background(), operation) +} + +func (transport *promptCaptureTransport) SubmitContext(_ context.Context, operation *openapiruntime.ClientOperation) (any, error) { + transport.operation = operation + + switch operation.ID { + case "getPrompts": + return prompts.NewGetPromptsOK(), nil + case "postPrompts": + return prompts.NewPostPromptsOK(), nil + case "putPrompts": + return prompts.NewPutPromptsOK(), nil + case "getPromptAnswers": + return prompts.NewGetPromptAnswersOK(), nil + case "postPromptAnswers": + return prompts.NewPostPromptAnswersOK(), nil + case "getPromptCategories": + return prompts.NewGetPromptCategoriesOK(), nil + case "postPromptCategories": + return prompts.NewPostPromptCategoriesOK(), nil + case "putPromptCategories": + return prompts.NewPutPromptCategoriesOK(), nil + case "getPromptTags": + return prompts.NewGetPromptTagsOK(), nil + case "postPromptTags": + return prompts.NewPostPromptTagsOK(), nil + case "putPromptTags": + return prompts.NewPutPromptTagsOK(), nil + default: + panic("unexpected generated prompt operation: " + operation.ID) + } +} + +func TestGeneratedPromptOperationContract(t *testing.T) { + type operationCall func(openapiruntime.ContextualTransport) error + + tests := []struct { + name string + wantID string + wantMethod string + wantPath string + call operationCall + }{ + { + name: "list prompts", wantID: "getPrompts", wantMethod: "GET", wantPath: "/prompts", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).GetPrompts(prompts.NewGetPromptsParams(), promptTestAuth) + return err + }, + }, + { + name: "create prompt", wantID: "postPrompts", wantMethod: "POST", wantPath: "/prompts", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PostPrompts(prompts.NewPostPromptsParams(), promptTestAuth) + return err + }, + }, + { + name: "update prompt", wantID: "putPrompts", wantMethod: "PUT", wantPath: "/prompts", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PutPrompts(prompts.NewPutPromptsParams(), promptTestAuth) + return err + }, + }, + { + name: "list prompt answers", wantID: "getPromptAnswers", wantMethod: "GET", wantPath: "/promptanswers", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).GetPromptAnswers(prompts.NewGetPromptAnswersParams(), promptTestAuth) + return err + }, + }, + { + name: "append prompt answer", wantID: "postPromptAnswers", wantMethod: "POST", wantPath: "/promptanswers", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PostPromptAnswers(prompts.NewPostPromptAnswersParams(), promptTestAuth) + return err + }, + }, + { + name: "list prompt categories", wantID: "getPromptCategories", wantMethod: "GET", wantPath: "/promptcategories", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).GetPromptCategories(prompts.NewGetPromptCategoriesParams(), promptTestAuth) + return err + }, + }, + { + name: "create prompt category", wantID: "postPromptCategories", wantMethod: "POST", wantPath: "/promptcategories", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PostPromptCategories(prompts.NewPostPromptCategoriesParams(), promptTestAuth) + return err + }, + }, + { + name: "update prompt category", wantID: "putPromptCategories", wantMethod: "PUT", wantPath: "/promptcategories", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PutPromptCategories(prompts.NewPutPromptCategoriesParams(), promptTestAuth) + return err + }, + }, + { + name: "list prompt tags", wantID: "getPromptTags", wantMethod: "GET", wantPath: "/prompttags", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).GetPromptTags(prompts.NewGetPromptTagsParams(), promptTestAuth) + return err + }, + }, + { + name: "create prompt tag", wantID: "postPromptTags", wantMethod: "POST", wantPath: "/prompttags", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PostPromptTags(prompts.NewPostPromptTagsParams(), promptTestAuth) + return err + }, + }, + { + name: "update prompt tag", wantID: "putPromptTags", wantMethod: "PUT", wantPath: "/prompttags", + call: func(transport openapiruntime.ContextualTransport) error { + _, err := prompts.New(transport, strfmt.Default).PutPromptTags(prompts.NewPutPromptTagsParams(), promptTestAuth) + return err + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + transport := &promptCaptureTransport{} + if err := test.call(transport); err != nil { + t.Fatalf("generated client operation failed: %v", err) + } + if transport.operation == nil { + t.Fatal("generated client did not submit an operation") + } + if transport.operation.ID != test.wantID { + t.Errorf("operation ID = %q, want %q", transport.operation.ID, test.wantID) + } + if transport.operation.Method != test.wantMethod { + t.Errorf("method = %q, want %q", transport.operation.Method, test.wantMethod) + } + if transport.operation.PathPattern != test.wantPath { + t.Errorf("path = %q, want %q", transport.operation.PathPattern, test.wantPath) + } + if transport.operation.AuthInfo == nil { + t.Error("generated operation discarded its auth-info writer") + } + }) + } +} + +func TestPromptSpecRequiresExactCompoundAuthentication(t *testing.T) { + specText := readMembersPromptSpec(t) + for _, definition := range []string{ + " ApiKeyAuth:\n type: \"apiKey\"\n in: \"header\"\n name: \"X-API-Key\"", + " kvSessionCookie:\n name: Cookie\n in: header\n type: apiKey", + } { + if !strings.Contains(specText, definition) { + t.Fatalf("authoritative spec is missing exact authentication definition:\n%s", definition) + } + } + + operations := map[string]map[string]string{ + "/prompts": { + "GET": "getPrompts", + "POST": "postPrompts", + "PUT": "putPrompts", + }, + "/promptanswers": { + "GET": "getPromptAnswers", + "POST": "postPromptAnswers", + }, + "/promptcategories": { + "GET": "getPromptCategories", + "POST": "postPromptCategories", + "PUT": "putPromptCategories", + }, + "/prompttags": { + "GET": "getPromptTags", + "POST": "postPromptTags", + "PUT": "putPromptTags", + }, + } + + for path, methods := range operations { + for method, operationID := range methods { + operation := promptSpecOperationBlock(t, specText, path, strings.ToLower(method)) + if !strings.Contains(operation, " operationId: "+operationID+"\n") { + t.Errorf("%s %s does not preserve operationId %q", method, path, operationID) + } + const compoundSecurity = " security:\n - ApiKeyAuth: []\n kvSessionCookie: []" + if strings.Count(operation, compoundSecurity) != 1 { + t.Errorf("%s %s does not require the exact API-key + human-session compound security", method, path) + } + } + } +} + +func TestPromptModelHasExactFullFieldParity(t *testing.T) { + want := map[string]string{ + "CreatedByID": "*string", + "CreatedDate": "*string", + "ID": "string", + "Icon": "*string", + "ImageAltText": "*string", + "ImageURL": "*string", + "LastModifiedByID": "*string", + "LastModifiedDate": "*string", + "Logo": "*string", + "MaxTokens": "*float64", + "Model": "*string", + "Name": "*string", + "Order": "*float64", + "Parameters": "*string", + "Prompt": "*string", + "PromptCategoryID": "*string", + "ResearchProjectIDs": "[]string", + "Slug": "*string", + "System": "*string", + "Tags": "[]string", + "Temperature": "*float64", + "TenantID": "*string", + "Title": "*string", + "UsedCount": "*float64", + "UserID": "*string", + } + + model := reflect.TypeOf(members_models.Prompt{}) + if model.NumField() != len(want) { + t.Fatalf("Prompt has %d fields, want exact authoritative set of %d", model.NumField(), len(want)) + } + for name, wantType := range want { + field, exists := model.FieldByName(name) + if !exists { + t.Errorf("Prompt is missing authoritative field %s", name) + continue + } + if field.Type.String() != wantType { + t.Errorf("Prompt.%s type = %s, want %s", name, field.Type, wantType) + } + if got := strings.Split(field.Tag.Get("json"), ",")[0]; got != name { + t.Errorf("Prompt.%s JSON name = %q, want %q", name, got, name) + } + } + + maxTokens := 4096.0 + body, err := json.Marshal(members_models.Prompt{MaxTokens: &maxTokens}) + if err != nil { + t.Fatalf("marshal Prompt: %v", err) + } + if !bytes.Contains(body, []byte(`"MaxTokens":4096`)) { + t.Fatalf("Prompt JSON lost MaxTokens: %s", body) + } +} + +func TestPromptAnswerIsAppendOnlyAndLegacyMisspellingIsAbsent(t *testing.T) { + contract := reflect.TypeOf((*prompts.ClientService)(nil)).Elem() + for _, method := range []string{ + "PutPromptAnswer", + "PutPromptAnswerContext", + "PutPromptAnswers", + "PutPromptAnswersContext", + "PutPromptAnsweer", + "PutPromptAnsweerContext", + "PutPromptAnsweers", + "PutPromptAnsweersContext", + } { + if _, exists := contract.MethodByName(method); exists { + t.Errorf("append-only PromptAnswer client exposes forbidden update %s", method) + } + } + + answerPath := promptSpecPathBlock(t, readMembersPromptSpec(t), "/promptanswers") + for _, forbidden := range []string{" put:", " patch:", " delete:"} { + if strings.Contains(answerPath, forbidden) { + t.Fatalf("authoritative PromptAnswer contract exposes forbidden operation %q", strings.TrimSpace(forbidden)) + } + } +} + +func TestPromptUpdateClientsPreserveConflictResponses(t *testing.T) { + conflicts := []interface{ IsCode(int) bool }{ + prompts.NewPutPromptsConflict(), + prompts.NewPutPromptCategoriesConflict(), + prompts.NewPutPromptTagsConflict(), + } + for _, conflict := range conflicts { + if !conflict.IsCode(409) { + t.Errorf("%T does not preserve the optimistic-conflict response", conflict) + } + } +} + +func TestMembersSpecIsPinnedToPromptProviderSource(t *testing.T) { + repoRoot := promptRepoRoot(t) + mainSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "members-vernonkeenan.yaml")) + if err != nil { + t.Fatalf("read Members spec: %v", err) + } + sum := sha256.Sum256(mainSpec) + if got := hex.EncodeToString(sum[:]); got != membersPromptProviderSpecSHA256 { + t.Fatalf("Members spec drifted from provider commit 4e868f1: SHA-256 = %s, want %s", got, membersPromptProviderSpecSHA256) + } + + externalSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "external", "members-vernonkeenan.yaml")) + if err != nil { + t.Fatalf("read external Members spec: %v", err) + } + normalized := bytes.ReplaceAll(externalSpec, []byte(`"https"`), []byte(`"http"`)) + normalized = bytes.ReplaceAll(normalized, []byte("gw.tnxs.net"), []byte("members.vernonkeenan.com:8080")) + normalized = bytes.ReplaceAll(normalized, []byte(`"/vk/members/v1"`), []byte(`"/v1"`)) + if !bytes.Equal(normalized, mainSpec) { + t.Fatal("external Members spec differs from the conventional host/scheme/base-path rewrite") + } +} + +func TestGeneratedPromptSurfaceHasNoSalesforceOrEmbeddedSecrets(t *testing.T) { + repoRoot := promptRepoRoot(t) + targets := []string{ + filepath.Join(repoRoot, "api", "members", "members_client", "prompts"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_request.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_response.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_answer.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_answer_request.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_answer_response.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_category.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_category_request.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_category_response.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_tag.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_tag_request.go"), + filepath.Join(repoRoot, "api", "members", "members_models", "prompt_tag_response.go"), + } + credentialLiteral := regexp.MustCompile(`(?i)(api[_-]?key|password|secret)\s*[:=]\s*["'][^"']+["']`) + + for _, target := range targets { + err := filepath.WalkDir(target, func(path string, entry os.DirEntry, walkErr error) error { + if walkErr != nil { + return walkErr + } + if entry.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { + return nil + } + + content, err := os.ReadFile(path) + if err != nil { + return err + } + lower := strings.ToLower(string(content)) + for _, forbidden := range []string{"salesforce", "sf-gate", "go-force", "private key-----"} { + if strings.Contains(lower, forbidden) { + t.Errorf("%s contains forbidden boundary %q", path, forbidden) + } + } + if credentialLiteral.Match(content) { + t.Errorf("%s contains a credential-shaped literal", path) + } + return nil + }) + if err != nil { + t.Fatalf("scan generated prompt target %s: %v", target, err) + } + } +} + +func readMembersPromptSpec(t *testing.T) string { + t.Helper() + content, err := os.ReadFile(filepath.Join(promptRepoRoot(t), "swagger", "members-vernonkeenan.yaml")) + if err != nil { + t.Fatalf("read Members Swagger: %v", err) + } + return string(content) +} + +func promptSpecPathBlock(t *testing.T, specText, path string) string { + t.Helper() + startMarker := " " + path + ":\n" + start := strings.Index(specText, startMarker) + if start < 0 { + t.Fatalf("authoritative spec is missing path %s", path) + } + block := specText[start+len(startMarker):] + if end := strings.Index(block, "\n /"); end >= 0 { + block = block[:end] + } + return block +} + +func promptSpecOperationBlock(t *testing.T, specText, path, method string) string { + t.Helper() + pathBlock := promptSpecPathBlock(t, specText, path) + startMarker := " " + method + ":\n" + start := strings.Index(pathBlock, startMarker) + if start < 0 { + t.Fatalf("authoritative spec is missing %s %s", strings.ToUpper(method), path) + } + block := pathBlock[start+len(startMarker):] + methodBoundary := regexp.MustCompile(`(?m)^ [a-z]+:\n`) + if end := methodBoundary.FindStringIndex(block); end != nil { + block = block[:end[0]] + } + return block +} + +func promptRepoRoot(t *testing.T) string { + t.Helper() + _, testFile, _, ok := runtime.Caller(0) + if !ok { + t.Fatal("resolve test source path") + } + return filepath.Clean(filepath.Join(filepath.Dir(testFile), "..", "..", "..")) +} diff --git a/api/members/members_client/prompts/prompts_client.go b/api/members/members_client/prompts/prompts_client.go index 1f55a1e..e50f151 100644 --- a/api/members/members_client/prompts/prompts_client.go +++ b/api/members/members_client/prompts/prompts_client.go @@ -108,12 +108,6 @@ type ClientService interface { // PostPromptsContext create new prompts. PostPromptsContext(ctx context.Context, params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error) - // PutPromptAnsweers update prompt response. - PutPromptAnsweers(params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error) - - // PutPromptAnsweersContext update prompt response. - PutPromptAnsweersContext(ctx context.Context, params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error) - // PutPromptCategories update prompt categories. PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error) @@ -137,7 +131,7 @@ type ClientService interface { // GetPromptAnswers gets a list of prompt responses. // -// Return a list of PromptAnswers records from the datastore. +// Tenant/owner-scoped prompt execution-result read. Requires members:prompt-answer:read and an active human session.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -156,7 +150,7 @@ func (a *Client) GetPromptAnswers(params *GetPromptAnswersParams, authInfo runti // GetPromptAnswersContext gets a list of prompt responses. // -// Return a list of PromptAnswers records from the datastore. +// Tenant/owner-scoped prompt execution-result read. Requires members:prompt-answer:read and an active human session.. // // Do not use the deprecated [GetPromptAnswersParams.Context] with this method: it would be ignored. func (a *Client) GetPromptAnswersContext(ctx context.Context, params *GetPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptAnswersOK, error) { @@ -204,7 +198,7 @@ func (a *Client) GetPromptAnswersContext(ctx context.Context, params *GetPromptA // GetPromptCategories gets a list of prompt categories. // -// Return a list of PromptCategory records from the datastore. +// Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-category:read.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -223,7 +217,7 @@ func (a *Client) GetPromptCategories(params *GetPromptCategoriesParams, authInfo // GetPromptCategoriesContext gets a list of prompt categories. // -// Return a list of PromptCategory records from the datastore. +// Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-category:read.. // // Do not use the deprecated [GetPromptCategoriesParams.Context] with this method: it would be ignored. func (a *Client) GetPromptCategoriesContext(ctx context.Context, params *GetPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptCategoriesOK, error) { @@ -271,7 +265,7 @@ func (a *Client) GetPromptCategoriesContext(ctx context.Context, params *GetProm // GetPromptTags gets a list of prompt tags. // -// Return a list of PromptTag records from the datastore. +// Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-tag:read.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -290,7 +284,7 @@ func (a *Client) GetPromptTags(params *GetPromptTagsParams, authInfo runtime.Cli // GetPromptTagsContext gets a list of prompt tags. // -// Return a list of PromptTag records from the datastore. +// Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-tag:read.. // // Do not use the deprecated [GetPromptTagsParams.Context] with this method: it would be ignored. func (a *Client) GetPromptTagsContext(ctx context.Context, params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error) { @@ -338,7 +332,7 @@ func (a *Client) GetPromptTagsContext(ctx context.Context, params *GetPromptTags // GetPrompts gets a list of prompts. // -// Return a list of Prompt records from the datastore. +// Tenant/owner-scoped prompt read. Requires members:prompt:read and an active human session.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -357,7 +351,7 @@ func (a *Client) GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAut // GetPromptsContext gets a list of prompts. // -// Return a list of Prompt records from the datastore. +// Tenant/owner-scoped prompt read. Requires members:prompt:read and an active human session.. // // Do not use the deprecated [GetPromptsParams.Context] with this method: it would be ignored. func (a *Client) GetPromptsContext(ctx context.Context, params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error) { @@ -405,7 +399,7 @@ func (a *Client) GetPromptsContext(ctx context.Context, params *GetPromptsParams // PostPromptAnswers creates new prompt responses. // -// Create PromptAnswers. +// Append an immutable prompt execution result. Requires members:prompt-answer:create. IDs, audit, tenant, and user are governed by Members.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -424,7 +418,7 @@ func (a *Client) PostPromptAnswers(params *PostPromptAnswersParams, authInfo run // PostPromptAnswersContext creates new prompt responses. // -// Create PromptAnswers. +// Append an immutable prompt execution result. Requires members:prompt-answer:create. IDs, audit, tenant, and user are governed by Members.. // // Do not use the deprecated [PostPromptAnswersParams.Context] with this method: it would be ignored. func (a *Client) PostPromptAnswersContext(ctx context.Context, params *PostPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptAnswersOK, error) { @@ -472,7 +466,7 @@ func (a *Client) PostPromptAnswersContext(ctx context.Context, params *PostPromp // PostPromptCategories creates new prompt categories. // -// Create PromptCategories. +// Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-category:create.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -491,7 +485,7 @@ func (a *Client) PostPromptCategories(params *PostPromptCategoriesParams, authIn // PostPromptCategoriesContext creates new prompt categories. // -// Create PromptCategories. +// Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-category:create.. // // Do not use the deprecated [PostPromptCategoriesParams.Context] with this method: it would be ignored. func (a *Client) PostPromptCategoriesContext(ctx context.Context, params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error) { @@ -539,7 +533,7 @@ func (a *Client) PostPromptCategoriesContext(ctx context.Context, params *PostPr // PostPromptTags creates new prompt tags. // -// Create PromptTags in Taxnexus. +// Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:create.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -558,7 +552,7 @@ func (a *Client) PostPromptTags(params *PostPromptTagsParams, authInfo runtime.C // PostPromptTagsContext creates new prompt tags. // -// Create PromptTags in Taxnexus. +// Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:create.. // // Do not use the deprecated [PostPromptTagsParams.Context] with this method: it would be ignored. func (a *Client) PostPromptTagsContext(ctx context.Context, params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error) { @@ -606,7 +600,7 @@ func (a *Client) PostPromptTagsContext(ctx context.Context, params *PostPromptTa // PostPrompts creates new prompts. // -// Create Prompts. +// Tenant/owner-scoped prompt create. Requires members:prompt:create. IDs, audit, tenant, user, and usage are governed by Members.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -625,7 +619,7 @@ func (a *Client) PostPrompts(params *PostPromptsParams, authInfo runtime.ClientA // PostPromptsContext creates new prompts. // -// Create Prompts. +// Tenant/owner-scoped prompt create. Requires members:prompt:create. IDs, audit, tenant, user, and usage are governed by Members.. // // Do not use the deprecated [PostPromptsParams.Context] with this method: it would be ignored. func (a *Client) PostPromptsContext(ctx context.Context, params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error) { @@ -671,76 +665,9 @@ func (a *Client) PostPromptsContext(ctx context.Context, params *PostPromptsPara panic(msg) } -// PutPromptAnsweers updates prompt response. -// -// Update PromptAnswers. -// -// This method does not support injected context. -// However, timeout and opentracing contexts are honored whenever enabled. -// -// If you need to pass a specific context, use [Client.PutPromptAnsweersContext] instead. -func (a *Client) PutPromptAnsweers(params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error) { - var ctx context.Context - if params.inner.ctx != nil { - ctx = params.inner.ctx - } else { - ctx = context.Background() - } - - return a.PutPromptAnsweersContext(ctx, params, authInfo, opts...) -} - -// PutPromptAnsweersContext updates prompt response. -// -// Update PromptAnswers. -// -// Do not use the deprecated [PutPromptAnsweersParams.Context] with this method: it would be ignored. -func (a *Client) PutPromptAnsweersContext(ctx context.Context, params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewPutPromptAnsweersParams() - } - - op := &runtime.ClientOperation{ - ID: "putPromptAnsweers", - Method: "PUT", - PathPattern: "/promptanswers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutPromptAnsweersReader{formats: a.formats}, - AuthInfo: authInfo, - Client: params.HTTPClient, - } - - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.SubmitContext(ctx, op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*PutPromptAnsweersOK) - if ok { - return success, nil - } - - // unexpected success response. - - // no default response is defined. - // - // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for putPromptAnsweers: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - // PutPromptCategories updates prompt categories. // -// Update PromptCategory. +// Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-category:update and LastModifiedDate CAS.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -759,7 +686,7 @@ func (a *Client) PutPromptCategories(params *PutPromptCategoriesParams, authInfo // PutPromptCategoriesContext updates prompt categories. // -// Update PromptCategory. +// Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-category:update and LastModifiedDate CAS.. // // Do not use the deprecated [PutPromptCategoriesParams.Context] with this method: it would be ignored. func (a *Client) PutPromptCategoriesContext(ctx context.Context, params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error) { @@ -807,7 +734,7 @@ func (a *Client) PutPromptCategoriesContext(ctx context.Context, params *PutProm // PutPromptTags updates prompt tags. // -// Update PromptTag in Taxnexus. +// Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:update and LastModifiedDate CAS.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -826,7 +753,7 @@ func (a *Client) PutPromptTags(params *PutPromptTagsParams, authInfo runtime.Cli // PutPromptTagsContext updates prompt tags. // -// Update PromptTag in Taxnexus. +// Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:update and LastModifiedDate CAS.. // // Do not use the deprecated [PutPromptTagsParams.Context] with this method: it would be ignored. func (a *Client) PutPromptTagsContext(ctx context.Context, params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error) { @@ -874,7 +801,7 @@ func (a *Client) PutPromptTagsContext(ctx context.Context, params *PutPromptTags // PutPrompts updates prompts. // -// Update Prompt. +// Tenant/owner-scoped full prompt replacement. Requires members:prompt:update and LastModifiedDate CAS. IDs, audit, tenant, user, and usage are governed by Members.. // // This method does not support injected context. // However, timeout and opentracing contexts are honored whenever enabled. @@ -893,7 +820,7 @@ func (a *Client) PutPrompts(params *PutPromptsParams, authInfo runtime.ClientAut // PutPromptsContext updates prompts. // -// Update Prompt. +// Tenant/owner-scoped full prompt replacement. Requires members:prompt:update and LastModifiedDate CAS. IDs, audit, tenant, user, and usage are governed by Members.. // // Do not use the deprecated [PutPromptsParams.Context] with this method: it would be ignored. func (a *Client) PutPromptsContext(ctx context.Context, params *PutPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptsOK, error) { diff --git a/api/members/members_client/prompts/put_prompt_answeers_parameters.go b/api/members/members_client/prompts/put_prompt_answeers_parameters.go deleted file mode 100644 index 113aaad..0000000 --- a/api/members/members_client/prompts/put_prompt_answeers_parameters.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package prompts - -import ( - "context" - "net/http" - "time" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPutPromptAnsweersParams creates a new PutPromptAnsweersParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutPromptAnsweersParams() *PutPromptAnsweersParams { - return NewPutPromptAnsweersParamsWithTimeout(cr.DefaultTimeout) -} - -// NewPutPromptAnsweersParamsWithTimeout creates a new PutPromptAnsweersParams object -// with the ability to set a timeout on a request. -func NewPutPromptAnsweersParamsWithTimeout(timeout time.Duration) *PutPromptAnsweersParams { - return &PutPromptAnsweersParams{ - inner: innerParams{ - timeout: timeout, - }, - } -} - -// NewPutPromptAnsweersParamsWithContext creates a new PutPromptAnsweersParams object -// with the ability to set a context for a request. -// -// Deprecated: use the operation call with context to pass the context instead of [PutPromptAnsweersParams]. -func NewPutPromptAnsweersParamsWithContext(ctx context.Context) *PutPromptAnsweersParams { - return &PutPromptAnsweersParams{ - inner: innerParams{ - ctx: ctx, - }, - } -} - -// NewPutPromptAnsweersParamsWithHTTPClient creates a new PutPromptAnsweersParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutPromptAnsweersParamsWithHTTPClient(client *http.Client) *PutPromptAnsweersParams { - return &PutPromptAnsweersParams{ - HTTPClient: client, - } -} - -/* -PutPromptAnsweersParams contains all the parameters to send to the API endpoint - - for the put prompt answeers operation. - - Typically these are written to a http.Request. -*/ -type PutPromptAnsweersParams struct { - - // PromptAnswerRequest. - // - // An array of PromptAnswer objects - PromptAnswerRequest *members_models.PromptAnswerRequest - - HTTPClient *http.Client - - inner innerParams -} - -// WithDefaults hydrates default values in the put prompt answeers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutPromptAnsweersParams) WithDefaults() *PutPromptAnsweersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put prompt answeers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutPromptAnsweersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put prompt answeers params. -func (o *PutPromptAnsweersParams) WithTimeout(timeout time.Duration) *PutPromptAnsweersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put prompt answeers params. -func (o *PutPromptAnsweersParams) SetTimeout(timeout time.Duration) { - o.inner.timeout = timeout -} - -// WithContext adds the context to the put prompt answeers params. -// -// Deprecated: use the operation call with context to pass the context instead of [PutPromptAnsweersParams]. -func (o *PutPromptAnsweersParams) WithContext(ctx context.Context) *PutPromptAnsweersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put prompt answeers params. -// -// Deprecated: use the operation call with context to pass the context instead of [PutPromptAnsweersParams]. -func (o *PutPromptAnsweersParams) SetContext(ctx context.Context) { - o.inner.ctx = ctx -} - -// WithHTTPClient adds the HTTPClient to the put prompt answeers params. -func (o *PutPromptAnsweersParams) WithHTTPClient(client *http.Client) *PutPromptAnsweersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put prompt answeers params. -func (o *PutPromptAnsweersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPromptAnswerRequest adds the promptAnswerRequest to the put prompt answeers params. -func (o *PutPromptAnsweersParams) WithPromptAnswerRequest(promptAnswerRequest *members_models.PromptAnswerRequest) *PutPromptAnsweersParams { - o.SetPromptAnswerRequest(promptAnswerRequest) - return o -} - -// SetPromptAnswerRequest adds the promptAnswerRequest to the put prompt answeers params. -func (o *PutPromptAnsweersParams) SetPromptAnswerRequest(promptAnswerRequest *members_models.PromptAnswerRequest) { - o.PromptAnswerRequest = promptAnswerRequest -} - -// WriteToRequest writes these params to a [runtime.ClientRequest]. -func (o *PutPromptAnsweersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.inner.timeout); err != nil { - return err - } - var res []error - if o.PromptAnswerRequest != nil { - if err := r.SetBodyParam(o.PromptAnswerRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/prompts/put_prompt_answeers_responses.go b/api/members/members_client/prompts/put_prompt_answeers_responses.go deleted file mode 100644 index 88aa83a..0000000 --- a/api/members/members_client/prompts/put_prompt_answeers_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package prompts - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// PutPromptAnsweersReader is a Reader for the PutPromptAnsweers structure. -type PutPromptAnsweersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutPromptAnsweersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewPutPromptAnsweersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 401: - result := NewPutPromptAnsweersUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPutPromptAnsweersForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPutPromptAnsweersNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 422: - result := NewPutPromptAnsweersUnprocessableEntity() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutPromptAnsweersInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[PUT /promptanswers] putPromptAnsweers", response, response.Code()) - } -} - -// NewPutPromptAnsweersOK creates a PutPromptAnsweersOK with default headers values -func NewPutPromptAnsweersOK() *PutPromptAnsweersOK { - return &PutPromptAnsweersOK{} -} - -// PutPromptAnsweersOK describes a response with status code 200, with default header values. -// -// Response with PromptAnswer objects -type PutPromptAnsweersOK struct { - Payload *members_models.PromptAnswerResponse -} - -// IsSuccess returns true when this put prompt answeers o k response has a 2xx status code -func (o *PutPromptAnsweersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put prompt answeers o k response has a 3xx status code -func (o *PutPromptAnsweersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers o k response has a 4xx status code -func (o *PutPromptAnsweersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put prompt answeers o k response has a 5xx status code -func (o *PutPromptAnsweersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put prompt answeers o k response a status code equal to that given -func (o *PutPromptAnsweersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the put prompt answeers o k response -func (o *PutPromptAnsweersOK) Code() int { - return 200 -} - -func (o *PutPromptAnsweersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersOK %s", 200, payload) -} - -func (o *PutPromptAnsweersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersOK %s", 200, payload) -} - -func (o *PutPromptAnsweersOK) GetPayload() *members_models.PromptAnswerResponse { - return o.Payload -} - -func (o *PutPromptAnsweersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(members_models.PromptAnswerResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewPutPromptAnsweersUnauthorized creates a PutPromptAnsweersUnauthorized with default headers values -func NewPutPromptAnsweersUnauthorized() *PutPromptAnsweersUnauthorized { - return &PutPromptAnsweersUnauthorized{} -} - -// PutPromptAnsweersUnauthorized describes a response with status code 401, with default header values. -// -// Access Unauthorized, invalid API-KEY was used -type PutPromptAnsweersUnauthorized struct { - Payload *members_models.Error -} - -// IsSuccess returns true when this put prompt answeers unauthorized response has a 2xx status code -func (o *PutPromptAnsweersUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put prompt answeers unauthorized response has a 3xx status code -func (o *PutPromptAnsweersUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers unauthorized response has a 4xx status code -func (o *PutPromptAnsweersUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this put prompt answeers unauthorized response has a 5xx status code -func (o *PutPromptAnsweersUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this put prompt answeers unauthorized response a status code equal to that given -func (o *PutPromptAnsweersUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the put prompt answeers unauthorized response -func (o *PutPromptAnsweersUnauthorized) Code() int { - return 401 -} - -func (o *PutPromptAnsweersUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnauthorized %s", 401, payload) -} - -func (o *PutPromptAnsweersUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnauthorized %s", 401, payload) -} - -func (o *PutPromptAnsweersUnauthorized) GetPayload() *members_models.Error { - return o.Payload -} - -func (o *PutPromptAnsweersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(members_models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewPutPromptAnsweersForbidden creates a PutPromptAnsweersForbidden with default headers values -func NewPutPromptAnsweersForbidden() *PutPromptAnsweersForbidden { - return &PutPromptAnsweersForbidden{} -} - -// PutPromptAnsweersForbidden describes a response with status code 403, with default header values. -// -// Access forbidden, account lacks access -type PutPromptAnsweersForbidden struct { - AccessControlAllowOrigin string - - Payload *members_models.Error -} - -// IsSuccess returns true when this put prompt answeers forbidden response has a 2xx status code -func (o *PutPromptAnsweersForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put prompt answeers forbidden response has a 3xx status code -func (o *PutPromptAnsweersForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers forbidden response has a 4xx status code -func (o *PutPromptAnsweersForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put prompt answeers forbidden response has a 5xx status code -func (o *PutPromptAnsweersForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put prompt answeers forbidden response a status code equal to that given -func (o *PutPromptAnsweersForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the put prompt answeers forbidden response -func (o *PutPromptAnsweersForbidden) Code() int { - return 403 -} - -func (o *PutPromptAnsweersForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersForbidden %s", 403, payload) -} - -func (o *PutPromptAnsweersForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersForbidden %s", 403, payload) -} - -func (o *PutPromptAnsweersForbidden) GetPayload() *members_models.Error { - return o.Payload -} - -func (o *PutPromptAnsweersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // hydrates response header Access-Control-Allow-Origin - hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") - - if hdrAccessControlAllowOrigin != "" { - o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin - } - - o.Payload = new(members_models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewPutPromptAnsweersNotFound creates a PutPromptAnsweersNotFound with default headers values -func NewPutPromptAnsweersNotFound() *PutPromptAnsweersNotFound { - return &PutPromptAnsweersNotFound{} -} - -// PutPromptAnsweersNotFound describes a response with status code 404, with default header values. -// -// Resource was not found -type PutPromptAnsweersNotFound struct { - Payload *members_models.Error -} - -// IsSuccess returns true when this put prompt answeers not found response has a 2xx status code -func (o *PutPromptAnsweersNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put prompt answeers not found response has a 3xx status code -func (o *PutPromptAnsweersNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers not found response has a 4xx status code -func (o *PutPromptAnsweersNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this put prompt answeers not found response has a 5xx status code -func (o *PutPromptAnsweersNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this put prompt answeers not found response a status code equal to that given -func (o *PutPromptAnsweersNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the put prompt answeers not found response -func (o *PutPromptAnsweersNotFound) Code() int { - return 404 -} - -func (o *PutPromptAnsweersNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersNotFound %s", 404, payload) -} - -func (o *PutPromptAnsweersNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersNotFound %s", 404, payload) -} - -func (o *PutPromptAnsweersNotFound) GetPayload() *members_models.Error { - return o.Payload -} - -func (o *PutPromptAnsweersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(members_models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewPutPromptAnsweersUnprocessableEntity creates a PutPromptAnsweersUnprocessableEntity with default headers values -func NewPutPromptAnsweersUnprocessableEntity() *PutPromptAnsweersUnprocessableEntity { - return &PutPromptAnsweersUnprocessableEntity{} -} - -// PutPromptAnsweersUnprocessableEntity describes a response with status code 422, with default header values. -// -// Unprocessable Entity, likely a bad parameter -type PutPromptAnsweersUnprocessableEntity struct { - Payload *members_models.Error -} - -// IsSuccess returns true when this put prompt answeers unprocessable entity response has a 2xx status code -func (o *PutPromptAnsweersUnprocessableEntity) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put prompt answeers unprocessable entity response has a 3xx status code -func (o *PutPromptAnsweersUnprocessableEntity) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers unprocessable entity response has a 4xx status code -func (o *PutPromptAnsweersUnprocessableEntity) IsClientError() bool { - return true -} - -// IsServerError returns true when this put prompt answeers unprocessable entity response has a 5xx status code -func (o *PutPromptAnsweersUnprocessableEntity) IsServerError() bool { - return false -} - -// IsCode returns true when this put prompt answeers unprocessable entity response a status code equal to that given -func (o *PutPromptAnsweersUnprocessableEntity) IsCode(code int) bool { - return code == 422 -} - -// Code gets the status code for the put prompt answeers unprocessable entity response -func (o *PutPromptAnsweersUnprocessableEntity) Code() int { - return 422 -} - -func (o *PutPromptAnsweersUnprocessableEntity) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnprocessableEntity %s", 422, payload) -} - -func (o *PutPromptAnsweersUnprocessableEntity) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnprocessableEntity %s", 422, payload) -} - -func (o *PutPromptAnsweersUnprocessableEntity) GetPayload() *members_models.Error { - return o.Payload -} - -func (o *PutPromptAnsweersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(members_models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewPutPromptAnsweersInternalServerError creates a PutPromptAnsweersInternalServerError with default headers values -func NewPutPromptAnsweersInternalServerError() *PutPromptAnsweersInternalServerError { - return &PutPromptAnsweersInternalServerError{} -} - -// PutPromptAnsweersInternalServerError describes a response with status code 500, with default header values. -// -// Server Internal Error -type PutPromptAnsweersInternalServerError struct { - Payload *members_models.Error -} - -// IsSuccess returns true when this put prompt answeers internal server error response has a 2xx status code -func (o *PutPromptAnsweersInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put prompt answeers internal server error response has a 3xx status code -func (o *PutPromptAnsweersInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put prompt answeers internal server error response has a 4xx status code -func (o *PutPromptAnsweersInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this put prompt answeers internal server error response has a 5xx status code -func (o *PutPromptAnsweersInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this put prompt answeers internal server error response a status code equal to that given -func (o *PutPromptAnsweersInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the put prompt answeers internal server error response -func (o *PutPromptAnsweersInternalServerError) Code() int { - return 500 -} - -func (o *PutPromptAnsweersInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersInternalServerError %s", 500, payload) -} - -func (o *PutPromptAnsweersInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersInternalServerError %s", 500, payload) -} - -func (o *PutPromptAnsweersInternalServerError) GetPayload() *members_models.Error { - return o.Payload -} - -func (o *PutPromptAnsweersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(members_models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/api/members/members_client/prompts/put_prompt_categories_responses.go b/api/members/members_client/prompts/put_prompt_categories_responses.go index b12d898..bfa4ab3 100644 --- a/api/members/members_client/prompts/put_prompt_categories_responses.go +++ b/api/members/members_client/prompts/put_prompt_categories_responses.go @@ -49,6 +49,12 @@ func (o *PutPromptCategoriesReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 409: + result := NewPutPromptCategoriesConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPutPromptCategoriesUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -347,6 +353,74 @@ func (o *PutPromptCategoriesNotFound) readResponse(response runtime.ClientRespon return nil } +// NewPutPromptCategoriesConflict creates a PutPromptCategoriesConflict with default headers values +func NewPutPromptCategoriesConflict() *PutPromptCategoriesConflict { + return &PutPromptCategoriesConflict{} +} + +// PutPromptCategoriesConflict describes a response with status code 409, with default header values. +// +// The supplied LastModifiedDate is stale; reload the record before retrying. +type PutPromptCategoriesConflict struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories conflict response has a 2xx status code +func (o *PutPromptCategoriesConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories conflict response has a 3xx status code +func (o *PutPromptCategoriesConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories conflict response has a 4xx status code +func (o *PutPromptCategoriesConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt categories conflict response has a 5xx status code +func (o *PutPromptCategoriesConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories conflict response a status code equal to that given +func (o *PutPromptCategoriesConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the put prompt categories conflict response +func (o *PutPromptCategoriesConflict) Code() int { + return 409 +} + +func (o *PutPromptCategoriesConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesConflict %s", 409, payload) +} + +func (o *PutPromptCategoriesConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesConflict %s", 409, payload) +} + +func (o *PutPromptCategoriesConflict) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + // NewPutPromptCategoriesUnprocessableEntity creates a PutPromptCategoriesUnprocessableEntity with default headers values func NewPutPromptCategoriesUnprocessableEntity() *PutPromptCategoriesUnprocessableEntity { return &PutPromptCategoriesUnprocessableEntity{} diff --git a/api/members/members_client/prompts/put_prompt_tags_responses.go b/api/members/members_client/prompts/put_prompt_tags_responses.go index 2d558f7..c0fd618 100644 --- a/api/members/members_client/prompts/put_prompt_tags_responses.go +++ b/api/members/members_client/prompts/put_prompt_tags_responses.go @@ -49,6 +49,12 @@ func (o *PutPromptTagsReader) ReadResponse(response runtime.ClientResponse, cons return nil, err } return nil, result + case 409: + result := NewPutPromptTagsConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPutPromptTagsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -347,6 +353,74 @@ func (o *PutPromptTagsNotFound) readResponse(response runtime.ClientResponse, co return nil } +// NewPutPromptTagsConflict creates a PutPromptTagsConflict with default headers values +func NewPutPromptTagsConflict() *PutPromptTagsConflict { + return &PutPromptTagsConflict{} +} + +// PutPromptTagsConflict describes a response with status code 409, with default header values. +// +// The supplied LastModifiedDate is stale; reload the record before retrying. +type PutPromptTagsConflict struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt tags conflict response has a 2xx status code +func (o *PutPromptTagsConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt tags conflict response has a 3xx status code +func (o *PutPromptTagsConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt tags conflict response has a 4xx status code +func (o *PutPromptTagsConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt tags conflict response has a 5xx status code +func (o *PutPromptTagsConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt tags conflict response a status code equal to that given +func (o *PutPromptTagsConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the put prompt tags conflict response +func (o *PutPromptTagsConflict) Code() int { + return 409 +} + +func (o *PutPromptTagsConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsConflict %s", 409, payload) +} + +func (o *PutPromptTagsConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsConflict %s", 409, payload) +} + +func (o *PutPromptTagsConflict) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + // NewPutPromptTagsUnprocessableEntity creates a PutPromptTagsUnprocessableEntity with default headers values func NewPutPromptTagsUnprocessableEntity() *PutPromptTagsUnprocessableEntity { return &PutPromptTagsUnprocessableEntity{} diff --git a/api/members/members_client/prompts/put_prompts_responses.go b/api/members/members_client/prompts/put_prompts_responses.go index 13b486b..1d86c05 100644 --- a/api/members/members_client/prompts/put_prompts_responses.go +++ b/api/members/members_client/prompts/put_prompts_responses.go @@ -49,6 +49,12 @@ func (o *PutPromptsReader) ReadResponse(response runtime.ClientResponse, consume return nil, err } return nil, result + case 409: + result := NewPutPromptsConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPutPromptsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -347,6 +353,74 @@ func (o *PutPromptsNotFound) readResponse(response runtime.ClientResponse, consu return nil } +// NewPutPromptsConflict creates a PutPromptsConflict with default headers values +func NewPutPromptsConflict() *PutPromptsConflict { + return &PutPromptsConflict{} +} + +// PutPromptsConflict describes a response with status code 409, with default header values. +// +// The supplied LastModifiedDate is stale; reload the record before retrying. +type PutPromptsConflict struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompts conflict response has a 2xx status code +func (o *PutPromptsConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompts conflict response has a 3xx status code +func (o *PutPromptsConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompts conflict response has a 4xx status code +func (o *PutPromptsConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompts conflict response has a 5xx status code +func (o *PutPromptsConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompts conflict response a status code equal to that given +func (o *PutPromptsConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the put prompts conflict response +func (o *PutPromptsConflict) Code() int { + return 409 +} + +func (o *PutPromptsConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /prompts][%d] putPromptsConflict %s", 409, payload) +} + +func (o *PutPromptsConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /prompts][%d] putPromptsConflict %s", 409, payload) +} + +func (o *PutPromptsConflict) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + // NewPutPromptsUnprocessableEntity creates a PutPromptsUnprocessableEntity with default headers values func NewPutPromptsUnprocessableEntity() *PutPromptsUnprocessableEntity { return &PutPromptsUnprocessableEntity{} diff --git a/swagger/external/members-vernonkeenan.yaml b/swagger/external/members-vernonkeenan.yaml index ea564b5..0d824cc 100644 --- a/swagger/external/members-vernonkeenan.yaml +++ b/swagger/external/members-vernonkeenan.yaml @@ -449,6 +449,20 @@ parameters: required: true schema: $ref: "#/definitions/DocumentRequest" + folderRequest: + description: An array of Folder records + in: body + name: FolderRequest + required: true + schema: + $ref: "#/definitions/FolderRequest" + documentParameterRequest: + description: An array of DocumentParameter records + in: body + name: DocumentParameterRequest + required: true + schema: + $ref: "#/definitions/DocumentParameterRequest" emailMessageIdQuery: description: Email Message ID in: query @@ -529,6 +543,10 @@ responses: description: CourseSection Response Object schema: $ref: "#/definitions/CourseSectionResponse" + Conflict: + description: The supplied LastModifiedDate is stale; reload the record before retrying. + schema: + $ref: "../../lib/swagger/defs/error.yaml#/Error" DatabaseResponse: description: Response with Database objects schema: @@ -537,6 +555,14 @@ responses: description: Document Response Object schema: $ref: "#/definitions/DocumentResponse" + FolderResponse: + description: Folder Response Object + schema: + $ref: "#/definitions/FolderResponse" + DocumentParameterResponse: + description: DocumentParameter Response Object + schema: + $ref: "#/definitions/DocumentParameterResponse" EmailMessagesResponse: description: "Array of Email Messages" schema: @@ -663,6 +689,7 @@ paths: operationId: getBrands tags: [PortalCatalog] summary: List customer-facing brands + description: Global estate-owned catalog read. Requires members:brand:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -681,6 +708,7 @@ paths: operationId: postBrands tags: [PortalCatalog] summary: Create brands + description: Global estate-owned catalog create. Requires members:brand:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -697,6 +725,7 @@ paths: operationId: putBrands tags: [PortalCatalog] summary: Update brands without deleting history + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -707,6 +736,7 @@ paths: 400: {description: Invalid lifecycle or catalog data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -715,6 +745,7 @@ paths: operationId: getServices tags: [PortalCatalog] summary: List commercial member-facing capabilities + description: Global estate-owned catalog read. Requires members:service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -731,6 +762,7 @@ paths: operationId: postServices tags: [PortalCatalog] summary: Create commercial services + description: Global estate-owned catalog create. Requires members:service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -747,6 +779,7 @@ paths: operationId: putServices tags: [PortalCatalog] summary: Update commercial services without deleting history + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:service:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -757,6 +790,7 @@ paths: 400: {description: Invalid service data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -765,6 +799,7 @@ paths: operationId: getServiceScopes tags: [PortalCatalog] summary: List controlled client scopes + description: Global estate-owned catalog read. Requires members:service-scope:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/serviceId" @@ -782,6 +817,7 @@ paths: operationId: postServiceScopes tags: [PortalCatalog] summary: Create controlled client scopes + description: Global estate-owned catalog create. Requires members:service-scope:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -798,6 +834,7 @@ paths: operationId: putServiceScopes tags: [PortalCatalog] summary: Update controlled client scopes + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:service-scope:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -808,6 +845,7 @@ paths: 400: {description: Invalid service scope data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -816,6 +854,7 @@ paths: operationId: getBrandServices tags: [PortalCatalog] summary: List brand catalog placements + description: Global estate-owned catalog read. Requires members:brand-service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/brandId" @@ -834,6 +873,7 @@ paths: operationId: postBrandServices tags: [PortalCatalog] summary: Create brand catalog placements + description: Global estate-owned catalog create. Requires members:brand-service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -850,6 +890,7 @@ paths: operationId: putBrandServices tags: [PortalCatalog] summary: Update brand catalog placements + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand-service:update and a tenant-independent Administrator/Admin human role. Use inactive status instead of deletion. parameters: - in: body name: request @@ -860,6 +901,7 @@ paths: 400: {description: Invalid catalog placement} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -868,6 +910,7 @@ paths: operationId: getPlans tags: [PortalPlans] summary: List immutable-version commercial plans + description: Global estate-owned plan read. Requires members:plan:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -885,6 +928,7 @@ paths: operationId: postPlans tags: [PortalPlans] summary: Create plan versions + description: Global estate-owned plan create. Requires members:plan:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -901,6 +945,7 @@ paths: operationId: putPlans tags: [PortalPlans] summary: Update draft or lifecycle state; published versions are immutable + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:plan:update and a tenant-independent Administrator/Admin human role. Draft plans may be edited; active plans may only transition unchanged to retired. parameters: - in: body name: request @@ -911,6 +956,7 @@ paths: 400: {description: Invalid or immutable plan update} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -919,6 +965,7 @@ paths: operationId: getBrandPlans tags: [PortalPlans] summary: List brand plan placements + description: Global estate-owned brand-plan read. Requires members:brand-plan:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/brandId" @@ -937,6 +984,7 @@ paths: operationId: postBrandPlans tags: [PortalPlans] summary: Create brand plan placements + description: Global estate-owned brand-plan create. Requires members:brand-plan:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -953,6 +1001,7 @@ paths: operationId: putBrandPlans tags: [PortalPlans] summary: Update brand plan placements + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand-plan:update and a tenant-independent Administrator/Admin human role. brandId and planId are immutable; use inactive status instead of deletion. parameters: - in: body name: request @@ -963,6 +1012,7 @@ paths: 400: {description: Invalid plan placement} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -971,6 +1021,7 @@ paths: operationId: getPlanServices tags: [PortalPlans] summary: List plan service grants and descriptive limits + description: Global estate-owned plan-service read. Requires members:plan-service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/planId" @@ -988,6 +1039,7 @@ paths: operationId: postPlanServices tags: [PortalPlans] summary: Add service grants and descriptive limits to plans + description: Draft-plan grant create. Requires members:plan-service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -1004,6 +1056,7 @@ paths: operationId: putPlanServices tags: [PortalPlans] summary: Update draft plan service grants + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:plan-service:update and a tenant-independent Administrator/Admin human role. planId and serviceId are immutable and the Plan must remain draft. parameters: - in: body name: request @@ -1014,6 +1067,7 @@ paths: 400: {description: Invalid typed limit or immutable plan grant} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1022,6 +1076,7 @@ paths: operationId: getSubscriptions tags: [PortalAccess] summary: List tenant-scoped subscriptions + description: Tenant-scoped subscription read. Requires members:subscription:read and an active human session; tenant membership remains authoritative. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/tenantId" @@ -1041,6 +1096,7 @@ paths: operationId: postSubscriptions tags: [PortalAccess] summary: Create tenant subscriptions + description: Tenant-scoped subscription create. Requires members:subscription:create, an active human session, and tenant management authority. parameters: - in: body name: request @@ -1057,6 +1113,7 @@ paths: operationId: putSubscriptions tags: [PortalAccess] summary: Update, pause, cancel, or expire subscriptions + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:subscription:update, an active human session, and tenant management authority. tenantId and planId are immutable; canceled and expired states cannot be reopened. parameters: - in: body name: request @@ -1067,6 +1124,7 @@ paths: 400: {description: Invalid subscription lifecycle transition} 401: {description: Missing or invalid server or session credential} 403: {description: Actor cannot manage the requested tenant} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1075,6 +1133,7 @@ paths: operationId: getEntitlements tags: [PortalAccess] summary: List tenant- or user-scoped explicit grants + description: Tenant- or user-scoped entitlement read. Requires members:entitlement:read and an active human session; tenant and user visibility remain authoritative. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/tenantId" @@ -1095,6 +1154,7 @@ paths: operationId: postEntitlements tags: [PortalAccess] summary: Create explicit tenant or user grants + description: Explicit entitlement create. Requires members:entitlement:create, an active human session, and tenant management authority. revokedAt and revokedById are server-owned. parameters: - in: body name: request @@ -1111,6 +1171,7 @@ paths: operationId: putEntitlements tags: [PortalAccess] summary: Update, revoke, or expire explicit grants + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:entitlement:update, an active human session, and tenant management authority. tenantId, userId, and serviceId are immutable; revoked and expired states cannot be reopened. parameters: - in: body name: request @@ -1121,6 +1182,7 @@ paths: 400: {description: Invalid or overlapping explicit grant} 401: {description: Missing or invalid server or session credential} 403: {description: Actor cannot manage grants for the tenant} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1129,6 +1191,7 @@ paths: operationId: getEffectiveEntitlements tags: [PortalAccess] summary: Resolve effective commercial access at a UTC instant + description: Derived read-only effective access resolution. Requires members:effective-entitlement:read and an active human session. This is not a raw CRUD resource. parameters: - $ref: "#/parameters/tenantId" - $ref: "#/parameters/userId" @@ -1425,6 +1488,55 @@ paths: schema: {$ref: "../../lib/swagger/defs/error.yaml#/Error"} 500: {$ref: "#/responses/ServerError"} + /credentials/email-authentication/requests: + post: + tags: [credentials] + summary: Request an initial email-authentication link without disclosing account state + operationId: requestEmailAuthentication + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/requestId" + - $ref: "#/parameters/recoveryClientIP" + - name: emailAuthenticationRequest + in: body + required: true + schema: {$ref: "#/definitions/EmailAuthenticationRequest"} + responses: + 202: + description: Uniform accepted response for every account state. + schema: {$ref: "#/definitions/PasswordRecoveryAccepted"} + 401: {$ref: "#/responses/Unauthorized"} + 500: {$ref: "#/responses/ServerError"} + + /credentials/email-authentication/completions: + post: + tags: [credentials] + summary: Consume an initial email-authentication token and create a native session + operationId: completeEmailAuthentication + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/requestId" + - name: emailAuthenticationCompletion + in: body + required: true + schema: {$ref: "#/definitions/EmailAuthenticationCompletion"} + responses: + 200: + description: Email verified and native session created. + headers: + Set-Cookie: + type: string + description: kvSession cookie for the canonical keenanvision.net domain. + schema: + $ref: "#/definitions/EmailAuthenticationSession" + 401: {$ref: "#/responses/Unauthorized"} + 422: + description: Invalid, expired, revoked, consumed, or already-completed token. + schema: {$ref: "../../lib/swagger/defs/error.yaml#/Error"} + 500: {$ref: "#/responses/ServerError"} + /sessions: post: tags: [sessions] @@ -2120,7 +2232,7 @@ paths: - Databases /documents: get: - description: Return a list of Document records from the datastore + description: Tenant- and user-scoped Document read. Requires members:document:read and an active human session. operationId: getDocuments parameters: - $ref: "#/parameters/idQuery" @@ -2141,11 +2253,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Documents tags: - Documents post: - description: Create Documents + description: Tenant- and user-scoped Document create. Requires members:document:create and an active human session. operationId: postDocuments parameters: - $ref: "#/parameters/documentRequest" @@ -2164,11 +2277,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Documents tags: - Documents put: - description: Update Document + description: Tenant- and user-scoped Document CAS update. Requires members:document:update and an active human session. operationId: putDocuments parameters: - $ref: "#/parameters/documentRequest" @@ -2183,13 +2297,170 @@ paths: $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" + "409": + $ref: "#/responses/Conflict" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Documents tags: - Documents + /folders: + get: + description: Tenant- and user-scoped Folder read. Requires members:folder:read and an active human session. + operationId: getFolders + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Get folders + tags: + - Folders + post: + description: Tenant- and user-scoped Folder create. Requires members:folder:create and an active human session. + operationId: postFolders + parameters: + - $ref: "#/parameters/folderRequest" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create folders + tags: + - Folders + put: + description: Tenant- and user-scoped Folder CAS update. Requires members:folder:update and an active human session. + operationId: putFolders + parameters: + - $ref: "#/parameters/folderRequest" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update folders + tags: + - Folders + /documentparameters: + get: + description: Tenant- and user-scoped DocumentParameter read. Requires members:document-parameter:read and an active human session. + operationId: getDocumentParameters + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Get document parameters + tags: + - Document Parameters + post: + description: Tenant- and user-scoped DocumentParameter create. Requires members:document-parameter:create and an active human session. + operationId: postDocumentParameters + parameters: + - $ref: "#/parameters/documentParameterRequest" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create document parameters + tags: + - Document Parameters + put: + description: Tenant- and user-scoped DocumentParameter CAS update. Requires members:document-parameter:update and an active human session. + operationId: putDocumentParameters + parameters: + - $ref: "#/parameters/documentParameterRequest" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update document parameters + tags: + - Document Parameters /emailmessages: get: security: @@ -2456,7 +2727,7 @@ paths: - Events /favorites: get: - description: Return a list of Favorite records from the datastore + description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records. operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" @@ -2478,11 +2749,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Favorites tags: - Favorites post: - description: Create Favorites + description: Tenant/user-scoped favorite create. Requires members:favorite:create plus an active native member session. IDs and audit fields are server-owned. operationId: postFavorites parameters: - $ref: "#/parameters/FavoriteRequest" @@ -2501,11 +2773,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Favorites tags: - Favorites put: - description: Update Favorite + description: Full writable-field replacement using ID and LastModifiedDate as a compare-and-swap token. Requires members:favorite:update plus an active native member session. TenantID and UserID cannot move. Delete is unavailable. operationId: putFavorites parameters: - $ref: "#/parameters/FavoriteRequest" @@ -2516,6 +2789,8 @@ paths: $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" + "409": + $ref: "#/responses/Conflict" "404": $ref: "#/responses/NotFound" "422": @@ -2524,6 +2799,7 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Favorite tags: - Favorites @@ -2889,7 +3165,7 @@ paths: - PaymentMethods /prompts: get: - description: Return a list of Prompt records from the datastore + description: Tenant/owner-scoped prompt read. Requires members:prompt:read and an active human session. operationId: getPrompts parameters: - $ref: "#/parameters/idQuery" @@ -2910,11 +3186,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of Prompts tags: - Prompts post: - description: Create Prompts + description: Tenant/owner-scoped prompt create. Requires members:prompt:create. IDs, audit, tenant, user, and usage are governed by Members. operationId: postPrompts parameters: - $ref: "#/parameters/PromptRequest" @@ -2933,11 +3210,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Prompts tags: - Prompts put: - description: Update Prompt + description: Tenant/owner-scoped full prompt replacement. Requires members:prompt:update and LastModifiedDate CAS. IDs, audit, tenant, user, and usage are governed by Members. operationId: putPrompts parameters: - $ref: "#/parameters/PromptRequest" @@ -2950,18 +3228,21 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Prompts tags: - Prompts /promptanswers: get: - description: Return a list of PromptAnswers records from the datastore + description: Tenant/owner-scoped prompt execution-result read. Requires members:prompt-answer:read and an active human session. operationId: getPromptAnswers parameters: - $ref: "#/parameters/idQuery" @@ -2982,11 +3263,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptResponses tags: - Prompts post: - description: Create PromptAnswers + description: Append an immutable prompt execution result. Requires members:prompt-answer:create. IDs, audit, tenant, and user are governed by Members. operationId: postPromptAnswers parameters: - $ref: "#/parameters/PromptAnswerRequest" @@ -3005,35 +3287,13 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptResponses tags: - Prompts - put: - description: Update PromptAnswers - operationId: putPromptAnsweers - parameters: - - $ref: "#/parameters/PromptAnswerRequest" - responses: - "200": - $ref: "#/responses/PromptAnswerResponse" - "401": - $ref: "#/responses/Unauthorized" - "403": - $ref: "#/responses/AccessForbidden" - "404": - $ref: "#/responses/NotFound" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - security: - - ApiKeyAuth: [] - summary: Update PromptResponse - tags: - - Prompts /promptcategories: get: - description: Return a list of PromptCategory records from the datastore + description: Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-category:read. operationId: getPromptCategories parameters: - $ref: "#/parameters/idQuery" @@ -3054,11 +3314,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptCategories tags: - Prompts post: - description: Create PromptCategories + description: Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-category:create. operationId: postPromptCategories parameters: - $ref: "#/parameters/PromptCategoryRequest" @@ -3077,11 +3338,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptCategories tags: - Prompts put: - description: Update PromptCategory + description: Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-category:update and LastModifiedDate CAS. operationId: putPromptCategories parameters: - $ref: "#/parameters/PromptCategoryRequest" @@ -3094,18 +3356,21 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update PromptCategories tags: - Prompts /prompttags: get: - description: Return a list of PromptTag records from the datastore + description: Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-tag:read. operationId: getPromptTags parameters: - $ref: "#/parameters/idQuery" @@ -3126,11 +3391,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptTags tags: - Prompts post: - description: Create PromptTags in Taxnexus + description: Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:create. operationId: postPromptTags parameters: - $ref: "#/parameters/PromptTagRequest" @@ -3149,11 +3415,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptTags tags: - Prompts put: - description: Update PromptTag in Taxnexus + description: Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:update and LastModifiedDate CAS. operationId: putPromptTags parameters: - $ref: "#/parameters/PromptTagRequest" @@ -3166,24 +3433,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update PromptTags tags: - Prompts /researchprojectcompanies: get: - description: Return a list of ResearchProjectCompany records from the datastore + description: Tenant-scoped ResearchProjectCompany read. Requires members:research-project-company:read and an active human session. operationId: getResearchProjectCompanies parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectCompanyResponse" @@ -3199,14 +3468,14 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectCompanies tags: - ResearchProjects post: - description: Create ResearchProjectCompanies in the system + description: Tenant-scoped ResearchProjectCompany create. Requires members:research-project-company:create and an active human session. operationId: postResearchProjectCompanies parameters: - - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -3223,14 +3492,14 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectCompanies tags: - ResearchProjects put: - description: Update ResearchProjectCompany in the system + description: Tenant-scoped ResearchProjectCompany CAS update. Requires members:research-project-company:update and an active human session. operationId: putResearchProjectCompanies parameters: - - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -3241,24 +3510,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectCompanies tags: - ResearchProjects /researchprojectdocuments: get: - description: Return a list of ResearchProjectDocument records from the datastore + description: Tenant- and user-scoped ResearchProjectDocument read. Requires members:research-project-document:read and an active human session. operationId: getResearchProjectDocuments parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3274,15 +3545,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectDocuments tags: - ResearchProjects post: - description: Create ResearchProjectDocuments in the system + description: Tenant- and user-scoped ResearchProjectDocument create. Requires members:research-project-document:create and an active human session. operationId: postResearchProjectDocuments parameters: - $ref: "#/parameters/ResearchProjectDocumentRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3298,15 +3569,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectDocuments tags: - ResearchProjects put: - description: Update ResearchProjectDocument in the system + description: Tenant- and user-scoped ResearchProjectDocument CAS update. Requires members:research-project-document:update and an active human session. operationId: putResearchProjectDocuments parameters: - $ref: "#/parameters/ResearchProjectDocumentRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3316,24 +3587,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectDocuments tags: - ResearchProjects /researchprojectservices: get: - description: Return a list of ResearchProjectService records from the datastore + description: Tenant- and user-scoped ResearchProjectService read. Requires members:research-project-service:read and an active human session. operationId: getResearchProjectServices parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectServiceResponse" @@ -3349,46 +3622,22 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectServices tags: - ResearchProjects post: - description: Create ResearchProjectServices in the system + description: Tenant- and user-scoped ResearchProjectService create. Requires members:research-project-service:create and an active human session. operationId: postResearchProjectServices parameters: - $ref: "#/parameters/ResearchProjectServiceRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectServiceResponse" - "201": - $ref: "#/responses/ResearchProjectServiceResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - security: - - ApiKeyAuth: [] - summary: Create new ResearchProjectServices - tags: - - ResearchProjects - put: - description: Update ResearchProjectService in the system - operationId: putResearchProjectServices - parameters: - - $ref: "#/parameters/ResearchProjectServiceRequest" - - $ref: "#/parameters/Auth0UserIdHeader" - responses: - "200": - $ref: "#/responses/ResearchProjectServiceResponse" - "201": - $ref: "#/responses/ResearchProjectServiceResponse" - "401": - $ref: "#/responses/Unauthorized" "404": $ref: "#/responses/NotFound" "422": @@ -3397,19 +3646,45 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create new ResearchProjectServices + tags: + - ResearchProjects + put: + description: Tenant- and user-scoped ResearchProjectService CAS update. Requires members:research-project-service:update and an active human session. + operationId: putResearchProjectServices + parameters: + - $ref: "#/parameters/ResearchProjectServiceRequest" + responses: + "200": + $ref: "#/responses/ResearchProjectServiceResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectServices tags: - ResearchProjects /researchprojectproducts: get: - description: Return a list of ResearchProjectProduct records from the datastore + description: Tenant- and user-scoped ResearchProjectProduct read. Requires members:research-project-product:read and an active human session. operationId: getResearchProjectProducts parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3425,15 +3700,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectProducts tags: - ResearchProjects post: - description: Create ResearchProjectProducts in the system + description: Tenant- and user-scoped ResearchProjectProduct create. Requires members:research-project-product:create and an active human session. operationId: postResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3449,15 +3724,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectProducts tags: - ResearchProjects put: - description: Update ResearchProjectProduct in the system + description: Tenant- and user-scoped ResearchProjectProduct CAS update. Requires members:research-project-product:update and an active human session. operationId: putResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3467,24 +3742,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectProducts tags: - ResearchProjects /researchprojects: get: - description: Return a list of ResearchProject records from the datastore + description: Tenant- and user-scoped ResearchProject read. Requires members:research-project:read and an active human session. operationId: getResearchProjects parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3500,15 +3777,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjects tags: - ResearchProjects post: - description: Create ResearchProjects in the system + description: Tenant- and user-scoped ResearchProject create. Requires members:research-project:create and an active human session. operationId: postResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3524,15 +3801,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjects tags: - ResearchProjects put: - description: Update ResearchProject in the system + description: Tenant- and user-scoped ResearchProject CAS update. Requires members:research-project:update and an active human session. operationId: putResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3542,24 +3819,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjects tags: - ResearchProjects /researchprojecttopics: get: - description: Return a list of ResearchProjectTopic records from the datastore + description: Tenant- and user-scoped ResearchProjectTopic read. Requires members:research-project-topic:read and an active human session. operationId: getResearchProjectTopics parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3575,15 +3854,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectTopics tags: - ResearchProjects post: - description: Create ResearchProjectTopics in the system + description: Tenant- and user-scoped ResearchProjectTopic create. Requires members:research-project-topic:create and an active human session. operationId: postResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3599,15 +3878,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectTopics tags: - ResearchProjects put: - description: Update ResearchProjectTopic in the system + description: Tenant- and user-scoped ResearchProjectTopic CAS update. Requires members:research-project-topic:update and an active human session. operationId: putResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3617,12 +3896,15 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectTopics tags: - ResearchProjects @@ -3701,7 +3983,7 @@ paths: - Tenants /templates: get: - description: Return a list of Templates from the datastore + description: Tenant- and user-scoped Template read. Requires members:template:read and an active human session. operationId: getTemplates parameters: - $ref: "#/parameters/limitQuery" @@ -3725,11 +4007,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Templates tags: - Templates post: - description: Create new Templates + description: Tenant- and user-scoped Template create. Requires members:template:create and an active human session. operationId: postTemplates parameters: - $ref: "#/parameters/TemplateRequest" @@ -3748,9 +4031,36 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Templates tags: - Templates + put: + description: Tenant- and user-scoped Template CAS update. Requires members:template:update and an active human session. + operationId: putTemplates + parameters: + - $ref: "#/parameters/TemplateRequest" + responses: + "200": + $ref: "#/responses/TemplateResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update Templates + tags: + - Templates /tickets: get: description: Return a list of Ticket records from the datastore @@ -4004,7 +4314,7 @@ definitions: createdById: {type: string, format: uuid, x-nullable: true, readOnly: true} createdDate: {type: string, format: date-time, x-nullable: true, readOnly: true} lastModifiedById: {type: string, format: uuid, x-nullable: true, readOnly: true} - lastModifiedDate: {type: string, format: date-time, x-nullable: true, readOnly: true} + lastModifiedDate: {type: string, format: date-time, x-nullable: true, description: "Server-generated optimistic concurrency token; required for Brand, Service, ServiceScope, and BrandService PUT bodies."} Brand: allOf: @@ -4325,6 +4635,31 @@ definitions: status: type: string enum: [accepted] + EmailAuthenticationRequest: + description: Initial email-authentication selector accepted uniformly regardless of account or verification state. + type: object + required: [email] + properties: + email: + type: string + format: email + maxLength: 320 + EmailAuthenticationCompletion: + description: Secret-bearing, single-use initial email-authentication completion request. + type: object + required: [token] + properties: + token: + type: string + minLength: 32 + maxLength: 512 + EmailAuthenticationSession: + description: Sanitized native user created by an initial email-authentication completion. + type: object + required: [user] + properties: + user: + $ref: "../../lib/swagger/defs/user.yaml#/User" AttendeeRequest: description: An array of Attendee objects properties: @@ -4446,12 +4781,180 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + Document: + description: Tenant-owned content document + type: object + properties: + ID: + type: string + AccessControlList: + type: string + x-nullable: true + Author: + type: string + x-nullable: true + ContentType: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + DocumentDate: + type: string + x-nullable: true + DocumentType: + type: string + x-nullable: true + FolderID: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + Language: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + Slug: + type: string + x-nullable: true + Source: + type: string + x-nullable: true + Status: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + URL: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + Version: + type: string + x-nullable: true + Folder: + description: Tenant-owned content folder + type: object + properties: + ID: + type: string + AccountID: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + ParentFolderID: + type: string + x-nullable: true + Status: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + DocumentParameter: + description: Tenant-owned document parameter + type: object + properties: + ID: + type: string + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + DeletedDate: + type: string + x-nullable: true + DocumentID: + type: string + x-nullable: true + IsDeleted: + type: boolean + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + Value: + type: string + x-nullable: true DocumentRequest: description: An array of Document objects properties: Data: items: - $ref: "../../lib/swagger/defs/document.yaml#/Document" + $ref: "#/definitions/Document" type: array type: object DocumentResponse: @@ -4459,7 +4962,43 @@ definitions: properties: Data: items: - $ref: "../../lib/swagger/defs/document.yaml#/Document" + $ref: "#/definitions/Document" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object + FolderRequest: + description: An array of Folder objects + properties: + Data: + items: + $ref: "#/definitions/Folder" + type: array + type: object + FolderResponse: + description: An array of Folder objects + properties: + Data: + items: + $ref: "#/definitions/Folder" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object + DocumentParameterRequest: + description: An array of DocumentParameter objects + properties: + Data: + items: + $ref: "#/definitions/DocumentParameter" + type: array + type: object + DocumentParameterResponse: + description: An array of DocumentParameter objects + properties: + Data: + items: + $ref: "#/definitions/DocumentParameter" type: array Meta: $ref: "#/definitions/ResponseMeta" @@ -4920,12 +5459,66 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + Template: + description: Tenant-owned content template + type: object + properties: + ID: + type: string + CompanyID: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + HTML: + type: string + x-nullable: true + IsActive: + type: boolean + x-nullable: true + IsMaster: + type: boolean + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + OwnerID: + type: string + x-nullable: true + RecordTypeName: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Type: + type: string + x-nullable: true + URL: + type: string + x-nullable: true TemplateRequest: description: An array of Templates properties: Data: items: - $ref: "../../lib/swagger/defs/template.yaml#/Template" + $ref: "#/definitions/Template" type: array type: object TemplateResponse: @@ -4933,7 +5526,7 @@ definitions: properties: Data: items: - $ref: "../../lib/swagger/defs/template.yaml#/Template" + $ref: "#/definitions/Template" type: array Meta: $ref: "#/definitions/ResponseMeta" diff --git a/swagger/members-vernonkeenan.yaml b/swagger/members-vernonkeenan.yaml index 438ce4f..6488f54 100644 --- a/swagger/members-vernonkeenan.yaml +++ b/swagger/members-vernonkeenan.yaml @@ -449,6 +449,20 @@ parameters: required: true schema: $ref: "#/definitions/DocumentRequest" + folderRequest: + description: An array of Folder records + in: body + name: FolderRequest + required: true + schema: + $ref: "#/definitions/FolderRequest" + documentParameterRequest: + description: An array of DocumentParameter records + in: body + name: DocumentParameterRequest + required: true + schema: + $ref: "#/definitions/DocumentParameterRequest" emailMessageIdQuery: description: Email Message ID in: query @@ -529,6 +543,10 @@ responses: description: CourseSection Response Object schema: $ref: "#/definitions/CourseSectionResponse" + Conflict: + description: The supplied LastModifiedDate is stale; reload the record before retrying. + schema: + $ref: "../../lib/swagger/defs/error.yaml#/Error" DatabaseResponse: description: Response with Database objects schema: @@ -537,6 +555,14 @@ responses: description: Document Response Object schema: $ref: "#/definitions/DocumentResponse" + FolderResponse: + description: Folder Response Object + schema: + $ref: "#/definitions/FolderResponse" + DocumentParameterResponse: + description: DocumentParameter Response Object + schema: + $ref: "#/definitions/DocumentParameterResponse" EmailMessagesResponse: description: "Array of Email Messages" schema: @@ -663,6 +689,7 @@ paths: operationId: getBrands tags: [PortalCatalog] summary: List customer-facing brands + description: Global estate-owned catalog read. Requires members:brand:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -681,6 +708,7 @@ paths: operationId: postBrands tags: [PortalCatalog] summary: Create brands + description: Global estate-owned catalog create. Requires members:brand:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -697,6 +725,7 @@ paths: operationId: putBrands tags: [PortalCatalog] summary: Update brands without deleting history + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -707,6 +736,7 @@ paths: 400: {description: Invalid lifecycle or catalog data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -715,6 +745,7 @@ paths: operationId: getServices tags: [PortalCatalog] summary: List commercial member-facing capabilities + description: Global estate-owned catalog read. Requires members:service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -731,6 +762,7 @@ paths: operationId: postServices tags: [PortalCatalog] summary: Create commercial services + description: Global estate-owned catalog create. Requires members:service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -747,6 +779,7 @@ paths: operationId: putServices tags: [PortalCatalog] summary: Update commercial services without deleting history + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:service:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -757,6 +790,7 @@ paths: 400: {description: Invalid service data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -765,6 +799,7 @@ paths: operationId: getServiceScopes tags: [PortalCatalog] summary: List controlled client scopes + description: Global estate-owned catalog read. Requires members:service-scope:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/serviceId" @@ -782,6 +817,7 @@ paths: operationId: postServiceScopes tags: [PortalCatalog] summary: Create controlled client scopes + description: Global estate-owned catalog create. Requires members:service-scope:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -798,6 +834,7 @@ paths: operationId: putServiceScopes tags: [PortalCatalog] summary: Update controlled client scopes + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:service-scope:update and a tenant-independent Administrator/Admin human role. Use retired status instead of deletion. parameters: - in: body name: request @@ -808,6 +845,7 @@ paths: 400: {description: Invalid service scope data} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -816,6 +854,7 @@ paths: operationId: getBrandServices tags: [PortalCatalog] summary: List brand catalog placements + description: Global estate-owned catalog read. Requires members:brand-service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/brandId" @@ -834,6 +873,7 @@ paths: operationId: postBrandServices tags: [PortalCatalog] summary: Create brand catalog placements + description: Global estate-owned catalog create. Requires members:brand-service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -850,6 +890,7 @@ paths: operationId: putBrandServices tags: [PortalCatalog] summary: Update brand catalog placements + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand-service:update and a tenant-independent Administrator/Admin human role. Use inactive status instead of deletion. parameters: - in: body name: request @@ -860,6 +901,7 @@ paths: 400: {description: Invalid catalog placement} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks catalog-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -868,6 +910,7 @@ paths: operationId: getPlans tags: [PortalPlans] summary: List immutable-version commercial plans + description: Global estate-owned plan read. Requires members:plan:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/status" @@ -885,6 +928,7 @@ paths: operationId: postPlans tags: [PortalPlans] summary: Create plan versions + description: Global estate-owned plan create. Requires members:plan:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -901,6 +945,7 @@ paths: operationId: putPlans tags: [PortalPlans] summary: Update draft or lifecycle state; published versions are immutable + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:plan:update and a tenant-independent Administrator/Admin human role. Draft plans may be edited; active plans may only transition unchanged to retired. parameters: - in: body name: request @@ -911,6 +956,7 @@ paths: 400: {description: Invalid or immutable plan update} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -919,6 +965,7 @@ paths: operationId: getBrandPlans tags: [PortalPlans] summary: List brand plan placements + description: Global estate-owned brand-plan read. Requires members:brand-plan:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/brandId" @@ -937,6 +984,7 @@ paths: operationId: postBrandPlans tags: [PortalPlans] summary: Create brand plan placements + description: Global estate-owned brand-plan create. Requires members:brand-plan:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -953,6 +1001,7 @@ paths: operationId: putBrandPlans tags: [PortalPlans] summary: Update brand plan placements + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:brand-plan:update and a tenant-independent Administrator/Admin human role. brandId and planId are immutable; use inactive status instead of deletion. parameters: - in: body name: request @@ -963,6 +1012,7 @@ paths: 400: {description: Invalid plan placement} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -971,6 +1021,7 @@ paths: operationId: getPlanServices tags: [PortalPlans] summary: List plan service grants and descriptive limits + description: Global estate-owned plan-service read. Requires members:plan-service:read and an active human session. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/planId" @@ -988,6 +1039,7 @@ paths: operationId: postPlanServices tags: [PortalPlans] summary: Add service grants and descriptive limits to plans + description: Draft-plan grant create. Requires members:plan-service:create and a tenant-independent Administrator/Admin human role. parameters: - in: body name: request @@ -1004,6 +1056,7 @@ paths: operationId: putPlanServices tags: [PortalPlans] summary: Update draft plan service grants + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:plan-service:update and a tenant-independent Administrator/Admin human role. planId and serviceId are immutable and the Plan must remain draft. parameters: - in: body name: request @@ -1014,6 +1067,7 @@ paths: 400: {description: Invalid typed limit or immutable plan grant} 401: {description: Missing or invalid server or session credential} 403: {description: Actor lacks plan-management authority} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1022,6 +1076,7 @@ paths: operationId: getSubscriptions tags: [PortalAccess] summary: List tenant-scoped subscriptions + description: Tenant-scoped subscription read. Requires members:subscription:read and an active human session; tenant membership remains authoritative. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/tenantId" @@ -1041,6 +1096,7 @@ paths: operationId: postSubscriptions tags: [PortalAccess] summary: Create tenant subscriptions + description: Tenant-scoped subscription create. Requires members:subscription:create, an active human session, and tenant management authority. parameters: - in: body name: request @@ -1057,6 +1113,7 @@ paths: operationId: putSubscriptions tags: [PortalAccess] summary: Update, pause, cancel, or expire subscriptions + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:subscription:update, an active human session, and tenant management authority. tenantId and planId are immutable; canceled and expired states cannot be reopened. parameters: - in: body name: request @@ -1067,6 +1124,7 @@ paths: 400: {description: Invalid subscription lifecycle transition} 401: {description: Missing or invalid server or session credential} 403: {description: Actor cannot manage the requested tenant} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1075,6 +1133,7 @@ paths: operationId: getEntitlements tags: [PortalAccess] summary: List tenant- or user-scoped explicit grants + description: Tenant- or user-scoped entitlement read. Requires members:entitlement:read and an active human session; tenant and user visibility remain authoritative. parameters: - $ref: "#/parameters/id" - $ref: "#/parameters/tenantId" @@ -1095,6 +1154,7 @@ paths: operationId: postEntitlements tags: [PortalAccess] summary: Create explicit tenant or user grants + description: Explicit entitlement create. Requires members:entitlement:create, an active human session, and tenant management authority. revokedAt and revokedById are server-owned. parameters: - in: body name: request @@ -1111,6 +1171,7 @@ paths: operationId: putEntitlements tags: [PortalAccess] summary: Update, revoke, or expire explicit grants + description: Full replacement using id and lastModifiedDate as a compare-and-swap token. Requires members:entitlement:update, an active human session, and tenant management authority. tenantId, userId, and serviceId are immutable; revoked and expired states cannot be reopened. parameters: - in: body name: request @@ -1121,6 +1182,7 @@ paths: 400: {description: Invalid or overlapping explicit grant} 401: {description: Missing or invalid server or session credential} 403: {description: Actor cannot manage grants for the tenant} + 409: {description: lastModifiedDate is stale; reload before retrying} 500: {description: Server error} security: *portalSecurity @@ -1129,6 +1191,7 @@ paths: operationId: getEffectiveEntitlements tags: [PortalAccess] summary: Resolve effective commercial access at a UTC instant + description: Derived read-only effective access resolution. Requires members:effective-entitlement:read and an active human session. This is not a raw CRUD resource. parameters: - $ref: "#/parameters/tenantId" - $ref: "#/parameters/userId" @@ -1425,6 +1488,55 @@ paths: schema: {$ref: "../../lib/swagger/defs/error.yaml#/Error"} 500: {$ref: "#/responses/ServerError"} + /credentials/email-authentication/requests: + post: + tags: [credentials] + summary: Request an initial email-authentication link without disclosing account state + operationId: requestEmailAuthentication + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/requestId" + - $ref: "#/parameters/recoveryClientIP" + - name: emailAuthenticationRequest + in: body + required: true + schema: {$ref: "#/definitions/EmailAuthenticationRequest"} + responses: + 202: + description: Uniform accepted response for every account state. + schema: {$ref: "#/definitions/PasswordRecoveryAccepted"} + 401: {$ref: "#/responses/Unauthorized"} + 500: {$ref: "#/responses/ServerError"} + + /credentials/email-authentication/completions: + post: + tags: [credentials] + summary: Consume an initial email-authentication token and create a native session + operationId: completeEmailAuthentication + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/requestId" + - name: emailAuthenticationCompletion + in: body + required: true + schema: {$ref: "#/definitions/EmailAuthenticationCompletion"} + responses: + 200: + description: Email verified and native session created. + headers: + Set-Cookie: + type: string + description: kvSession cookie for the canonical keenanvision.net domain. + schema: + $ref: "#/definitions/EmailAuthenticationSession" + 401: {$ref: "#/responses/Unauthorized"} + 422: + description: Invalid, expired, revoked, consumed, or already-completed token. + schema: {$ref: "../../lib/swagger/defs/error.yaml#/Error"} + 500: {$ref: "#/responses/ServerError"} + /sessions: post: tags: [sessions] @@ -2120,7 +2232,7 @@ paths: - Databases /documents: get: - description: Return a list of Document records from the datastore + description: Tenant- and user-scoped Document read. Requires members:document:read and an active human session. operationId: getDocuments parameters: - $ref: "#/parameters/idQuery" @@ -2141,11 +2253,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Documents tags: - Documents post: - description: Create Documents + description: Tenant- and user-scoped Document create. Requires members:document:create and an active human session. operationId: postDocuments parameters: - $ref: "#/parameters/documentRequest" @@ -2164,11 +2277,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Documents tags: - Documents put: - description: Update Document + description: Tenant- and user-scoped Document CAS update. Requires members:document:update and an active human session. operationId: putDocuments parameters: - $ref: "#/parameters/documentRequest" @@ -2183,13 +2297,170 @@ paths: $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" + "409": + $ref: "#/responses/Conflict" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Documents tags: - Documents + /folders: + get: + description: Tenant- and user-scoped Folder read. Requires members:folder:read and an active human session. + operationId: getFolders + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Get folders + tags: + - Folders + post: + description: Tenant- and user-scoped Folder create. Requires members:folder:create and an active human session. + operationId: postFolders + parameters: + - $ref: "#/parameters/folderRequest" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create folders + tags: + - Folders + put: + description: Tenant- and user-scoped Folder CAS update. Requires members:folder:update and an active human session. + operationId: putFolders + parameters: + - $ref: "#/parameters/folderRequest" + responses: + "200": + $ref: "#/responses/FolderResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update folders + tags: + - Folders + /documentparameters: + get: + description: Tenant- and user-scoped DocumentParameter read. Requires members:document-parameter:read and an active human session. + operationId: getDocumentParameters + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Get document parameters + tags: + - Document Parameters + post: + description: Tenant- and user-scoped DocumentParameter create. Requires members:document-parameter:create and an active human session. + operationId: postDocumentParameters + parameters: + - $ref: "#/parameters/documentParameterRequest" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create document parameters + tags: + - Document Parameters + put: + description: Tenant- and user-scoped DocumentParameter CAS update. Requires members:document-parameter:update and an active human session. + operationId: putDocumentParameters + parameters: + - $ref: "#/parameters/documentParameterRequest" + responses: + "200": + $ref: "#/responses/DocumentParameterResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update document parameters + tags: + - Document Parameters /emailmessages: get: security: @@ -2456,7 +2727,7 @@ paths: - Events /favorites: get: - description: Return a list of Favorite records from the datastore + description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records. operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" @@ -2478,11 +2749,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Favorites tags: - Favorites post: - description: Create Favorites + description: Tenant/user-scoped favorite create. Requires members:favorite:create plus an active native member session. IDs and audit fields are server-owned. operationId: postFavorites parameters: - $ref: "#/parameters/FavoriteRequest" @@ -2501,11 +2773,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Favorites tags: - Favorites put: - description: Update Favorite + description: Full writable-field replacement using ID and LastModifiedDate as a compare-and-swap token. Requires members:favorite:update plus an active native member session. TenantID and UserID cannot move. Delete is unavailable. operationId: putFavorites parameters: - $ref: "#/parameters/FavoriteRequest" @@ -2516,6 +2789,8 @@ paths: $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" + "409": + $ref: "#/responses/Conflict" "404": $ref: "#/responses/NotFound" "422": @@ -2524,6 +2799,7 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Favorite tags: - Favorites @@ -2889,7 +3165,7 @@ paths: - PaymentMethods /prompts: get: - description: Return a list of Prompt records from the datastore + description: Tenant/owner-scoped prompt read. Requires members:prompt:read and an active human session. operationId: getPrompts parameters: - $ref: "#/parameters/idQuery" @@ -2910,11 +3186,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of Prompts tags: - Prompts post: - description: Create Prompts + description: Tenant/owner-scoped prompt create. Requires members:prompt:create. IDs, audit, tenant, user, and usage are governed by Members. operationId: postPrompts parameters: - $ref: "#/parameters/PromptRequest" @@ -2933,11 +3210,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Prompts tags: - Prompts put: - description: Update Prompt + description: Tenant/owner-scoped full prompt replacement. Requires members:prompt:update and LastModifiedDate CAS. IDs, audit, tenant, user, and usage are governed by Members. operationId: putPrompts parameters: - $ref: "#/parameters/PromptRequest" @@ -2950,18 +3228,21 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update Prompts tags: - Prompts /promptanswers: get: - description: Return a list of PromptAnswers records from the datastore + description: Tenant/owner-scoped prompt execution-result read. Requires members:prompt-answer:read and an active human session. operationId: getPromptAnswers parameters: - $ref: "#/parameters/idQuery" @@ -2982,11 +3263,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptResponses tags: - Prompts post: - description: Create PromptAnswers + description: Append an immutable prompt execution result. Requires members:prompt-answer:create. IDs, audit, tenant, and user are governed by Members. operationId: postPromptAnswers parameters: - $ref: "#/parameters/PromptAnswerRequest" @@ -3005,35 +3287,13 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptResponses tags: - Prompts - put: - description: Update PromptAnswers - operationId: putPromptAnsweers - parameters: - - $ref: "#/parameters/PromptAnswerRequest" - responses: - "200": - $ref: "#/responses/PromptAnswerResponse" - "401": - $ref: "#/responses/Unauthorized" - "403": - $ref: "#/responses/AccessForbidden" - "404": - $ref: "#/responses/NotFound" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - security: - - ApiKeyAuth: [] - summary: Update PromptResponse - tags: - - Prompts /promptcategories: get: - description: Return a list of PromptCategory records from the datastore + description: Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-category:read. operationId: getPromptCategories parameters: - $ref: "#/parameters/idQuery" @@ -3054,11 +3314,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptCategories tags: - Prompts post: - description: Create PromptCategories + description: Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-category:create. operationId: postPromptCategories parameters: - $ref: "#/parameters/PromptCategoryRequest" @@ -3077,11 +3338,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptCategories tags: - Prompts put: - description: Update PromptCategory + description: Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-category:update and LastModifiedDate CAS. operationId: putPromptCategories parameters: - $ref: "#/parameters/PromptCategoryRequest" @@ -3094,18 +3356,21 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update PromptCategories tags: - Prompts /prompttags: get: - description: Return a list of PromptTag records from the datastore + description: Global prompt taxonomy read for active Keenan Vision members. Requires members:prompt-tag:read. operationId: getPromptTags parameters: - $ref: "#/parameters/idQuery" @@ -3126,11 +3391,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of PromptTags tags: - Prompts post: - description: Create PromptTags in Taxnexus + description: Global prompt taxonomy create for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:create. operationId: postPromptTags parameters: - $ref: "#/parameters/PromptTagRequest" @@ -3149,11 +3415,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new PromptTags tags: - Prompts put: - description: Update PromptTag in Taxnexus + description: Global prompt taxonomy update for an active Keenan Vision Owner or Manager. Requires members:prompt-tag:update and LastModifiedDate CAS. operationId: putPromptTags parameters: - $ref: "#/parameters/PromptTagRequest" @@ -3166,24 +3433,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update PromptTags tags: - Prompts /researchprojectcompanies: get: - description: Return a list of ResearchProjectCompany records from the datastore + description: Tenant-scoped ResearchProjectCompany read. Requires members:research-project-company:read and an active human session. operationId: getResearchProjectCompanies parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectCompanyResponse" @@ -3199,14 +3468,14 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectCompanies tags: - ResearchProjects post: - description: Create ResearchProjectCompanies in the system + description: Tenant-scoped ResearchProjectCompany create. Requires members:research-project-company:create and an active human session. operationId: postResearchProjectCompanies parameters: - - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -3223,14 +3492,14 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectCompanies tags: - ResearchProjects put: - description: Update ResearchProjectCompany in the system + description: Tenant-scoped ResearchProjectCompany CAS update. Requires members:research-project-company:update and an active human session. operationId: putResearchProjectCompanies parameters: - - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -3241,24 +3510,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectCompanies tags: - ResearchProjects /researchprojectdocuments: get: - description: Return a list of ResearchProjectDocument records from the datastore + description: Tenant- and user-scoped ResearchProjectDocument read. Requires members:research-project-document:read and an active human session. operationId: getResearchProjectDocuments parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3274,15 +3545,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectDocuments tags: - ResearchProjects post: - description: Create ResearchProjectDocuments in the system + description: Tenant- and user-scoped ResearchProjectDocument create. Requires members:research-project-document:create and an active human session. operationId: postResearchProjectDocuments parameters: - $ref: "#/parameters/ResearchProjectDocumentRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3298,15 +3569,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectDocuments tags: - ResearchProjects put: - description: Update ResearchProjectDocument in the system + description: Tenant- and user-scoped ResearchProjectDocument CAS update. Requires members:research-project-document:update and an active human session. operationId: putResearchProjectDocuments parameters: - $ref: "#/parameters/ResearchProjectDocumentRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectDocumentResponse" @@ -3316,24 +3587,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectDocuments tags: - ResearchProjects /researchprojectservices: get: - description: Return a list of ResearchProjectService records from the datastore + description: Tenant- and user-scoped ResearchProjectService read. Requires members:research-project-service:read and an active human session. operationId: getResearchProjectServices parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectServiceResponse" @@ -3349,46 +3622,22 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectServices tags: - ResearchProjects post: - description: Create ResearchProjectServices in the system + description: Tenant- and user-scoped ResearchProjectService create. Requires members:research-project-service:create and an active human session. operationId: postResearchProjectServices parameters: - $ref: "#/parameters/ResearchProjectServiceRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectServiceResponse" - "201": - $ref: "#/responses/ResearchProjectServiceResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" - "422": - $ref: "#/responses/UnprocessableEntity" - "500": - $ref: "#/responses/ServerError" - security: - - ApiKeyAuth: [] - summary: Create new ResearchProjectServices - tags: - - ResearchProjects - put: - description: Update ResearchProjectService in the system - operationId: putResearchProjectServices - parameters: - - $ref: "#/parameters/ResearchProjectServiceRequest" - - $ref: "#/parameters/Auth0UserIdHeader" - responses: - "200": - $ref: "#/responses/ResearchProjectServiceResponse" - "201": - $ref: "#/responses/ResearchProjectServiceResponse" - "401": - $ref: "#/responses/Unauthorized" "404": $ref: "#/responses/NotFound" "422": @@ -3397,19 +3646,45 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Create new ResearchProjectServices + tags: + - ResearchProjects + put: + description: Tenant- and user-scoped ResearchProjectService CAS update. Requires members:research-project-service:update and an active human session. + operationId: putResearchProjectServices + parameters: + - $ref: "#/parameters/ResearchProjectServiceRequest" + responses: + "200": + $ref: "#/responses/ResearchProjectServiceResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectServices tags: - ResearchProjects /researchprojectproducts: get: - description: Return a list of ResearchProjectProduct records from the datastore + description: Tenant- and user-scoped ResearchProjectProduct read. Requires members:research-project-product:read and an active human session. operationId: getResearchProjectProducts parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3425,15 +3700,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectProducts tags: - ResearchProjects post: - description: Create ResearchProjectProducts in the system + description: Tenant- and user-scoped ResearchProjectProduct create. Requires members:research-project-product:create and an active human session. operationId: postResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3449,15 +3724,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectProducts tags: - ResearchProjects put: - description: Update ResearchProjectProduct in the system + description: Tenant- and user-scoped ResearchProjectProduct CAS update. Requires members:research-project-product:update and an active human session. operationId: putResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -3467,24 +3742,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectProducts tags: - ResearchProjects /researchprojects: get: - description: Return a list of ResearchProject records from the datastore + description: Tenant- and user-scoped ResearchProject read. Requires members:research-project:read and an active human session. operationId: getResearchProjects parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3500,15 +3777,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjects tags: - ResearchProjects post: - description: Create ResearchProjects in the system + description: Tenant- and user-scoped ResearchProject create. Requires members:research-project:create and an active human session. operationId: postResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3524,15 +3801,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjects tags: - ResearchProjects put: - description: Update ResearchProject in the system + description: Tenant- and user-scoped ResearchProject CAS update. Requires members:research-project:update and an active human session. operationId: putResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -3542,24 +3819,26 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjects tags: - ResearchProjects /researchprojecttopics: get: - description: Return a list of ResearchProjectTopic records from the datastore + description: Tenant- and user-scoped ResearchProjectTopic read. Requires members:research-project-topic:read and an active human session. operationId: getResearchProjectTopics parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3575,15 +3854,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list of ResearchProjectTopics tags: - ResearchProjects post: - description: Create ResearchProjectTopics in the system + description: Tenant- and user-scoped ResearchProjectTopic create. Requires members:research-project-topic:create and an active human session. operationId: postResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3599,15 +3878,15 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new ResearchProjectTopics tags: - ResearchProjects put: - description: Update ResearchProjectTopic in the system + description: Tenant- and user-scoped ResearchProjectTopic CAS update. Requires members:research-project-topic:update and an active human session. operationId: putResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" - - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -3617,12 +3896,15 @@ paths: $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Update ResearchProjectTopics tags: - ResearchProjects @@ -3701,7 +3983,7 @@ paths: - Tenants /templates: get: - description: Return a list of Templates from the datastore + description: Tenant- and user-scoped Template read. Requires members:template:read and an active human session. operationId: getTemplates parameters: - $ref: "#/parameters/limitQuery" @@ -3725,11 +4007,12 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Get a list Templates tags: - Templates post: - description: Create new Templates + description: Tenant- and user-scoped Template create. Requires members:template:create and an active human session. operationId: postTemplates parameters: - $ref: "#/parameters/TemplateRequest" @@ -3748,9 +4031,36 @@ paths: $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] + kvSessionCookie: [] summary: Create new Templates tags: - Templates + put: + description: Tenant- and user-scoped Template CAS update. Requires members:template:update and an active human session. + operationId: putTemplates + parameters: + - $ref: "#/parameters/TemplateRequest" + responses: + "200": + $ref: "#/responses/TemplateResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + kvSessionCookie: [] + summary: Update Templates + tags: + - Templates /tickets: get: description: Return a list of Ticket records from the datastore @@ -4004,7 +4314,7 @@ definitions: createdById: {type: string, format: uuid, x-nullable: true, readOnly: true} createdDate: {type: string, format: date-time, x-nullable: true, readOnly: true} lastModifiedById: {type: string, format: uuid, x-nullable: true, readOnly: true} - lastModifiedDate: {type: string, format: date-time, x-nullable: true, readOnly: true} + lastModifiedDate: {type: string, format: date-time, x-nullable: true, description: "Server-generated optimistic concurrency token; required for Brand, Service, ServiceScope, and BrandService PUT bodies."} Brand: allOf: @@ -4325,6 +4635,31 @@ definitions: status: type: string enum: [accepted] + EmailAuthenticationRequest: + description: Initial email-authentication selector accepted uniformly regardless of account or verification state. + type: object + required: [email] + properties: + email: + type: string + format: email + maxLength: 320 + EmailAuthenticationCompletion: + description: Secret-bearing, single-use initial email-authentication completion request. + type: object + required: [token] + properties: + token: + type: string + minLength: 32 + maxLength: 512 + EmailAuthenticationSession: + description: Sanitized native user created by an initial email-authentication completion. + type: object + required: [user] + properties: + user: + $ref: "../../lib/swagger/defs/user.yaml#/User" AttendeeRequest: description: An array of Attendee objects properties: @@ -4446,12 +4781,180 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + Document: + description: Tenant-owned content document + type: object + properties: + ID: + type: string + AccessControlList: + type: string + x-nullable: true + Author: + type: string + x-nullable: true + ContentType: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + DocumentDate: + type: string + x-nullable: true + DocumentType: + type: string + x-nullable: true + FolderID: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + Language: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + Slug: + type: string + x-nullable: true + Source: + type: string + x-nullable: true + Status: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + URL: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + Version: + type: string + x-nullable: true + Folder: + description: Tenant-owned content folder + type: object + properties: + ID: + type: string + AccountID: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + ParentFolderID: + type: string + x-nullable: true + Status: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + DocumentParameter: + description: Tenant-owned document parameter + type: object + properties: + ID: + type: string + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + DeletedDate: + type: string + x-nullable: true + DocumentID: + type: string + x-nullable: true + IsDeleted: + type: boolean + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + Value: + type: string + x-nullable: true DocumentRequest: description: An array of Document objects properties: Data: items: - $ref: "../../lib/swagger/defs/document.yaml#/Document" + $ref: "#/definitions/Document" type: array type: object DocumentResponse: @@ -4459,7 +4962,43 @@ definitions: properties: Data: items: - $ref: "../../lib/swagger/defs/document.yaml#/Document" + $ref: "#/definitions/Document" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object + FolderRequest: + description: An array of Folder objects + properties: + Data: + items: + $ref: "#/definitions/Folder" + type: array + type: object + FolderResponse: + description: An array of Folder objects + properties: + Data: + items: + $ref: "#/definitions/Folder" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object + DocumentParameterRequest: + description: An array of DocumentParameter objects + properties: + Data: + items: + $ref: "#/definitions/DocumentParameter" + type: array + type: object + DocumentParameterResponse: + description: An array of DocumentParameter objects + properties: + Data: + items: + $ref: "#/definitions/DocumentParameter" type: array Meta: $ref: "#/definitions/ResponseMeta" @@ -4920,12 +5459,66 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + Template: + description: Tenant-owned content template + type: object + properties: + ID: + type: string + CompanyID: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + HTML: + type: string + x-nullable: true + IsActive: + type: boolean + x-nullable: true + IsMaster: + type: boolean + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Name: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + OwnerID: + type: string + x-nullable: true + RecordTypeName: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Type: + type: string + x-nullable: true + URL: + type: string + x-nullable: true TemplateRequest: description: An array of Templates properties: Data: items: - $ref: "../../lib/swagger/defs/template.yaml#/Template" + $ref: "#/definitions/Template" type: array type: object TemplateResponse: @@ -4933,7 +5526,7 @@ definitions: properties: Data: items: - $ref: "../../lib/swagger/defs/template.yaml#/Template" + $ref: "#/definitions/Template" type: array Meta: $ref: "#/definitions/ResponseMeta"