Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "refactor: use cesdk"" #400

Merged
merged 5 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 6 additions & 282 deletions docs/generated/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
},
{
"kind": "Reference",
"text": "CloudEventsContext",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext:interface"
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
Expand Down Expand Up @@ -282,8 +282,8 @@
},
{
"kind": "Reference",
"text": "CloudEventsContext",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext:interface"
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
Expand Down Expand Up @@ -333,282 +333,6 @@
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext:interface",
"docComment": "/**\n * The CloudEvents v1.0 context attributes. {@link https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#context-attributes}\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface CloudEventsContext "
}
],
"releaseTag": "Public",
"name": "CloudEventsContext",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#data:member",
"docComment": "/**\n * The event payload.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "data?: "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "data",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#datacontenttype:member",
"docComment": "/**\n * Content type of the event data.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "datacontenttype?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "datacontenttype",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#dataschema:member",
"docComment": "/**\n * A link to the schema that the event data adheres to.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "dataschema?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "dataschema",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#id:member",
"docComment": "/**\n * ID of the event.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "id: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"releaseTag": "Public",
"name": "id",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#source:member",
"docComment": "/**\n * The event producer.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "source: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"releaseTag": "Public",
"name": "source",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#specversion:member",
"docComment": "/**\n * The version of the CloudEvents specification which the event uses.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "specversion: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"releaseTag": "Public",
"name": "specversion",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#subject:member",
"docComment": "/**\n * Describes the subject of the event in the context of the event producer.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "subject?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "subject",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#time:member",
"docComment": "/**\n * Timestamp of when the event happened.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "time?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "time",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#traceparent:member",
"docComment": "/**\n * The traceparent string, containing a trace version, trace ID, span ID, and trace options.\n *\n * @see\n *\n * https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "traceparent?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": true,
"releaseTag": "Public",
"name": "traceparent",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext#type:member",
"docComment": "/**\n * Type of occurrence which has happened.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "type: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"releaseTag": "Public",
"name": "type",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "@google-cloud/functions-framework!CloudFunctionsContext:interface",
Expand Down Expand Up @@ -749,8 +473,8 @@
},
{
"kind": "Reference",
"text": "CloudEventsContext",
"canonicalReference": "@google-cloud/functions-framework!CloudEventsContext:interface"
"text": "CloudEvent",
"canonicalReference": "cloudevents!CloudEventV1:interface"
},
{
"kind": "Content",
Expand Down
23 changes: 6 additions & 17 deletions docs/generated/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,24 @@

/// <reference types="node" />

import { CloudEventV1 as CloudEvent } from 'cloudevents';
import * as express from 'express';

export { CloudEvent }

// @public
export const cloudEvent: (functionName: string, handler: CloudEventFunction) => void;

// @public
export interface CloudEventFunction {
// (undocumented)
(cloudEvent: CloudEventsContext): any;
(cloudEvent: CloudEvent): any;
}

// @public
export interface CloudEventFunctionWithCallback {
// (undocumented)
(cloudEvent: CloudEventsContext, callback: Function): any;
}

// @public
export interface CloudEventsContext {
data?: any;
datacontenttype?: string;
dataschema?: string;
id: string;
source: string;
specversion: string;
subject?: string;
time?: string;
traceparent?: string;
type: string;
(cloudEvent: CloudEvent, callback: Function): any;
}

// @public
Expand All @@ -48,7 +37,7 @@ export interface CloudFunctionsContext {
}

// @public
export type Context = CloudFunctionsContext | CloudEventsContext;
export type Context = CloudFunctionsContext | CloudEvent;

// @public
export interface Data {
Expand Down
Loading