@elmohq/sdk 0.0.0-claim → 0.1.0
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.md +21 -0
- package/README.md +325 -2
- package/dist/calls/index.d.mts +288 -0
- package/dist/calls/index.d.mts.map +1 -0
- package/dist/calls/index.mjs +390 -0
- package/dist/calls/index.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1029 -0
- package/dist/index.mjs.map +1 -0
- package/dist/request-options-DWYI_Ldj.d.mts +1550 -0
- package/dist/request-options-DWYI_Ldj.d.mts.map +1 -0
- package/dist/tools-7Hs5J2xb.d.mts +1945 -0
- package/dist/tools-7Hs5J2xb.d.mts.map +1 -0
- package/dist/tools-SwP0sK8H.mjs +2458 -0
- package/dist/tools-SwP0sK8H.mjs.map +1 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +1 -0
- package/package.json +59 -2
- package/src/calls/brands-analytics-get.ts +33 -0
- package/src/calls/brands-citations-domains-list.ts +36 -0
- package/src/calls/brands-citations-urls-list.ts +32 -0
- package/src/calls/brands-create.ts +19 -0
- package/src/calls/brands-get.ts +19 -0
- package/src/calls/brands-list.ts +18 -0
- package/src/calls/brands-opportunities-get.ts +42 -0
- package/src/calls/brands-prompt-performance-list.ts +39 -0
- package/src/calls/brands-query-fanout-get.ts +30 -0
- package/src/calls/brands-tags-list.ts +28 -0
- package/src/calls/brands-update.ts +20 -0
- package/src/calls/competitors-create.ts +23 -0
- package/src/calls/competitors-delete.ts +19 -0
- package/src/calls/competitors-get.ts +19 -0
- package/src/calls/competitors-list.ts +23 -0
- package/src/calls/competitors-update.ts +24 -0
- package/src/calls/index.ts +33 -0
- package/src/calls/me-get.ts +18 -0
- package/src/calls/models-list.ts +20 -0
- package/src/calls/organizations-billing-get.ts +37 -0
- package/src/calls/organizations-get.ts +24 -0
- package/src/calls/organizations-list.ts +27 -0
- package/src/calls/prompts-create.ts +27 -0
- package/src/calls/prompts-delete.ts +28 -0
- package/src/calls/prompts-get.ts +23 -0
- package/src/calls/prompts-list.ts +28 -0
- package/src/calls/prompts-runs-get.ts +27 -0
- package/src/calls/prompts-runs-list.ts +30 -0
- package/src/calls/prompts-snapshot-get.ts +28 -0
- package/src/calls/prompts-update.ts +29 -0
- package/src/calls/reports-create.ts +31 -0
- package/src/calls/reports-get.ts +27 -0
- package/src/calls/reports-list.ts +28 -0
- package/src/calls/tools-analyze.ts +26 -0
- package/src/client.ts +662 -0
- package/src/index.ts +21 -0
- package/src/internal/binding/rest/binding.ts +127 -0
- package/src/internal/binding/rest/errors.ts +107 -0
- package/src/internal/binding/rest/path.ts +9 -0
- package/src/internal/binding/rest/url.ts +97 -0
- package/src/internal/codec/json.ts +66 -0
- package/src/internal/codec/registry.ts +55 -0
- package/src/internal/core/backoff.ts +170 -0
- package/src/internal/core/body.ts +54 -0
- package/src/internal/core/browser.ts +11 -0
- package/src/internal/core/call-promise.ts +145 -0
- package/src/internal/core/callable.ts +11 -0
- package/src/internal/core/client.ts +89 -0
- package/src/internal/core/config.ts +84 -0
- package/src/internal/core/credentials.ts +40 -0
- package/src/internal/core/dispatch.ts +227 -0
- package/src/internal/core/env.ts +68 -0
- package/src/internal/core/errors.ts +431 -0
- package/src/internal/core/features.ts +60 -0
- package/src/internal/core/lazy-promise.ts +39 -0
- package/src/internal/core/metadata.ts +79 -0
- package/src/internal/core/params.ts +98 -0
- package/src/internal/core/protocol.ts +17 -0
- package/src/internal/core/read-reply.ts +7 -0
- package/src/internal/core/text.ts +7 -0
- package/src/internal/core/types.ts +556 -0
- package/src/internal/feature/auth.ts +201 -0
- package/src/internal/feature/interceptors.ts +36 -0
- package/src/internal/feature/logger.ts +222 -0
- package/src/internal/feature/retry.ts +165 -0
- package/src/internal/feature/rules.ts +54 -0
- package/src/internal/feature/timeout.ts +146 -0
- package/src/internal/feature/validate.ts +74 -0
- package/src/internal/page/page.ts +402 -0
- package/src/internal/transport/fetch.ts +82 -0
- package/src/resources/analytics.ts +363 -0
- package/src/resources/brands.ts +285 -0
- package/src/resources/competitors.ts +212 -0
- package/src/resources/identity.ts +48 -0
- package/src/resources/models.ts +32 -0
- package/src/resources/opportunities.ts +79 -0
- package/src/resources/organizations.ts +181 -0
- package/src/resources/prompts.ts +292 -0
- package/src/resources/reports.ts +211 -0
- package/src/resources/runs.ts +123 -0
- package/src/resources/shared/auth.ts +13 -0
- package/src/resources/shared/request-options.ts +26 -0
- package/src/resources/shared/resource.ts +23 -0
- package/src/resources/shared/rule.ts +25 -0
- package/src/resources/snapshots.ts +54 -0
- package/src/resources/tags.ts +46 -0
- package/src/resources/tools.ts +68 -0
- package/src/types/analytics.ts +497 -0
- package/src/types/brands.ts +228 -0
- package/src/types/competitors.ts +196 -0
- package/src/types/identity.ts +55 -0
- package/src/types/index.ts +163 -0
- package/src/types/models.ts +40 -0
- package/src/types/opportunities.ts +84 -0
- package/src/types/organizations.ts +157 -0
- package/src/types/prompts.ts +231 -0
- package/src/types/reports.ts +266 -0
- package/src/types/runs.ts +131 -0
- package/src/types/shared/brand-id-path.ts +2 -0
- package/src/types/shared/conflict-error.ts +7 -0
- package/src/types/shared/error.ts +29 -0
- package/src/types/shared/limit.ts +8 -0
- package/src/types/shared/mention-entry.ts +21 -0
- package/src/types/shared/model-filter.ts +15 -0
- package/src/types/shared/not-found-error.ts +4 -0
- package/src/types/shared/page.ts +7 -0
- package/src/types/shared/pagination.ts +7 -0
- package/src/types/shared/validation-error.ts +4 -0
- package/src/types/snapshots.ts +88 -0
- package/src/types/tags.ts +47 -0
- package/src/types/tools.ts +78 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ConflictError, PaymentRequiredError } from './shared/conflict-error';
|
|
2
|
+
import type {
|
|
3
|
+
ForbiddenError,
|
|
4
|
+
InternalServerError,
|
|
5
|
+
RateLimitError,
|
|
6
|
+
UnauthorizedError,
|
|
7
|
+
} from './shared/error';
|
|
8
|
+
import type { ValidationError } from './shared/validation-error';
|
|
9
|
+
|
|
10
|
+
export type OnboardingSuggestion = {
|
|
11
|
+
additionalDomains: Array<string>;
|
|
12
|
+
aliases: Array<string>;
|
|
13
|
+
brandName: string;
|
|
14
|
+
competitors: Array<{
|
|
15
|
+
aliases: Array<string>;
|
|
16
|
+
domains: Array<string>;
|
|
17
|
+
name: string;
|
|
18
|
+
}>;
|
|
19
|
+
suggestedPrompts: Array<{
|
|
20
|
+
prompt: string;
|
|
21
|
+
tags: Array<string>;
|
|
22
|
+
}>;
|
|
23
|
+
/** Cleaned hostname */
|
|
24
|
+
website: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type AnalyzeBrandErrors = {
|
|
28
|
+
/** Invalid request data */
|
|
29
|
+
400: ValidationError;
|
|
30
|
+
/** Authentication required */
|
|
31
|
+
401: UnauthorizedError;
|
|
32
|
+
/** The organization has no active subscription. Cloud deployments only. */
|
|
33
|
+
402: PaymentRequiredError;
|
|
34
|
+
/**
|
|
35
|
+
* The key is valid but not permitted: a missing scope, an admin-only endpoint, or a write in
|
|
36
|
+
* read-only (demo) mode.
|
|
37
|
+
*/
|
|
38
|
+
403: ForbiddenError;
|
|
39
|
+
/** Resource already exists */
|
|
40
|
+
409: ConflictError;
|
|
41
|
+
/** Per-key rate limit exceeded. */
|
|
42
|
+
429: RateLimitError;
|
|
43
|
+
/** Internal server error */
|
|
44
|
+
500: InternalServerError;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type AnalyzeBrandResponses = {
|
|
48
|
+
/** Brand analysis suggestion */
|
|
49
|
+
200: OnboardingSuggestion;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type AnalyzeBrandParams = {
|
|
53
|
+
/**
|
|
54
|
+
* Brand's website — a hostname or a full URL. A URL with a path (e.g. https://www.nike.com/golf)
|
|
55
|
+
* is analyzed as given; the returned website is always its domain.
|
|
56
|
+
*
|
|
57
|
+
* @minLength 1
|
|
58
|
+
*/
|
|
59
|
+
website: string;
|
|
60
|
+
/** Optional brand name hint. If omitted, inferred from the domain. */
|
|
61
|
+
brandName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Maximum number of competitor suggestions. 0 disables competitor generation entirely.
|
|
64
|
+
*
|
|
65
|
+
* @default 20
|
|
66
|
+
* @minimum 0
|
|
67
|
+
* @maximum 100
|
|
68
|
+
*/
|
|
69
|
+
maxCompetitors?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Maximum number of suggested prompts. 0 disables prompt generation entirely.
|
|
72
|
+
*
|
|
73
|
+
* @default 30
|
|
74
|
+
* @minimum 0
|
|
75
|
+
* @maximum 100
|
|
76
|
+
*/
|
|
77
|
+
maxPrompts?: number;
|
|
78
|
+
};
|