@distilled.cloud/linkedin 0.0.0-stage → 1.0.0-rc.22

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 (44) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +155 -2
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +78 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +53 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +37 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/index.lazy.js +6 -0
  17. package/lib/index.lazy.js.map +1 -0
  18. package/lib/protocol.d.ts +54 -0
  19. package/lib/protocol.d.ts.map +1 -0
  20. package/lib/protocol.js +1 -0
  21. package/lib/retry.d.ts +52 -0
  22. package/lib/retry.d.ts.map +1 -0
  23. package/lib/retry.js +1 -0
  24. package/lib/services/index.d.ts +2 -0
  25. package/lib/services/index.d.ts.map +1 -0
  26. package/lib/services/index.js +1 -0
  27. package/lib/services/linkedin.d.ts +10183 -0
  28. package/lib/services/linkedin.d.ts.map +1 -0
  29. package/lib/services/linkedin.js +492 -0
  30. package/lib/services/linkedin.js.map +1 -0
  31. package/lib/services.lazy/index.js +3 -0
  32. package/lib/services.lazy/linkedin.js +3 -0
  33. package/lib/traits.d.ts +11 -0
  34. package/lib/traits.d.ts.map +1 -0
  35. package/lib/traits.js +1 -0
  36. package/package.json +82 -3
  37. package/src/credentials.ts +138 -0
  38. package/src/errors.ts +67 -0
  39. package/src/index.ts +39 -0
  40. package/src/protocol.ts +201 -0
  41. package/src/retry.ts +71 -0
  42. package/src/services/index.ts +2 -0
  43. package/src/services/linkedin.ts +30392 -0
  44. package/src/traits.ts +55 -0
package/src/traits.ts ADDED
@@ -0,0 +1,55 @@
1
+ /**
2
+ * LinkedIn SDK trait surface -- hand-written.
3
+ *
4
+ * Re-exports core's protocol traits so the generated operations import from
5
+ * one place, plus {@link RestliMethod}: the `X-RestLi-Method` header a
6
+ * Rest.li method other than a plain get, create, update or delete sends.
7
+ */
8
+ import { makeAnnotation } from "@distilled.cloud/core/trait";
9
+
10
+ export {
11
+ Body,
12
+ Header,
13
+ Query,
14
+ Label,
15
+ Http,
16
+ ResponseCode,
17
+ HttpBody,
18
+ KeyDictionary,
19
+ UnionCases,
20
+ applyErrorMatchers,
21
+ getErrorMatchers,
22
+ type HttpTrait,
23
+ type ErrorMatcher,
24
+ bodySymbol,
25
+ headerSymbol,
26
+ querySymbol,
27
+ labelSymbol,
28
+ httpSymbol,
29
+ responseCodeSymbol,
30
+ httpBodySymbol,
31
+ keyDictionarySymbol,
32
+ unionCasesSymbol,
33
+ errorMatchersSymbol,
34
+ } from "@distilled.cloud/core/trait";
35
+
36
+ export {
37
+ SensitiveValue,
38
+ RawResponse,
39
+ RawResponseRoot,
40
+ sensitiveValueSymbol,
41
+ rawResponseSymbol,
42
+ rawResponseRootSymbol,
43
+ } from "@distilled.cloud/core/protocol-rest";
44
+
45
+ export const restliMethodSymbol = /*@__PURE__*/ Symbol.for(
46
+ "@distilled.cloud/linkedin/restli-method",
47
+ );
48
+
49
+ /**
50
+ * The Rest.li method of an operation, stamped on its input schema and sent
51
+ * as `X-RestLi-Method` (`PARTIAL_UPDATE`, `BATCH_GET`, `BATCH_CREATE`, ...).
52
+ * Rest.li tells these methods from a plain one by the header: a POST on an
53
+ * entity without it is not a partial update.
54
+ */
55
+ export const RestliMethod = (method: string) => makeAnnotation(restliMethodSymbol, method);