@meshery/schemas 1.3.97 → 1.3.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cloudApi.d.mts +222 -185
  2. package/dist/cloudApi.d.ts +222 -185
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.d.ts +151 -0
  6. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.js +1 -0
  7. package/dist/constructs/v1beta3/content_metrics/ContentMetrics.mjs +0 -0
  8. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.d.ts +2 -0
  9. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.js +16 -0
  10. package/dist/constructs/v1beta3/content_metrics/ContentMetricsSchema.mjs +16 -0
  11. package/dist/constructs/v1beta3/design/Design.d.ts +10 -0
  12. package/dist/constructs/v1beta3/design/DesignSchema.js +2 -2
  13. package/dist/constructs/v1beta3/design/DesignSchema.mjs +2 -2
  14. package/dist/constructs/v1beta3/event/Event.d.ts +63 -1
  15. package/dist/constructs/v1beta3/event/EventSchema.js +8 -4
  16. package/dist/constructs/v1beta3/event/EventSchema.mjs +8 -4
  17. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.d.ts +94 -0
  18. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.js +1 -0
  19. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographics.mjs +0 -0
  20. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.d.ts +2 -0
  21. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.js +25 -0
  22. package/dist/constructs/v1beta3/follower_demographics/FollowerDemographicsSchema.mjs +25 -0
  23. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.d.ts +90 -0
  24. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.js +1 -0
  25. package/dist/constructs/v1beta3/follower_metrics/FollowerMetrics.mjs +0 -0
  26. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.d.ts +2 -0
  27. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.js +16 -0
  28. package/dist/constructs/v1beta3/follower_metrics/FollowerMetricsSchema.mjs +16 -0
  29. package/dist/constructs/v1beta3/ledger/Ledger.d.ts +157 -11
  30. package/dist/constructs/v1beta3/ledger/LedgerSchema.js +19 -27
  31. package/dist/constructs/v1beta3/ledger/LedgerSchema.mjs +19 -27
  32. package/dist/constructs/v1beta3/token/Token.d.ts +17 -77
  33. package/dist/constructs/v1beta3/token/TokenSchema.js +3 -3
  34. package/dist/constructs/v1beta3/token/TokenSchema.mjs +3 -3
  35. package/dist/mesheryApi.d.mts +4 -0
  36. package/dist/mesheryApi.d.ts +4 -0
  37. package/package.json +1 -1
@@ -0,0 +1,94 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export type paths = Record<string, never>;
7
+ export type webhooks = Record<string, never>;
8
+ export interface components {
9
+ schemas: {
10
+ /**
11
+ * Follower Demographics Schema
12
+ * @description Server-returned follower-breakdown snapshot row for one page, as
13
+ * recorded in the `metadata` of an event on the events service (category
14
+ * `blowhorn`, action `follower_demographics`); the event construct carries
15
+ * the envelope and this construct names the metadata's own shape, which
16
+ * Event leaves open. One row is one category of one breakdown of one page
17
+ * on one day, keyed by (organizationId, platform, subject, readingDate,
18
+ * dimension, category): the page's follower total on that snapshot day
19
+ * falls into exactly one category of each dimension, so a dimension's
20
+ * categories sum to the page's total. `followers` is a cumulative count
21
+ * on the day, not a daily change, and is nullable: a blank figure in the
22
+ * source export is not a zero.
23
+ */
24
+ FollowerDemographics: {
25
+ /**
26
+ * Format: uuid
27
+ * @description Owning organization ID.
28
+ */
29
+ organizationId: string;
30
+ /** @description The platform the page belongs to (today only `linkedin` produces these exports). */
31
+ platform: string;
32
+ /** @description The page the figures describe, named as the source export names it. */
33
+ subject: string;
34
+ /**
35
+ * Format: date
36
+ * @description The day the snapshot describes, as an ISO calendar date.
37
+ */
38
+ readingDate: string;
39
+ /**
40
+ * @description The breakdown the category belongs to; one value per breakdown sheet the source export carries.
41
+ * @enum {string}
42
+ */
43
+ dimension: "location" | "job_function" | "seniority" | "industry" | "company_size";
44
+ /** @description The breakdown row's label, verbatim from the source export (e.g. a location or an industry name). */
45
+ category: string;
46
+ /** @description The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank. */
47
+ followers?: number | null;
48
+ /** @description The export file the row was read from; empty when the row did not come from a file export. */
49
+ sourceFile?: string;
50
+ };
51
+ /**
52
+ * @description Payload for recording one follower-breakdown snapshot row for a
53
+ * page, sent as the `metadata` of a create-event call. Contains
54
+ * only client-settable fields; the row has no server-generated
55
+ * fields, because the events service stores and returns event
56
+ * metadata verbatim, so the payload and the recorded row
57
+ * (FollowerDemographics) share one field set.
58
+ */
59
+ FollowerDemographicsPayload: {
60
+ /**
61
+ * Format: uuid
62
+ * @description Owning organization ID.
63
+ */
64
+ organizationId: string;
65
+ /** @description The platform the page belongs to (today only `linkedin` produces these exports). */
66
+ platform: string;
67
+ /** @description The page the figures describe, named as the source export names it. */
68
+ subject: string;
69
+ /**
70
+ * Format: date
71
+ * @description The day the snapshot describes, as an ISO calendar date.
72
+ */
73
+ readingDate: string;
74
+ /**
75
+ * @description The breakdown the category belongs to; one value per breakdown sheet the source export carries.
76
+ * @enum {string}
77
+ */
78
+ dimension: "location" | "job_function" | "seniority" | "industry" | "company_size";
79
+ /** @description The breakdown row's label, verbatim from the source export (e.g. a location or an industry name). */
80
+ category: string;
81
+ /** @description The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank. */
82
+ followers?: number | null;
83
+ /** @description The export file the row was read from; empty when the row did not come from a file export. */
84
+ sourceFile?: string;
85
+ };
86
+ };
87
+ responses: never;
88
+ parameters: never;
89
+ requestBodies: never;
90
+ headers: never;
91
+ pathItems: never;
92
+ }
93
+ export type $defs = Record<string, never>;
94
+ export type operations = Record<string, never>;
@@ -0,0 +1,2 @@
1
+ declare const FollowerDemographicsSchema: Record<string, unknown>;
2
+ export default FollowerDemographicsSchema;
@@ -0,0 +1,25 @@
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"Follower Demographics",description:`OpenAPI schema for follower-breakdown snapshot rows for a page,
2
+ consumed by Blowhorn's analytics store. The rows have no endpoints
3
+ of their own: they are recorded and read back as the \`metadata\` of
4
+ events on the events service (category \`blowhorn\`, action
5
+ \`follower_demographics\`; see the event construct), so this file
6
+ declares the components only and the paths stay with the event
7
+ construct.
8
+ `,version:"v1beta3",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},paths:{},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},schemas:{FollowerDemographics:{$schema:"http://json-schema.org/draft-07/schema#",title:"Follower Demographics Schema",description:`Server-returned follower-breakdown snapshot row for one page, as
9
+ recorded in the \`metadata\` of an event on the events service (category
10
+ \`blowhorn\`, action \`follower_demographics\`); the event construct carries
11
+ the envelope and this construct names the metadata's own shape, which
12
+ Event leaves open. One row is one category of one breakdown of one page
13
+ on one day, keyed by (organizationId, platform, subject, readingDate,
14
+ dimension, category): the page's follower total on that snapshot day
15
+ falls into exactly one category of each dimension, so a dimension's
16
+ categories sum to the page's total. \`followers\` is a cumulative count
17
+ on the day, not a daily change, and is nullable: a blank figure in the
18
+ source export is not a zero.
19
+ `,type:"object",additionalProperties:false,required:["organizationId","platform","subject","readingDate","dimension","category"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":1},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports).","x-oapi-codegen-extra-tags":{db:"platform"},"x-order":2},subject:{type:"string",description:"The page the figures describe, named as the source export names it.","x-oapi-codegen-extra-tags":{db:"subject"},"x-order":3},readingDate:{type:"string",format:"date",description:"The day the snapshot describes, as an ISO calendar date.","x-oapi-codegen-extra-tags":{db:"reading_date"},"x-order":4},dimension:{type:"string",enum:["location","job_function","seniority","industry","company_size"],description:"The breakdown the category belongs to; one value per breakdown sheet the source export carries.","x-oapi-codegen-extra-tags":{db:"dimension"},"x-order":5},category:{type:"string",description:"The breakdown row's label, verbatim from the source export (e.g. a location or an industry name).","x-oapi-codegen-extra-tags":{db:"category"},"x-order":6},followers:{type:"integer",nullable:true,minimum:0,description:"The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"followers"},"x-order":7},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export.","x-oapi-codegen-extra-tags":{db:"source_file"},"x-order":8}}},FollowerDemographicsPayload:{type:"object",description:`Payload for recording one follower-breakdown snapshot row for a
20
+ page, sent as the \`metadata\` of a create-event call. Contains
21
+ only client-settable fields; the row has no server-generated
22
+ fields, because the events service stores and returns event
23
+ metadata verbatim, so the payload and the recorded row
24
+ (FollowerDemographics) share one field set.
25
+ `,additionalProperties:false,required:["organizationId","platform","subject","readingDate","dimension","category"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports)."},subject:{type:"string",description:"The page the figures describe, named as the source export names it."},readingDate:{type:"string",format:"date",description:"The day the snapshot describes, as an ISO calendar date."},dimension:{type:"string",enum:["location","job_function","seniority","industry","company_size"],description:"The breakdown the category belongs to; one value per breakdown sheet the source export carries."},category:{type:"string",description:"The breakdown row's label, verbatim from the source export (e.g. a location or an industry name)."},followers:{type:"integer",nullable:true,minimum:0,description:"The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank."},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export."}}}}}},o=e;module.exports=o;
@@ -0,0 +1,25 @@
1
+ var e={openapi:"3.0.0",info:{title:"Follower Demographics",description:`OpenAPI schema for follower-breakdown snapshot rows for a page,
2
+ consumed by Blowhorn's analytics store. The rows have no endpoints
3
+ of their own: they are recorded and read back as the \`metadata\` of
4
+ events on the events service (category \`blowhorn\`, action
5
+ \`follower_demographics\`; see the event construct), so this file
6
+ declares the components only and the paths stay with the event
7
+ construct.
8
+ `,version:"v1beta3",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},paths:{},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},schemas:{FollowerDemographics:{$schema:"http://json-schema.org/draft-07/schema#",title:"Follower Demographics Schema",description:`Server-returned follower-breakdown snapshot row for one page, as
9
+ recorded in the \`metadata\` of an event on the events service (category
10
+ \`blowhorn\`, action \`follower_demographics\`); the event construct carries
11
+ the envelope and this construct names the metadata's own shape, which
12
+ Event leaves open. One row is one category of one breakdown of one page
13
+ on one day, keyed by (organizationId, platform, subject, readingDate,
14
+ dimension, category): the page's follower total on that snapshot day
15
+ falls into exactly one category of each dimension, so a dimension's
16
+ categories sum to the page's total. \`followers\` is a cumulative count
17
+ on the day, not a daily change, and is nullable: a blank figure in the
18
+ source export is not a zero.
19
+ `,type:"object",additionalProperties:false,required:["organizationId","platform","subject","readingDate","dimension","category"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":1},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports).","x-oapi-codegen-extra-tags":{db:"platform"},"x-order":2},subject:{type:"string",description:"The page the figures describe, named as the source export names it.","x-oapi-codegen-extra-tags":{db:"subject"},"x-order":3},readingDate:{type:"string",format:"date",description:"The day the snapshot describes, as an ISO calendar date.","x-oapi-codegen-extra-tags":{db:"reading_date"},"x-order":4},dimension:{type:"string",enum:["location","job_function","seniority","industry","company_size"],description:"The breakdown the category belongs to; one value per breakdown sheet the source export carries.","x-oapi-codegen-extra-tags":{db:"dimension"},"x-order":5},category:{type:"string",description:"The breakdown row's label, verbatim from the source export (e.g. a location or an industry name).","x-oapi-codegen-extra-tags":{db:"category"},"x-order":6},followers:{type:"integer",nullable:true,minimum:0,description:"The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"followers"},"x-order":7},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export.","x-oapi-codegen-extra-tags":{db:"source_file"},"x-order":8}}},FollowerDemographicsPayload:{type:"object",description:`Payload for recording one follower-breakdown snapshot row for a
20
+ page, sent as the \`metadata\` of a create-event call. Contains
21
+ only client-settable fields; the row has no server-generated
22
+ fields, because the events service stores and returns event
23
+ metadata verbatim, so the payload and the recorded row
24
+ (FollowerDemographics) share one field set.
25
+ `,additionalProperties:false,required:["organizationId","platform","subject","readingDate","dimension","category"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports)."},subject:{type:"string",description:"The page the figures describe, named as the source export names it."},readingDate:{type:"string",format:"date",description:"The day the snapshot describes, as an ISO calendar date."},dimension:{type:"string",enum:["location","job_function","seniority","industry","company_size"],description:"The breakdown the category belongs to; one value per breakdown sheet the source export carries."},category:{type:"string",description:"The breakdown row's label, verbatim from the source export (e.g. a location or an industry name)."},followers:{type:"integer",nullable:true,minimum:0,description:"The page's cumulative followers in this category on the snapshot day; null when the export's cell is blank."},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export."}}}}}},o=e;export{o as default};
@@ -0,0 +1,90 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export type paths = Record<string, never>;
7
+ export type webhooks = Record<string, never>;
8
+ export interface components {
9
+ schemas: {
10
+ /**
11
+ * Follower Metrics Schema
12
+ * @description Server-returned daily new-follower figures for one page, as recorded in
13
+ * the `metadata` of an event on the events service (category `blowhorn`,
14
+ * action `follower_metrics`); the event construct carries the envelope and
15
+ * this construct names the metadata's own shape, which Event leaves open.
16
+ * One row is one page on one day, keyed by (organizationId, platform,
17
+ * subject, readingDate): the day's NEW followers split by the source that
18
+ * produced them. The source export's "Total followers" column is a day's
19
+ * total of new followers, not a lifetime count. Every figure is nullable:
20
+ * a blank figure in the source export is not a zero.
21
+ */
22
+ FollowerMetrics: {
23
+ /**
24
+ * Format: uuid
25
+ * @description Owning organization ID.
26
+ */
27
+ organizationId: string;
28
+ /** @description The platform the page belongs to (today only `linkedin` produces these exports). */
29
+ platform: string;
30
+ /** @description The page the figures describe, named as the source export names it. */
31
+ subject: string;
32
+ /**
33
+ * Format: date
34
+ * @description The day the figures describe, as an ISO calendar date.
35
+ */
36
+ readingDate: string;
37
+ /** @description New followers that day from sponsored content; null when the export's cell is blank. */
38
+ newSponsored?: number | null;
39
+ /** @description New followers that day from organic content; null when the export's cell is blank. */
40
+ newOrganic?: number | null;
41
+ /** @description New followers that day from auto-invites; null when the export's cell is blank. */
42
+ newAutoInvited?: number | null;
43
+ /** @description All new followers that day; null when the export's cell is blank. */
44
+ newTotal?: number | null;
45
+ /** @description The export file the row was read from; empty when the row did not come from a file export. */
46
+ sourceFile?: string;
47
+ };
48
+ /**
49
+ * @description Payload for recording one day's new-follower figures for a page,
50
+ * sent as the `metadata` of a create-event call. Contains only
51
+ * client-settable fields; the row has no server-generated fields,
52
+ * because the events service stores and returns event metadata
53
+ * verbatim, so the payload and the recorded row (FollowerMetrics)
54
+ * share one field set.
55
+ */
56
+ FollowerMetricsPayload: {
57
+ /**
58
+ * Format: uuid
59
+ * @description Owning organization ID.
60
+ */
61
+ organizationId: string;
62
+ /** @description The platform the page belongs to (today only `linkedin` produces these exports). */
63
+ platform: string;
64
+ /** @description The page the figures describe, named as the source export names it. */
65
+ subject: string;
66
+ /**
67
+ * Format: date
68
+ * @description The day the figures describe, as an ISO calendar date.
69
+ */
70
+ readingDate: string;
71
+ /** @description New followers that day from sponsored content; null when the export's cell is blank. */
72
+ newSponsored?: number | null;
73
+ /** @description New followers that day from organic content; null when the export's cell is blank. */
74
+ newOrganic?: number | null;
75
+ /** @description New followers that day from auto-invites; null when the export's cell is blank. */
76
+ newAutoInvited?: number | null;
77
+ /** @description All new followers that day; null when the export's cell is blank. */
78
+ newTotal?: number | null;
79
+ /** @description The export file the row was read from; empty when the row did not come from a file export. */
80
+ sourceFile?: string;
81
+ };
82
+ };
83
+ responses: never;
84
+ parameters: never;
85
+ requestBodies: never;
86
+ headers: never;
87
+ pathItems: never;
88
+ }
89
+ export type $defs = Record<string, never>;
90
+ export type operations = Record<string, never>;
@@ -0,0 +1,2 @@
1
+ declare const FollowerMetricsSchema: Record<string, unknown>;
2
+ export default FollowerMetricsSchema;
@@ -0,0 +1,16 @@
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"Follower Metrics",description:"OpenAPI schema for daily new-follower figures for a page, consumed by\nBlowhorn's analytics store. The rows have no endpoints of their own:\nthey are recorded and read back as the `metadata` of events on the\nevents service (category `blowhorn`, action `follower_metrics`; see\nthe event construct), so this file declares the components only and\nthe paths stay with the event construct.\n",version:"v1beta3",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},paths:{},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},schemas:{FollowerMetrics:{$schema:"http://json-schema.org/draft-07/schema#",title:"Follower Metrics Schema",description:`Server-returned daily new-follower figures for one page, as recorded in
2
+ the \`metadata\` of an event on the events service (category \`blowhorn\`,
3
+ action \`follower_metrics\`); the event construct carries the envelope and
4
+ this construct names the metadata's own shape, which Event leaves open.
5
+ One row is one page on one day, keyed by (organizationId, platform,
6
+ subject, readingDate): the day's NEW followers split by the source that
7
+ produced them. The source export's "Total followers" column is a day's
8
+ total of new followers, not a lifetime count. Every figure is nullable:
9
+ a blank figure in the source export is not a zero.
10
+ `,type:"object",additionalProperties:false,required:["organizationId","platform","subject","readingDate"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":1},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports).","x-oapi-codegen-extra-tags":{db:"platform"},"x-order":2},subject:{type:"string",description:"The page the figures describe, named as the source export names it.","x-oapi-codegen-extra-tags":{db:"subject"},"x-order":3},readingDate:{type:"string",format:"date",description:"The day the figures describe, as an ISO calendar date.","x-oapi-codegen-extra-tags":{db:"reading_date"},"x-order":4},newSponsored:{type:"integer",nullable:true,minimum:0,description:"New followers that day from sponsored content; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_sponsored"},"x-order":5},newOrganic:{type:"integer",nullable:true,minimum:0,description:"New followers that day from organic content; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_organic"},"x-order":6},newAutoInvited:{type:"integer",nullable:true,minimum:0,description:"New followers that day from auto-invites; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_auto_invited"},"x-order":7},newTotal:{type:"integer",nullable:true,minimum:0,description:"All new followers that day; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_total"},"x-order":8},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export.","x-oapi-codegen-extra-tags":{db:"source_file"},"x-order":9}}},FollowerMetricsPayload:{type:"object",description:`Payload for recording one day's new-follower figures for a page,
11
+ sent as the \`metadata\` of a create-event call. Contains only
12
+ client-settable fields; the row has no server-generated fields,
13
+ because the events service stores and returns event metadata
14
+ verbatim, so the payload and the recorded row (FollowerMetrics)
15
+ share one field set.
16
+ `,additionalProperties:false,required:["organizationId","platform","subject","readingDate"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports)."},subject:{type:"string",description:"The page the figures describe, named as the source export names it."},readingDate:{type:"string",format:"date",description:"The day the figures describe, as an ISO calendar date."},newSponsored:{type:"integer",nullable:true,minimum:0,description:"New followers that day from sponsored content; null when the export's cell is blank."},newOrganic:{type:"integer",nullable:true,minimum:0,description:"New followers that day from organic content; null when the export's cell is blank."},newAutoInvited:{type:"integer",nullable:true,minimum:0,description:"New followers that day from auto-invites; null when the export's cell is blank."},newTotal:{type:"integer",nullable:true,minimum:0,description:"All new followers that day; null when the export's cell is blank."},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export."}}}}}},t=e;module.exports=t;
@@ -0,0 +1,16 @@
1
+ var e={openapi:"3.0.0",info:{title:"Follower Metrics",description:"OpenAPI schema for daily new-follower figures for a page, consumed by\nBlowhorn's analytics store. The rows have no endpoints of their own:\nthey are recorded and read back as the `metadata` of events on the\nevents service (category `blowhorn`, action `follower_metrics`; see\nthe event construct), so this file declares the components only and\nthe paths stay with the event construct.\n",version:"v1beta3",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"}},paths:{},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},schemas:{FollowerMetrics:{$schema:"http://json-schema.org/draft-07/schema#",title:"Follower Metrics Schema",description:`Server-returned daily new-follower figures for one page, as recorded in
2
+ the \`metadata\` of an event on the events service (category \`blowhorn\`,
3
+ action \`follower_metrics\`); the event construct carries the envelope and
4
+ this construct names the metadata's own shape, which Event leaves open.
5
+ One row is one page on one day, keyed by (organizationId, platform,
6
+ subject, readingDate): the day's NEW followers split by the source that
7
+ produced them. The source export's "Total followers" column is a day's
8
+ total of new followers, not a lifetime count. Every figure is nullable:
9
+ a blank figure in the source export is not a zero.
10
+ `,type:"object",additionalProperties:false,required:["organizationId","platform","subject","readingDate"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":1},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports).","x-oapi-codegen-extra-tags":{db:"platform"},"x-order":2},subject:{type:"string",description:"The page the figures describe, named as the source export names it.","x-oapi-codegen-extra-tags":{db:"subject"},"x-order":3},readingDate:{type:"string",format:"date",description:"The day the figures describe, as an ISO calendar date.","x-oapi-codegen-extra-tags":{db:"reading_date"},"x-order":4},newSponsored:{type:"integer",nullable:true,minimum:0,description:"New followers that day from sponsored content; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_sponsored"},"x-order":5},newOrganic:{type:"integer",nullable:true,minimum:0,description:"New followers that day from organic content; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_organic"},"x-order":6},newAutoInvited:{type:"integer",nullable:true,minimum:0,description:"New followers that day from auto-invites; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_auto_invited"},"x-order":7},newTotal:{type:"integer",nullable:true,minimum:0,description:"All new followers that day; null when the export's cell is blank.","x-oapi-codegen-extra-tags":{db:"new_total"},"x-order":8},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export.","x-oapi-codegen-extra-tags":{db:"source_file"},"x-order":9}}},FollowerMetricsPayload:{type:"object",description:`Payload for recording one day's new-follower figures for a page,
11
+ sent as the \`metadata\` of a create-event call. Contains only
12
+ client-settable fields; the row has no server-generated fields,
13
+ because the events service stores and returns event metadata
14
+ verbatim, so the payload and the recorded row (FollowerMetrics)
15
+ share one field set.
16
+ `,additionalProperties:false,required:["organizationId","platform","subject","readingDate"],properties:{organizationId:{type:"string",format:"uuid",description:"Owning organization ID.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},platform:{type:"string",description:"The platform the page belongs to (today only `linkedin` produces these exports)."},subject:{type:"string",description:"The page the figures describe, named as the source export names it."},readingDate:{type:"string",format:"date",description:"The day the figures describe, as an ISO calendar date."},newSponsored:{type:"integer",nullable:true,minimum:0,description:"New followers that day from sponsored content; null when the export's cell is blank."},newOrganic:{type:"integer",nullable:true,minimum:0,description:"New followers that day from organic content; null when the export's cell is blank."},newAutoInvited:{type:"integer",nullable:true,minimum:0,description:"New followers that day from auto-invites; null when the export's cell is blank."},newTotal:{type:"integer",nullable:true,minimum:0,description:"All new followers that day; null when the export's cell is blank."},sourceFile:{type:"string",description:"The export file the row was read from; empty when the row did not come from a file export."}}}}}},t=e;export{t as default};
@@ -19,7 +19,7 @@ export interface paths {
19
19
  put?: never;
20
20
  /**
21
21
  * Record a ledger entry
22
- * @description Records `entryKey` in the ledger. A new key creates the entry and returns `201`. An existing key never creates a second entry and is not changed: the stored entry is returned unchanged with `200`, and the supplied `value` is ignored. Recording never changes `claimedByConnectionId` or `claimedAt`.
22
+ * @description Records `entryKey` in the ledger. A new key creates the entry and returns `201`. Recording never changes an existing entry: the stored entry is returned unchanged with `200`, and the supplied `value` is ignored. Change a stored value with updateLedgerEntry. Recording never changes `claimedByConnectionId` or `claimedAt`.
23
23
  */
24
24
  post: operations["recordLedgerEntry"];
25
25
  delete?: never;
@@ -60,7 +60,11 @@ export interface paths {
60
60
  * @description Returns the entry recorded under `entryKey` in the ledger, or `404` when the key is not in this ledger.
61
61
  */
62
62
  get: operations["getLedgerEntry"];
63
- put?: never;
63
+ /**
64
+ * Update a ledger entry
65
+ * @description Replaces the stored `value` wholesale (not a merge) and advances `updatedAt` (strictly increasing, so it works as a version token). Never changes `entryKey`, `claimedByConnectionId`, `claimedAt`, `createdAt` or `id`. Does not create entries: a key that is not in the ledger is `404` (use POST entries or claims to create). Does not check who holds a claim (same as delete). Any member of the session organization may update. `expectedValue`, when present, applies the update only if the stored value equals it (JSON equality; key order and whitespace do not matter). `expectedUpdatedAt`, when present, applies the update only if the stored entry's `updatedAt` equals it exactly; clients echo the `updatedAt` they last read. Both preconditions may be sent; then both must hold. With neither, the update is unconditional. A precondition that does not match returns `412` and changes nothing. A bad ledger name, key, or body (for example a missing `value` or a non-object value) is `400`.
66
+ */
67
+ put: operations["updateLedgerEntry"];
64
68
  post?: never;
65
69
  /**
66
70
  * Delete a ledger entry
@@ -78,7 +82,7 @@ export interface components {
78
82
  schemas: {
79
83
  /**
80
84
  * Ledger Entry Schema
81
- * @description Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and returns the stored entry unchanged, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Any organization member may read and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization.
85
+ * @description Server-returned ledger entry. An organization keeps any number of named ledgers, each an idempotent set keyed by entryKey: recording an existing key never creates a second entry and never changes that entry, and claim-if-absent gives a key to exactly one claiming connection, so two workers never both act on it. Change a stored value with updateLedgerEntry, which replaces the value wholesale and advances updatedAt. Any organization member may read, update and delete entries; a claim names the connection that holds it, which must be the caller's own live connection in the organization. An update does not check who holds a claim.
82
86
  */
83
87
  LedgerEntry: {
84
88
  /**
@@ -114,7 +118,7 @@ export interface components {
114
118
  createdAt: string;
115
119
  /**
116
120
  * Format: date-time
117
- * @description Timestamp of last ledger entry modification.
121
+ * @description Timestamp of last ledger entry modification; advances on every update.
118
122
  */
119
123
  updatedAt: string;
120
124
  };
@@ -161,7 +165,7 @@ export interface components {
161
165
  createdAt: string;
162
166
  /**
163
167
  * Format: date-time
164
- * @description Timestamp of last ledger entry modification.
168
+ * @description Timestamp of last ledger entry modification; advances on every update.
165
169
  */
166
170
  updatedAt: string;
167
171
  }[];
@@ -173,6 +177,18 @@ export interface components {
173
177
  /** @description Entry value, stored as a JSON object. */
174
178
  value?: Record<string, never>;
175
179
  };
180
+ /** @description Payload for replacing a ledger entry's value. The ledger and entryKey come from the path. Claim fields, id and timestamps are server-owned and are not accepted here. */
181
+ LedgerEntryUpdatePayload: {
182
+ /** @description The new entry value, stored as a JSON object. Replaces the stored value wholesale. */
183
+ value: Record<string, never>;
184
+ /** @description Optional precondition. When present, including as an empty object, the update applies only if the stored value equals this object (JSON equality; key order and whitespace do not matter). Omit the property to skip this check. Absence is distinct from an empty object. */
185
+ expectedValue?: Record<string, never>;
186
+ /**
187
+ * Format: date-time
188
+ * @description Optional precondition. When present, the update applies only if the stored entry's updatedAt equals this instant exactly. Clients echo the updatedAt they last read. Omit the property to skip this check.
189
+ */
190
+ expectedUpdatedAt?: string;
191
+ };
176
192
  /** @description Claim-if-absent payload giving a key to one connection. */
177
193
  LedgerClaimPayload: {
178
194
  /** @description Key to claim. */
@@ -223,6 +239,15 @@ export interface components {
223
239
  "text/plain": string;
224
240
  };
225
241
  };
242
+ /** @description Precondition Failed - expectedValue or expectedUpdatedAt does not match the stored entry, so nothing was changed */
243
+ 412: {
244
+ headers: {
245
+ [name: string]: unknown;
246
+ };
247
+ content: {
248
+ "text/plain": string;
249
+ };
250
+ };
226
251
  /** @description Internal server error */
227
252
  500: {
228
253
  headers: {
@@ -322,7 +347,7 @@ export interface operations {
322
347
  createdAt: string;
323
348
  /**
324
349
  * Format: date-time
325
- * @description Timestamp of last ledger entry modification.
350
+ * @description Timestamp of last ledger entry modification; advances on every update.
326
351
  */
327
352
  updatedAt: string;
328
353
  }[];
@@ -428,7 +453,7 @@ export interface operations {
428
453
  createdAt: string;
429
454
  /**
430
455
  * Format: date-time
431
- * @description Timestamp of last ledger entry modification.
456
+ * @description Timestamp of last ledger entry modification; advances on every update.
432
457
  */
433
458
  updatedAt: string;
434
459
  };
@@ -474,7 +499,7 @@ export interface operations {
474
499
  createdAt: string;
475
500
  /**
476
501
  * Format: date-time
477
- * @description Timestamp of last ledger entry modification.
502
+ * @description Timestamp of last ledger entry modification; advances on every update.
478
503
  */
479
504
  updatedAt: string;
480
505
  };
@@ -575,7 +600,7 @@ export interface operations {
575
600
  createdAt: string;
576
601
  /**
577
602
  * Format: date-time
578
- * @description Timestamp of last ledger entry modification.
603
+ * @description Timestamp of last ledger entry modification; advances on every update.
579
604
  */
580
605
  updatedAt: string;
581
606
  };
@@ -621,7 +646,7 @@ export interface operations {
621
646
  createdAt: string;
622
647
  /**
623
648
  * Format: date-time
624
- * @description Timestamp of last ledger entry modification.
649
+ * @description Timestamp of last ledger entry modification; advances on every update.
625
650
  */
626
651
  updatedAt: string;
627
652
  };
@@ -728,7 +753,7 @@ export interface operations {
728
753
  createdAt: string;
729
754
  /**
730
755
  * Format: date-time
731
- * @description Timestamp of last ledger entry modification.
756
+ * @description Timestamp of last ledger entry modification; advances on every update.
732
757
  */
733
758
  updatedAt: string;
734
759
  };
@@ -763,6 +788,127 @@ export interface operations {
763
788
  };
764
789
  };
765
790
  };
791
+ updateLedgerEntry: {
792
+ parameters: {
793
+ query?: never;
794
+ header?: never;
795
+ path: {
796
+ /** @description Name of the ledger, for example `processed-profiles`. */
797
+ ledger: string;
798
+ /** @description Key within the ledger. URL-encode keys that contain reserved characters such as `/`. */
799
+ entryKey: string;
800
+ };
801
+ cookie?: never;
802
+ };
803
+ requestBody: {
804
+ content: {
805
+ "application/json": {
806
+ /** @description The new entry value, stored as a JSON object. Replaces the stored value wholesale. */
807
+ value: Record<string, never>;
808
+ /** @description Optional precondition. When present, including as an empty object, the update applies only if the stored value equals this object (JSON equality; key order and whitespace do not matter). Omit the property to skip this check. Absence is distinct from an empty object. */
809
+ expectedValue?: Record<string, never>;
810
+ /**
811
+ * Format: date-time
812
+ * @description Optional precondition. When present, the update applies only if the stored entry's updatedAt equals this instant exactly. Clients echo the updatedAt they last read. Omit the property to skip this check.
813
+ */
814
+ expectedUpdatedAt?: string;
815
+ };
816
+ };
817
+ };
818
+ responses: {
819
+ /** @description The updated ledger entry */
820
+ 200: {
821
+ headers: {
822
+ [name: string]: unknown;
823
+ };
824
+ content: {
825
+ "application/json": {
826
+ /**
827
+ * Format: uuid
828
+ * @description Server-generated ledger entry ID.
829
+ */
830
+ id: string;
831
+ /**
832
+ * Format: uuid
833
+ * @description Owning organization ID. Derived from the authenticated session, never client-settable.
834
+ */
835
+ organizationId: string;
836
+ /** @description Name of the ledger (the idempotent set) the entry belongs to. */
837
+ ledger: string;
838
+ /** @description Key within the ledger. Unique per (organization, ledger). */
839
+ entryKey: string;
840
+ /** @description Entry value, stored as a JSON blob. */
841
+ value?: Record<string, never>;
842
+ /**
843
+ * Format: uuid
844
+ * @description ID of the connection that holds the entry, if any. Set only by claim-if-absent and never changed afterwards. References a connection (`connections.id`); a claim held by a connection that is later deleted is released, so the key may be claimed again. Omitted when the entry is unclaimed.
845
+ */
846
+ claimedByConnectionId?: string;
847
+ /**
848
+ * Format: date-time
849
+ * @description Time the current or most recent claim was taken. Set only by claim-if-absent; null when the entry was never claimed. An entry whose claimedByConnectionId is omitted is unclaimed whatever this holds.
850
+ */
851
+ claimedAt?: string | null;
852
+ /**
853
+ * Format: date-time
854
+ * @description Timestamp of ledger entry creation.
855
+ */
856
+ createdAt: string;
857
+ /**
858
+ * Format: date-time
859
+ * @description Timestamp of last ledger entry modification; advances on every update.
860
+ */
861
+ updatedAt: string;
862
+ };
863
+ };
864
+ };
865
+ /** @description Invalid request body or request param */
866
+ 400: {
867
+ headers: {
868
+ [name: string]: unknown;
869
+ };
870
+ content: {
871
+ "text/plain": string;
872
+ };
873
+ };
874
+ /** @description Expired JWT token used or insufficient privilege */
875
+ 401: {
876
+ headers: {
877
+ [name: string]: unknown;
878
+ };
879
+ content: {
880
+ "text/plain": string;
881
+ };
882
+ };
883
+ /** @description Result not found */
884
+ 404: {
885
+ headers: {
886
+ [name: string]: unknown;
887
+ };
888
+ content: {
889
+ "text/plain": string;
890
+ };
891
+ };
892
+ /** @description Precondition Failed - expectedValue or expectedUpdatedAt does not match the stored entry, so nothing was changed */
893
+ 412: {
894
+ headers: {
895
+ [name: string]: unknown;
896
+ };
897
+ content: {
898
+ "text/plain": string;
899
+ };
900
+ };
901
+ /** @description Internal server error */
902
+ 500: {
903
+ headers: {
904
+ [name: string]: unknown;
905
+ };
906
+ content: {
907
+ "text/plain": string;
908
+ };
909
+ };
910
+ };
911
+ };
766
912
  deleteLedgerEntry: {
767
913
  parameters: {
768
914
  query?: never;