@jsforce/jsforce-node 0.0.1 → 3.0.0-next.1
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.
- package/LICENSE +22 -0
- package/README.md +54 -0
- package/index.d.ts +4 -0
- package/index.js +1 -0
- package/lib/VERSION.d.ts +2 -0
- package/lib/VERSION.js +3 -0
- package/lib/api/analytics/types.d.ts +509 -0
- package/lib/api/analytics/types.js +2 -0
- package/lib/api/analytics.d.ts +163 -0
- package/lib/api/analytics.js +342 -0
- package/lib/api/apex.d.ts +44 -0
- package/lib/api/apex.js +86 -0
- package/lib/api/bulk.d.ts +444 -0
- package/lib/api/bulk.js +1372 -0
- package/lib/api/chatter.d.ts +133 -0
- package/lib/api/chatter.js +248 -0
- package/lib/api/metadata/schema.d.ts +16117 -0
- package/lib/api/metadata/schema.js +9094 -0
- package/lib/api/metadata.d.ts +189 -0
- package/lib/api/metadata.js +406 -0
- package/lib/api/soap/schema.d.ts +3167 -0
- package/lib/api/soap/schema.js +1787 -0
- package/lib/api/soap.d.ts +76 -0
- package/lib/api/soap.js +155 -0
- package/lib/api/streaming/extension.d.ts +94 -0
- package/lib/api/streaming/extension.js +151 -0
- package/lib/api/streaming.d.ts +160 -0
- package/lib/api/streaming.js +252 -0
- package/lib/api/tooling.d.ts +284 -0
- package/lib/api/tooling.js +202 -0
- package/lib/api/wsdl/wsdl2schema.d.ts +1 -0
- package/lib/api/wsdl/wsdl2schema.js +354 -0
- package/lib/browser/canvas.d.ts +12 -0
- package/lib/browser/canvas.js +77 -0
- package/lib/browser/client.d.ts +82 -0
- package/lib/browser/client.js +244 -0
- package/lib/browser/jsonp.d.ts +12 -0
- package/lib/browser/jsonp.js +69 -0
- package/lib/browser/registry.d.ts +3 -0
- package/lib/browser/registry.js +5 -0
- package/lib/browser/request.d.ts +10 -0
- package/lib/browser/request.js +202 -0
- package/lib/cache.d.ts +74 -0
- package/lib/cache.js +159 -0
- package/lib/connection.d.ts +355 -0
- package/lib/connection.js +1153 -0
- package/lib/core.d.ts +17 -0
- package/lib/core.js +55 -0
- package/lib/csv.d.ts +23 -0
- package/lib/csv.js +35 -0
- package/lib/date.d.ts +82 -0
- package/lib/date.js +201 -0
- package/lib/http-api.d.ts +75 -0
- package/lib/http-api.js +257 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +31 -0
- package/lib/jsforce.d.ts +26 -0
- package/lib/jsforce.js +67 -0
- package/lib/jwtOAuth2.d.ts +8 -0
- package/lib/jwtOAuth2.js +23 -0
- package/lib/oauth2.d.ts +92 -0
- package/lib/oauth2.js +245 -0
- package/lib/process.d.ts +157 -0
- package/lib/process.js +143 -0
- package/lib/query.d.ts +341 -0
- package/lib/query.js +817 -0
- package/lib/quick-action.d.ts +44 -0
- package/lib/quick-action.js +46 -0
- package/lib/record-reference.d.ts +46 -0
- package/lib/record-reference.js +65 -0
- package/lib/record-stream.d.ts +83 -0
- package/lib/record-stream.js +233 -0
- package/lib/registry/base.d.ts +43 -0
- package/lib/registry/base.js +96 -0
- package/lib/registry/empty.d.ts +7 -0
- package/lib/registry/empty.js +13 -0
- package/lib/registry/file.d.ts +11 -0
- package/lib/registry/file.js +51 -0
- package/lib/registry/index.d.ts +8 -0
- package/lib/registry/index.js +21 -0
- package/lib/registry/sfdx.d.ts +56 -0
- package/lib/registry/sfdx.js +133 -0
- package/lib/registry/types.d.ts +47 -0
- package/lib/registry/types.js +2 -0
- package/lib/request-helper.d.ts +23 -0
- package/lib/request-helper.js +102 -0
- package/lib/request.d.ts +11 -0
- package/lib/request.js +75 -0
- package/lib/session-refresh-delegate.d.ts +31 -0
- package/lib/session-refresh-delegate.js +69 -0
- package/lib/soap.d.ts +60 -0
- package/lib/soap.js +246 -0
- package/lib/sobject.d.ts +258 -0
- package/lib/sobject.js +376 -0
- package/lib/soql-builder.d.ts +25 -0
- package/lib/soql-builder.js +226 -0
- package/lib/transport.d.ts +63 -0
- package/lib/transport.js +175 -0
- package/lib/types/common.d.ts +560 -0
- package/lib/types/common.js +2 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.js +23 -0
- package/lib/types/projection.d.ts +26 -0
- package/lib/types/projection.js +2 -0
- package/lib/types/record.d.ts +44 -0
- package/lib/types/record.js +2 -0
- package/lib/types/schema.d.ts +50 -0
- package/lib/types/schema.js +2 -0
- package/lib/types/soap.d.ts +43 -0
- package/lib/types/soap.js +2 -0
- package/lib/types/standard-schema.d.ts +16199 -0
- package/lib/types/standard-schema.js +2 -0
- package/lib/types/util.d.ts +7 -0
- package/lib/types/util.js +2 -0
- package/lib/util/formatter.d.ts +8 -0
- package/lib/util/formatter.js +24 -0
- package/lib/util/function.d.ts +32 -0
- package/lib/util/function.js +52 -0
- package/lib/util/logger.d.ts +29 -0
- package/lib/util/logger.js +102 -0
- package/lib/util/promise.d.ts +19 -0
- package/lib/util/promise.js +25 -0
- package/lib/util/stream.d.ts +12 -0
- package/lib/util/stream.js +88 -0
- package/package.json +260 -6
- package/typings/faye/index.d.ts +16 -0
- package/typings/index.d.ts +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StringKeys } from './util';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export type DateString = string & {
|
|
6
|
+
__DateBrand: never;
|
|
7
|
+
};
|
|
8
|
+
export type BlobString = string & {
|
|
9
|
+
__BlobBrand: never;
|
|
10
|
+
};
|
|
11
|
+
export type Address = {
|
|
12
|
+
city: string | null;
|
|
13
|
+
country: string | null;
|
|
14
|
+
geocodeAccuracy: string | null;
|
|
15
|
+
latitude: number | null;
|
|
16
|
+
longitude: number | null;
|
|
17
|
+
postalCode: string | null;
|
|
18
|
+
state: string | null;
|
|
19
|
+
street: string | null;
|
|
20
|
+
};
|
|
21
|
+
export type SObjectFieldType = number | boolean | DateString | BlobString | string | Address;
|
|
22
|
+
export interface SObjectDefinition<N extends string = string> {
|
|
23
|
+
Name: N;
|
|
24
|
+
Fields: {
|
|
25
|
+
[name: string]: SObjectFieldType | null;
|
|
26
|
+
};
|
|
27
|
+
ParentReferences: {
|
|
28
|
+
[name: string]: SObjectDefinition | null;
|
|
29
|
+
};
|
|
30
|
+
ChildRelationships: {
|
|
31
|
+
[name: string]: SObjectDefinition;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface Schema {
|
|
35
|
+
SObjects: {
|
|
36
|
+
[name: string]: SObjectDefinition;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export type SObjectNames<S extends Schema> = StringKeys<S['SObjects']>;
|
|
43
|
+
export type SObjectFieldNames<S extends Schema, N extends SObjectNames<S>> = StringKeys<S['SObjects'][N]['Fields']>;
|
|
44
|
+
export type ParentReferenceNames<S extends Schema, N extends SObjectNames<S>> = StringKeys<S['SObjects'][N]['ParentReferences']>;
|
|
45
|
+
type ParentReferenceSObjectName_<S extends Schema, N extends SObjectNames<S>, PRN extends ParentReferenceNames<S, N>, PSO extends SObjectDefinition = NonNullable<S['SObjects'][N]['ParentReferences'][PRN]>, SK extends keyof S['SObjects'] = keyof S['SObjects']> = Extract<SK extends PSO['Name'] ? SK : never, string>;
|
|
46
|
+
export type ParentReferenceSObjectName<S extends Schema, N extends SObjectNames<S>, PRN extends ParentReferenceNames<S, N>> = ParentReferenceSObjectName_<S, N, PRN>;
|
|
47
|
+
export type ChildRelationshipNames<S extends Schema, N extends SObjectNames<S>> = StringKeys<S['SObjects'][N]['ChildRelationships']>;
|
|
48
|
+
type ChildRelationshipSObjectName_<S extends Schema, N extends SObjectNames<S>, CRN extends ChildRelationshipNames<S, N>, CSO extends SObjectDefinition = S['SObjects'][N]['ChildRelationships'][CRN], SK extends keyof S['SObjects'] = keyof S['SObjects']> = Extract<SK extends CSO['Name'] ? SK : never, string>;
|
|
49
|
+
export type ChildRelationshipSObjectName<S extends Schema, N extends SObjectNames<S>, CRN extends ChildRelationshipNames<S, N>> = ChildRelationshipSObjectName_<S, N, CRN>;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
export type SoapSchemaDef = {
|
|
5
|
+
type: string;
|
|
6
|
+
extends?: string;
|
|
7
|
+
props: {
|
|
8
|
+
readonly [key: string]: SoapSchema;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type SoapSchema = readonly ['?', SoapSchema] | readonly [SoapSchema] | readonly SoapSchema[] | {
|
|
12
|
+
readonly '?': {
|
|
13
|
+
readonly [key: string]: SoapSchema;
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
readonly [key: string]: SoapSchema;
|
|
17
|
+
} | string | null;
|
|
18
|
+
type UndefKey<T extends {}, K extends keyof T = keyof T> = K extends keyof T ? undefined extends T[K] ? K : never : never;
|
|
19
|
+
type PartialForUndefined<T extends {}, UK extends keyof T = UndefKey<T>, RK extends keyof T = Exclude<keyof T, UK>> = [UK] extends [never] ? {
|
|
20
|
+
-readonly [K in RK]-?: T[K];
|
|
21
|
+
} : [RK] extends [never] ? {
|
|
22
|
+
-readonly [K in UK]+?: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
-readonly [K in UK]+?: T[K];
|
|
25
|
+
} & {
|
|
26
|
+
-readonly [K in RK]-?: T[K];
|
|
27
|
+
};
|
|
28
|
+
type SchemaTypeDict = {
|
|
29
|
+
[name: string]: {};
|
|
30
|
+
};
|
|
31
|
+
export type SoapSchemaType<T extends SoapSchemaDef, TypeDict extends SchemaTypeDict = SchemaTypeDict> = T['extends'] extends string ? TypeDict[T['extends']] & SoapSchemaElementType<T['props'], TypeDict, T['type']> : SoapSchemaElementType<T['props'], TypeDict, T['type']>;
|
|
32
|
+
export type SoapSchemaElementType<T extends SoapSchema, TypeDict extends SchemaTypeDict = SchemaTypeDict, N extends string = ''> = T extends readonly ['?', any] ? Array<SoapSchemaElementType<T[1], TypeDict, N>> | null | undefined : T extends readonly [any] ? Array<SoapSchemaElementType<T[0], TypeDict, N>> : T extends readonly any[] ? Array<SoapSchemaElementType<T[number], TypeDict, N>> : T extends {
|
|
33
|
+
readonly '?': {
|
|
34
|
+
readonly [key: string]: any;
|
|
35
|
+
};
|
|
36
|
+
} ? PartialForUndefined<{
|
|
37
|
+
[K in keyof T['?']]: SoapSchemaElementType<T['?'][K], TypeDict, N>;
|
|
38
|
+
}> | null | undefined : T extends {
|
|
39
|
+
readonly [key: string]: any;
|
|
40
|
+
} ? PartialForUndefined<{
|
|
41
|
+
[K in keyof T]: SoapSchemaElementType<T[K], TypeDict, N>;
|
|
42
|
+
}> : T extends 'string' ? string : T extends 'number' ? number : T extends 'boolean' ? boolean : T extends 'any' ? any : T extends '?string' ? string | null | undefined : T extends '?number' ? number | null | undefined : T extends '?boolean' ? boolean | null | undefined : T extends '?any' ? any | null | undefined : T extends N ? any : T extends keyof TypeDict ? TypeDict[T] : T extends null ? null : never;
|
|
43
|
+
export {};
|