mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Remove cloudevents-sdk (#43040)
This commit is contained in:
parent
9c4dde3661
commit
0664856f4e
@ -564,6 +564,12 @@
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/clipboardy",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "cloudevents-sdk",
|
||||
"typingsPackageName": "cloudevents-sdk",
|
||||
"sourceRepoURL": "https://github.com/cloudevents/sdk-javascript",
|
||||
"asOfVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "colors.js (colors)",
|
||||
"typingsPackageName": "colors",
|
||||
@ -5016,18 +5022,18 @@
|
||||
"sourceRepoURL": "https://github.com/arendjr/text-clipper",
|
||||
"asOfVersion": "1.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "theming",
|
||||
"typingsPackageName": "theming",
|
||||
"sourceRepoURL": "https://github.com/cssinjs/theming",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "theme-ui",
|
||||
"typingsPackageName": "theme-ui__color",
|
||||
"sourceRepoURL": "https://github.com/system-ui/theme-ui",
|
||||
"asOfVersion": "0.3.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "theming",
|
||||
"typingsPackageName": "theming",
|
||||
"sourceRepoURL": "https://github.com/cssinjs/theming",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "three",
|
||||
"typingsPackageName": "three",
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
import Cloudevent from 'cloudevents-sdk/v03';
|
||||
|
||||
function testEventBuilder() {
|
||||
const event = Cloudevent.event()
|
||||
.dataContentType('application/json')
|
||||
.id('43')
|
||||
.time(new Date())
|
||||
.type('pull_request')
|
||||
.source('github')
|
||||
.data({ action: 'created' })
|
||||
.format();
|
||||
|
||||
const { id, datacontenttype, time, type, source, data } = event;
|
||||
}
|
||||
36
types/cloudevents-sdk/index.d.ts
vendored
36
types/cloudevents-sdk/index.d.ts
vendored
@ -1,36 +0,0 @@
|
||||
// Type definitions for cloudevents-sdk 0.3
|
||||
// Project: https://github.com/cloudevents/sdk-javascript (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.)
|
||||
// Definitions by: Andy Cunningham <https://github.com/andycmaj>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// tslint:disable-next-line no-declare-current-package no-single-declare-module cloudevents-sdk/v03 is the documented way to import the cloudevent builder
|
||||
declare module 'cloudevents-sdk/v03' {
|
||||
// v03 CloudEvent payload
|
||||
// https://github.com/cloudevents/sdk-javascript/blob/master/lib/specs/spec_0_3.js#L11
|
||||
interface CloudEvent {
|
||||
id: string;
|
||||
datacontenttype: 'application/json';
|
||||
time: string;
|
||||
type: string;
|
||||
source: string;
|
||||
data: {};
|
||||
}
|
||||
|
||||
// Cloudevent fluent builder
|
||||
// https://github.com/cloudevents/sdk-javascript/blob/master/lib/cloudevent.js
|
||||
interface CloudEventBuilder {
|
||||
type: (type: string) => CloudEventBuilder;
|
||||
dataContentType: (contentType: string) => CloudEventBuilder;
|
||||
id: (id: string) => CloudEventBuilder;
|
||||
time: (timestamp: Date) => CloudEventBuilder;
|
||||
source: (source: string) => CloudEventBuilder;
|
||||
data: (data: any) => CloudEventBuilder;
|
||||
|
||||
format: () => CloudEvent;
|
||||
toString: () => string;
|
||||
}
|
||||
|
||||
// Cloudevent.event() static constructor
|
||||
// https://github.com/cloudevents/sdk-javascript#an-easy-way-to-create-events
|
||||
function event(): CloudEventBuilder;
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"cloudevents-sdk-tests.ts"
|
||||
]
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user